Back to Apps
Discourse

Deploy Discourse on Your Own Server

Discourse is the 100% open source discussion platform built for the next decade of the Internet. Use it as a mailing list, discussion forum, long-form chat room, and more!

πŸ’¬ Communication

Want to deploy Discourse on your server faster? Try Senate with one-command setup, automatic HTTPS and monitoring.

Get Started

What is Discourse?

Discourse is a relatively heavy application, atleast 2GB RAM is recommended to run Discourse

Self-Host Discourse

Follow these steps to deploy on your own server.

1

Install Docker

Skip this step if Docker is already installed on your server.

curl -fsSL https://get.docker.com | sh
2

Configure

Customize the settings below. Defaults work for most cases.

General
3

Deploy

Copy the configuration and run it on your server.

services:
  discourse:
    image: docker.io/bitnamilegacy/discourse:2.8.11
    environment:
      DISCOURSE_EMAIL: your_email@gmail.com
      DISCOURSE_HOSTNAME: discourse.your-domain.com
      DISCOURSE_PASSWORD: sTr0nG_p@s$wo%d
      DISCOURSE_POSTGRESQL_NAME: discourse_db
      DISCOURSE_POSTGRESQL_PASSWORD: sTr0nG_p@s$wo%d
      DISCOURSE_POSTGRESQL_USERNAME: discourse_user
      DISCOURSE_SITENAME: My site!
      DISCOURSE_USERNAME: admin
      POSTGRESQL_CLIENT_CREATE_DATABASE_NAME: discourse_db
      POSTGRESQL_CLIENT_CREATE_DATABASE_PASSWORD: sTr0nG_p@s$wo%d
      POSTGRESQL_CLIENT_CREATE_DATABASE_USERNAME: discourse_user
      POSTGRESQL_CLIENT_POSTGRES_PASSWORD: sTr0nG_p@s$wo%d
      POSTGRESQL_HOST: discourse-postgresql
      POSTGRESQL_ROOT_USER: postgres
      REDIS_HOST: discourse-redis
      SMTP_HOST: smtp.gmail.com
      SMTP_PASSWORD: sTr0nG_p@s$wo%d
      SMTP_PORT: "587"
      SMTP_USER: your_email@gmail.com
    volumes:
      - discourse-data:/bitnami
    depends_on:
      - discourse-postgresql
      - discourse-redis
  discourse-postgresql:
    image: docker.io/bitnamilegacy/postgresql:15.1.0
    environment:
      POSTGRESQL_DATABASE: discourse_db
      POSTGRESQL_PASSWORD: sTr0nG_p@s$wo%d
      POSTGRESQL_POSTGRES_PASSWORD: sTr0nG_p@s$wo%d
      POSTGRESQL_USERNAME: discourse_user
    volumes:
      - discourse-postgresql-data:/bitnami/postgresql
  discourse-redis:
    image: docker.io/bitnamilegacy/redis:5.0
    environment:
      ALLOW_EMPTY_PASSWORD: yes
    volumes:
      - discourse-redis-data:/bitnami
  discourse-sidekiq:
    environment:
      DISCOURSE_HOST: discourse
      DISCOURSE_HOSTNAME: discourse.your-domain.com
      DISCOURSE_PORT: "3000"
      DISCOURSE_POSTGRESQL_NAME: discourse_db
      DISCOURSE_POSTGRESQL_PASSWORD: sTr0nG_p@s$wo%d
      DISCOURSE_POSTGRESQL_USERNAME: discourse_user
      POSTGRESQL_HOST: discourse-postgresql
      REDIS_HOST: discourse-redis
      SMTP_HOST: smtp.gmail.com
      SMTP_PASSWORD: sTr0nG_p@s$wo%d
      SMTP_PORT: "587"
      SMTP_USER: your_email@gmail.com
    volumes:
      - discourse-data:/bitnami
    depends_on:
      - discourse
volumes:
  discourse-data: {}
  discourse-postgresql-data: {}
  discourse-redis-data: {}

Then run:

docker compose up -d
4

Access

Once started, access your app at http://localhost:3000

Why Self-Host Discourse?

Full Data Ownership

Your data stays on your servers. No third-party access.

No Monthly Fees

Pay only for your server. No per-seat or usage charges.

Complete Control

Customize, backup, and scale on your own terms.

Privacy & Compliance

Meet GDPR, HIPAA, or internal security requirements.

Technical Details

Docker Image

docker.io/bitnamilegacy/discourse:${discourse_version}

Want to go faster?

Try Senate! Senate handles Docker, HTTPS, updates, and monitoring for you. Deploy any of our 300+ apps with a single command.

Install on any Linux server:

sh -c "$(curl -sSL https://get.senate.sh)"