How to Deploy Appsmith on private instance using Docker
Tags: appsmith, docker, tutorial, beginners
Published: 2021-10-30 07:59:05

## Introduction

Appsmith is a low code, open-source framework to build internal applications.
You can check their official documentation website [here](https://docs.appsmith.com/)
It is open source and very easy to deploy on our own machine.

Docker is an open platform for developing, shipping, and running applications. With Docker, you can manage your infrastructure in the same ways you manage your applications. 

You can download and install Docker on multiple platforms. Refer to [this page](https://docs.docker.com/get-docker/) and choose the best installation path for you.

Appsmith can be deployed locally or on our private instance using Docker.

The **Prerequisites** of proceeding with the setup are:

* having Docker version 20.10.7 or later
* having Docker-Compose of version 1.29.2 or later

Once you have these ready, you are good to go!

>It is recommended to create an installation folder called *appsmith*, so that our Appsmith installation, and data to live in are stored at a single place.

**Initial Step**
cd into the installation folder

```sh
cd appsmith
```

Now, we can follow two paths from here-
a) with docker-compose
b) without docker-compose

Here we are going to go through both methods of deploying Appsmith on our private instance.

### Method-1: Quick Start with docker-compose

The Appsmith Docker image is built with all the components required for it to run, within a single Docker container. All these multiple processes are managed by a Supervisor instance, which is a lightweight process manager.

**Step-1:**
Download the `docker-compose.yml` file into the appsmith installation folder from [here](https://docs.appsmith.com/setup/docker#quick-start-with-docker-compose)

You can also choose to run the following curl if you are on a remote machine:

```curl
curl -L https://bit.ly/2WMPFPy -o $PWD/docker-compose.yml
```

The above configuration runs an Appsmith instance, along with a Watchtover instance to keep Appsmith automatically up-to-date.

**Step-2:**
Bring the docker container up. It can be done by running the following command:

```sh
docker-compose up -d
```

![Deploying-Appsmith-Docker-1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nvhf5ikpk781ja34bzcx.png)

This command will pull and download all the required Docker images, and start the services.

![Deploying-Appsmith-Docker-2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iissr14yyc85tyx92dq6.png)

**Step-3:**
Once all the images are downloaded and the container is running, you can check the logs with the following command:

```sh
docker logs -f appsmith
```

Once the container is ready, and running properly, you will be able to see a message `Appsmith is Running!`

![Deploying-Appsmith-Docker-5](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6tq4kvr2o0i7vabwbufd.png)


**Congratulations!** :tada:
Your Appsmith server should be up and running now. You can access it on [localhost](http://localhost).

This was all about Method-1, now let us explore Method-2 of Deploying Appsmith using Docker.

### Method-2: Explore Appsmith without docker-compose

This is also a simple method of deploying Appsmith by the use of Docker in two simple steps.

**Step-1:**
Run the following command on your machine, in order to quickly get Appsmith up and running:

```sh
docker run -d --name appsmith -p 80:80 -p 9001:9001 -v "$PWD/stacks:/appsmith-stacks" appsmith/appsmith-ce
```

This will download the image and start Appsmith. Once the download is complete, the server should be up in under a minute.

**Step-2:**
View the logs with the following command:

```sh
docker logs -f appsmith
```

A successful message `Appsmith is Running!` will be displayed once the container is ready and running correctly.

That's it!
It is so simple, isn't it?

Go ahead and start creating your applications using Appsmith, and now you know how to set it up on your local machine without any complexity!

Feel free to reach out in case of any doubts :)

Also, don't forget to check out the [official documentaion](https://docs.appsmith.com/setup/docker) for the same.

Happy Learning All!