Discourse is modern software for your community. Use it as a mailing list, discussion forum, long-form chat room, and more. You can use this repo to self-host Discourse on Render in just a few clicks! It will create the following components on Render:
- A Dockerized Web Service that runs the Discourse website and background workers.
- A Render PostgreSQL Managed Database.
- A Redis instance for caching and acting as a message queue for the background workers.
This deployment has several advantages over the official Discourse install guide:
- Free, fully managed SSL for your Render subdomain and custom domains.
- Improved scalability and reliability through an independent service for each component.
- Officially supported by Render
- Did we mention 1-click deploy?
If you need help, get in touch at https://community.render.com.
Discourse does not work without an email server. Setting up and managing mail servers can be tricky, so we’ve omitted a mail server from the deploy config and strongly recommend using a third-party email provider.
See the official Discourse recommended email providers.
We have tested this repo successfully with Mailgun, but other providers in the list above should work equally well.
Use the button below to deploy Discourse on Render.
You will be prompted to input several environment variables, some of which are optional. See below for more details
- Create a managed PostgreSQL database. We recommend the
Standardplan which should be enough for small to medium communities.
- Create a Redis instance. The
Starterplan with a 4 GB disk should be enough to start with, but you should continue to monitor usage metrics as your community grows.
- Fork render-examples/discourse on GitHub or click the green ‘Use this template’ button.
- Create a new Web Service on Render, and give Render permission to access your new repo.
- Make sure the
Environmentis set to
Docker, and enter a name for the service (this will be used to generate the private URL).
Advancedsection and edit the following values.
Health Check Path
Docker Build Context Directory
Add a Disk under Disks with the following values:
2 GBFeel free to change this to suit your needs.
Add the following environment variables under Environment. These must be set appropriately for your application to work.
a valid email address for the admin account
a password for the admin account. This must be over 15 characters long
hostname from your PostgreSQL database
database name from your PostgreSQL database
password from your PostgreSQL database
port from your postgresql database
username from your PostgreSQL database
host from your private redis service
port from your private redis service
the address of your SMTP provider (e.g.
The domain you will send emails from (e.g. for
email@example.com, it would be
your SMTP provider password
the port your SMTP provider uses to connect (e.g.
your SMTP provider username (e.g.
Optional These environment variables can be used to further customize your deployment. You do not need to set them unless you need their functionality.
the custom domain you will use for your Discourse instance. If you populate this variable you will need to configure DNS before your instance is usable. If you leave it blank, your instance will be available on a
GeoLite2 license key, useful for user analytics
Create Web Serviceand you’re good to go! Once deployed, your Discourse instance will be available for you on either an
- Optional If you used a custom domain for the deployment, don’t forget to configure your DNS!
- After deploying the service, you will be able to log in with your admin email address. The password will be located in the environment variables section on your Render dashboard, under
- Once you are logged in, run
the setup wizardto customize your Discourse website! It should be located on a banner at the top of the page.
We have configured the following:
This works well on a machine with 2 GB RAM, but you can choose a larger web server plan depending on your forum traffic. For reference, see the Discourse default server config and default worker config. These may work better on machines with more RAM.
Render will continue to verify all new Discourse versions in our official Discourse repository. One we’ve verified a version, you can simply upgrade the
Dockerfile path in your render.yaml to point to the new version and click ‘Manual Deploy’ on your dashboard.
This could happen if the admin email you specified is invalid. If this is the case, you can update the value of the
DISCOURSE_ADMIN_EMAIL environment variable and the server will redeploy and create the account.
If this also fails, you can manually create an admin account through the web shell in your Render dashboard. Use the following commands:
# This will prompt you to input an email and password to create your admin account bundle exec rake admin:create # Restart the Discourse server bundle exec pumactl -P pids/puma.pid restart