# Installing Discourse using Portainer

**URL:** https://meta.discourse.org/t/installing-discourse-using-portainer/170987
**Category:** Self-hosting
**Tags:** unsupported-install, hosting
**Created:** [November 23, 2020, 8:19am UTC](https://meta.discourse.org/t/installing-discourse-using-portainer/170987 "2020-11-23T08:19:44Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![sarveshmrao](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sarveshmrao/32/200961_2.png) [@sarveshmrao](https://meta.discourse.org/u/sarveshmrao)
#### Post date: [November 23, 2020, 8:19am UTC](https://meta.discourse.org/t/installing-discourse-using-portainer/170987/1 "2020-11-23T08:19:44Z")

</div>

I use Portainer to manage my Containers. I wanted to install Discourse in a new container but I’m unable to do so. If anyone can help me with this would be appreciated.

**WHAT I TRIED?**  
I read the [GitHub File](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md) and tried to follow it but I was unable to run console commands as I have not created a container. So I created/cloned an image of Discourse in DockerHub and installed it through Portainer but when I run it says exited with error code 0.

---

<div class="post-metadata">

### Author: ![sarveshmrao](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sarveshmrao/32/200961_2.png) [@sarveshmrao](https://meta.discourse.org/u/sarveshmrao)
#### Post date: [November 23, 2020, 11:00am UTC](https://meta.discourse.org/t/installing-discourse-using-portainer/170987/2 "2020-11-23T11:00:43Z")

</div>

Why is this unsupported install @rishabh? Portainer is just a Docker Control Panel.

---

<div class="post-metadata">

### Author: ![marianord](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marianord/32/90502_2.png) [@marianord](https://meta.discourse.org/u/marianord)
#### Post date: [November 23, 2020, 2:57pm UTC](https://meta.discourse.org/t/installing-discourse-using-portainer/170987/3 "2020-11-23T14:57:50Z")

</div>

Because they only support one installation type, which is in a clean VPS where all the modifications and scripts run without any issue. Anything else is a custom installation and they won’t support it as the ways to use containers is infinite.

To be able to install Discourse, you need to run the bootstrapping done via the `launcher` utility. If you can add scripts to Portainer it should be relatively easy to do. Or you can just install Discourse in a VPS and push the resulting container to see if that works.

Other way, which could be easier is to decouple everything and deploy them individually, this means (in no way a complete list):

- PostgreSQL
- Redis
- Unicorns
- Discourse

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [November 23, 2020, 5:01pm UTC](https://meta.discourse.org/t/installing-discourse-using-portainer/170987/4 "2020-11-23T17:01:55Z")

</div>

> [@marianord](#):
>
> Because they only support one installation type, which is in a clean VPS where all the modifications and scripts run without any issue. Anything else is a custom installation and they won’t support it as the ways to use containers is infinite.

Yes we have only one [official install](https://meta.discourse.org/t/142537?silent=true) largely to allow our community to support it well. If we had more, it would be difficult for everyone to provide quality troubleshooting and setup advice.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [November 23, 2020, 5:41pm UTC](https://meta.discourse.org/t/installing-discourse-using-portainer/170987/5 "2020-11-23T17:41:57Z")

</div>

What you’ll need to do is use `./launcher` to build your container and then launch it with portainer, passing all of the environment variables needed.

See [Can Discourse ship frequent Docker images that do not need to be bootstrapped?](https://meta.discourse.org/t/can-discourse-ship-frequent-docker-images-that-do-not-need-to-be-bootstrapped/33205) for more discussion.

The easy solution that you can get free help with is to follow the [official install](https://meta.discourse.org/t/142537?silent=true) instructions. If you need help with portainer and have a budget you can ask in #Marketplace or contact me. I’m not familiar with portainer, but have built containers to launch with other tools.

---

<div class="post-metadata">

### Author: ![alex.diker](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alex.diker/32/503482_2.png) [@alex.diker](https://meta.discourse.org/u/alex.diker)
#### Post date: [May 16, 2025, 8:55pm UTC](https://meta.discourse.org/t/installing-discourse-using-portainer/170987/6 "2025-05-16T20:55:10Z")

</div>

Dont want to look ignorant, where is this launcher utility? I was looking at the/discourse path with the docker image i pulled and could not find any scripts…again maybe i am looking at it wrong? Will prob just run a standard Ubuntu Docker container and configure it all my self for the test as if a [standard install](https://meta.discourse.org/t/142537?silent=true)?

Found instructions such as these:

The recommended way to get the Bitnami Discourse Docker Image is to pull the prebuilt image from the [Docker Hub Registry](https://hub.docker.com/r/bitnami/discourse).

```plaintext
docker pull bitnami/discourse:latest

```

To use a specific version, you can pull a versioned tag. You can view the [list of available versions](https://hub.docker.com/r/bitnami/discourse/tags/) in the Docker Hub Registry.

```plaintext
docker pull bitnami/discourse:[TAG]

```

If you wish, you can also build the image yourself by cloning the repository, changing to the directory containing the Dockerfile and executing the `docker build` command. Remember to replace the `APP`, `VERSION` and `OPERATING-SYSTEM` path placeholders in the example command below with the correct values.

```plaintext
git clone https://github.com/bitnami/containers.git
cd bitnami/APP/VERSION/OPERATING-SYSTEM
docker build -t bitnami/APP:latest .

```

#### How to use this image

Discourse requires access to a PostgreSQL database to store information. We’ll use the [Bitnami Docker Image for PostgreSQL⁠](https://github.com/bitnami/containers/tree/main/bitnami/postgresql) for the database requirements.

##### Using the Docker Command Line

**Step 1: Create a network**

```plaintext
docker network create discourse-network

```

**Step 2: Create a volume for PostgreSQL persistence and create a PostgreSQL container**

```plaintext
$ docker volume create --name postgresql_data
docker run -d --name postgresql \
  --env ALLOW_EMPTY_PASSWORD=yes \
  --env POSTGRESQL_USERNAME=bn_discourse \
  --env POSTGRESQL_PASSWORD=bitnami123 \
  --env POSTGRESQL_DATABASE=bitnami_discourse \
  --network discourse-network \
  --volume postgresql_data:/bitnami/postgresql \
  bitnami/postgresql:latest

```

**Step 3: Create a volume for Redis persistence and create a Redis container**

```plaintext
$ docker volume create --name redis_data
docker run -d --name redis \
  --env ALLOW_EMPTY_PASSWORD=yes \
  --network discourse-network \
  --volume redis_data:/bitnami/redis \
  bitnami/redis:latest

```

**Step 4: Create volumes for Discourse persistence and launch the container**

```plaintext
$ docker volume create --name discourse_data
docker run -d --name discourse \
  -p 8080:8080 -p 8443:8443 \
  --env ALLOW_EMPTY_PASSWORD=yes \
  --env DISCOURSE_DATABASE_USER=bn_discourse \
  --env DISCOURSE_DATABASE_PASSWORD=bitnami123 \
  --env DISCOURSE_DATABASE_NAME=bitnami_discourse \
  --env DISCOURSE_HOST=www.example.com \
  --network discourse-network \
  --volume discourse_data:/bitnami/discourse \
  bitnami/discourse:latest

```

**Step 5: Launch the Sidekiq container**

```plaintext
docker run -d --name sidekiq \
  --network discourse-network \
  --volume discourse_data:/bitnami/discourse \
  bitnami/discourse:latest /opt/bitnami/scripts/discourse-sidekiq/run.sh

```

Access your application at `http://your-ip/`

##### Run the application using Docker Compose

```plaintext
curl -sSL https://raw.githubusercontent.com/bitnami/containers/main/bitnami/discourse/docker-compose.yml > docker-compose.yml
docker-compose up -d

```

Please be aware this file has not undergone internal testing. Consequently, we advise its use exclusively for development or testing purposes. For production-ready deployments, we highly recommend utilizing its associated [Bitnami Helm chart⁠](https://github.com/bitnami/charts/tree/main/bitnami/discourse).

If you detect any issue in the `docker-compose.yaml` file, feel free to report it or contribute with a fix by following our [Contributing Guidelines⁠](https://github.com/bitnami/containers/blob/main/CONTRIBUTING.md).

##### Troubleshooting discourse

If you need to run discourse administrative commands like [Create admin account from console⁠](https://meta.discourse.org/t/create-admin-account-from-console/17274), you can do so by executing a shell inside the container and running with the proper environment variables.

```plaintext
cd /opt/bitnami/discourse
RAILS_ENV=production bundle exec rake admin:create

```

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [May 16, 2025, 9:31pm UTC](https://meta.discourse.org/t/installing-discourse-using-portainer/170987/7 "2025-05-16T21:31:47Z")

</div>

> [@alex.diker](#):
>
> where is this launcher utility?

> <https://github.com/discourse/discourse_docker/blob/main/launcher>
