# Trying to install Discourse on Docker before server just testing software?

**URL:** https://meta.discourse.org/t/trying-to-install-discourse-on-docker-before-server-just-testing-software/366503
**Category:** Self-hosting
**Tags:** unsupported-install, docker
**Created:** [May 16, 2025, 8:00pm UTC](https://meta.discourse.org/t/trying-to-install-discourse-on-docker-before-server-just-testing-software/366503 "2025-05-16T20:00:40Z")
**Posts on this page:** 1
**Showing post:** 6

<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:05pm UTC](https://meta.discourse.org/t/trying-to-install-discourse-on-docker-before-server-just-testing-software/366503/6 "2025-05-16T20:05:32Z")

</div>

love how fast this works! Really getting into Discourse.

Thanks again! @merefield.

Edit found step by step instructions for the docker image:

> **[bitnami/discourse - Docker Image](https://hub.docker.com/r/bitnami/discourse)**

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

```

---

_[View the full topic](https://meta.discourse.org/t/trying-to-install-discourse-on-docker-before-server-just-testing-software/366503)._
