# Self-Hosting

**URL:** https://meta.discourse.org/c/documentation/self-hosting/55.md

[Latest](https://meta.discourse.org/latest.md) · [Categories](https://meta.discourse.org/categories.md) · [Tags](https://meta.discourse.org/tags.md)

---

## [Self-hosting Index](https://meta.discourse.org/t/self-hosting-index/308035)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 0\
**Last updated:** [May 15, 2024, 6:05am UTC](https://meta.discourse.org/t/self-hosting-index/308035 "2024-05-15T06:05:12Z")

</div>

Documentation and guides for people who self-host their Discourse sites. Setup & configuration Installation guide: Install Discourse in production with the official supported instructions Installing plugins: Install pl…

---

## [Configure Discourse to use a separate PostgreSQL server](https://meta.discourse.org/t/configure-discourse-to-use-a-separate-postgresql-server/46375)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 51\
**Last updated:** [September 23, 2026, 8:54am UTC](https://meta.discourse.org/t/configure-discourse-to-use-a-separate-postgresql-server/46375 "2026-09-23T08:54:42Z")

</div>

Let’s say you’re using AWS RDS, or an existing PostgreSQL server managed elsewhere. It’s fairly straightforward to get Discourse to use such a setup, without needing to grant superuser privileges to anything that Discou…

---

## [Configure an S3 compatible object storage provider for uploads](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 267\
**Last updated:** [September 15, 2026, 1:04am UTC](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916 "2026-09-15T01:04:57Z")

</div>

:information\_source: This topic covers how to configure some common S3 compatible Object Storage providers (S3 clones). See Set up file and image uploads to S3 for more details about Amazon AWS S3 configuration, whic…

---

## [Move topics from one Discourse instance to another](https://meta.discourse.org/t/move-topics-from-one-discourse-instance-to-another/38930)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 7\
**Last updated:** [August 20, 2026, 7:16pm UTC](https://meta.discourse.org/t/move-topics-from-one-discourse-instance-to-another/38930 "2026-08-20T19:16:58Z")

</div>

Need to move some stuff from one instance of Discourse to another? There is a command line tool to export a topic, a set of topics, or an entire category, and another to import them in at the other end. Topic Export/I…

---

## [Self-Hosting Sentiment and Emotion for DiscourseAI](https://meta.discourse.org/t/self-hosting-sentiment-and-emotion-for-discourseai/334451)

<div class="topic-metadata">

**Author:** [@Falco](https://meta.discourse.org/u/Falco)\
**Replies:** 17\
**Last updated:** [August 12, 2026, 2:29am UTC](https://meta.discourse.org/t/self-hosting-sentiment-and-emotion-for-discourseai/334451 "2026-08-12T02:29:54Z")

</div>

The Discourse AI plugin has support for requesting emotion/sentiment classification of new posts, which is stored in the database and can be used in reports and admin dashboards. Discourse AI supports two types of class…

---

## [Move your Discourse Instance to a Different Server](https://meta.discourse.org/t/move-your-discourse-instance-to-a-different-server/15721)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 11\
**Last updated:** [August 11, 2026, 8:28am UTC](https://meta.discourse.org/t/move-your-discourse-instance-to-a-different-server/15721 "2026-08-11T08:28:07Z")

</div>

:bookmark: This is a guide for moving your Discourse instance from one server to another, including all settings and data. This guide applies to self-hosted Discourse instances using Docker. :person\_raising\_hand: Requi…

---

## [Switching between Discourse release channels / versions](https://meta.discourse.org/t/switching-between-discourse-release-channels-versions/17014)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 12\
**Last updated:** [August 3, 2026, 1:09pm UTC](https://meta.discourse.org/t/switching-between-discourse-release-channels-versions/17014 "2026-08-03T13:09:32Z")

</div>

:bookmark: This guide explains how to configure the release channel of your Discourse instance. :person\_raising\_hand: Required user level: System Administrator :warning: Console access is required. Managing your Dis…

---

## [Configure VERP to handle bouncing e-mails](https://meta.discourse.org/t/configure-verp-to-handle-bouncing-e-mails/45343)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 10\
**Last updated:** [July 30, 2026, 9:50pm UTC](https://meta.discourse.org/t/configure-verp-to-handle-bouncing-e-mails/45343 "2026-07-30T21:50:55Z")

</div>

Setting up bounces handling Discourse uses the Variable envelope return path (VERP) technique to handle bouncing e-mails. To enable VERP, set the “reply by email address” site setting with an email address template th…

---

## [Backup discourse from the command line](https://meta.discourse.org/t/backup-discourse-from-the-command-line/64364)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 12\
**Last updated:** [July 23, 2026, 12:28am UTC](https://meta.discourse.org/t/backup-discourse-from-the-command-line/64364 "2026-07-23T00:28:56Z")

</div>

:bookmark: This guide covers how to back up and restore your Discourse site using command line tools, specifically designed for self-hosted environments. :person\_raising\_hand: Required user level: Administrator …

---

## [Edit a user preference for everyone or a subset of users](https://meta.discourse.org/t/edit-a-user-preference-for-everyone-or-a-subset-of-users/25162)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 0\
**Last updated:** [February 12, 2015, 3:03pm UTC](https://meta.discourse.org/t/edit-a-user-preference-for-everyone-or-a-subset-of-users/25162 "2015-02-12T15:03:23Z")

</div>

:bookmark: This guide explains how to edit a user preference for everyone or a subset of users in Discourse. :person\_raising\_hand: Required user level: System Administrator :warning: Console access is required. If y…

---

## [Self-Hosting an OpenSource LLM for DiscourseAI](https://meta.discourse.org/t/self-hosting-an-opensource-llm-for-discourseai/290923)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 12\
**Last updated:** [July 6, 2026, 6:36pm UTC](https://meta.discourse.org/t/self-hosting-an-opensource-llm-for-discourseai/290923 "2026-07-06T18:36:54Z")

</div>

The Discourse AI plugin has many features that require an LLM to be enabled, like, for example, Summarization, AI Helper, AI Search, AI Bot. While you can use a third party API, like Configure API Keys for OpenAI or Conf…

---

## [Handling the "chain of trust" of the end user's real IP](https://meta.discourse.org/t/handling-the-chain-of-trust-of-the-end-users-real-ip/406372)

<div class="topic-metadata">

**Author:** [@supermathie](https://meta.discourse.org/u/supermathie)\
**Replies:** 7\
**Last updated:** [July 2, 2026, 2:03pm UTC](https://meta.discourse.org/t/handling-the-chain-of-trust-of-the-end-users-real-ip/406372 "2026-07-02T14:03:37Z")

</div>

Background Discourse needs to be aware of the end user’s real IP address. However, an end user never directly connects to Discourse since there is always one or more upstream web servers (nginx running in the Discourse …

---

## [Run other websites on the same machine as Discourse](https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 66\
**Last updated:** [June 30, 2026, 11:19am UTC](https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247 "2026-06-30T11:19:56Z")

</div>

If you want to run other websites on the same machine as Discourse, you need to set up an extra NGINX or HAProxy proxy in front of the Docker container. NOTE: This is for advanced admins This guide assumes you already …

---

## [Serve Discourse from a subfolder (path prefix) instead of a subdomain](https://meta.discourse.org/t/serve-discourse-from-a-subfolder-path-prefix-instead-of-a-subdomain/30507)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 30\
**Last updated:** [April 14, 2026, 9:15pm UTC](https://meta.discourse.org/t/serve-discourse-from-a-subfolder-path-prefix-instead-of-a-subdomain/30507 "2026-04-14T21:15:09Z")

</div>

:warning: Discourse Official Statement about Subfolder setup We support subfolder setups for our hosted customers at the enterprise level and up. Due to heavy technical setup complexity we strongly recommend you do not…

---

## [Administrative Bulk Operations](https://meta.discourse.org/t/administrative-bulk-operations/118349)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 9\
**Last updated:** [June 12, 2026, 7:43pm UTC](https://meta.discourse.org/t/administrative-bulk-operations/118349 "2026-06-12T19:43:12Z")

</div>

Below you will find a collection of bulk operations that can be initiated from the command line. You will need SSH access, so if you are a hosted customer, you will need to contact the Discourse team about running thes…

---

## [Create, download, and restore a backup of your Discourse database](https://meta.discourse.org/t/create-download-and-restore-a-backup-of-your-discourse-database/122710)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 25\
**Last updated:** [May 29, 2026, 8:31pm UTC](https://meta.discourse.org/t/create-download-and-restore-a-backup-of-your-discourse-database/122710 "2026-05-29T20:31:09Z")

</div>

:bookmark: This guide provides step-by-step instructions for creating, downloading, and restoring a backup of your Discourse database. :person\_raising\_hand: Required user level: Administrator Discourse allows site ad…

---

## [Configure automatic backups for Discourse](https://meta.discourse.org/t/configure-automatic-backups-for-discourse/14855)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 44\
**Last updated:** [May 19, 2026, 5:18pm UTC](https://meta.discourse.org/t/configure-automatic-backups-for-discourse/14855 "2026-05-19T17:18:12Z")

</div>

:bookmark: This guide explains how to configure automatic backups for Discourse, including storage options on local servers and S3-compatible storage. Learn how to set up automatic backups for your Discourse platform. …

---

## [Enable setting to allow admins to permanently delete data](https://meta.discourse.org/t/enable-setting-to-allow-admins-to-permanently-delete-data/206678)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 3\
**Last updated:** [April 30, 2026, 9:38am UTC](https://meta.discourse.org/t/enable-setting-to-allow-admins-to-permanently-delete-data/206678 "2026-04-30T09:38:49Z")

</div>

:bookmark: This is a guide on how to enable the setting for administrators to permanently delete data on a Discourse instance. :person\_raising\_hand: Required user level: Admin As of v2026.4.0 Changelog | Discourse Re…

---

## [Bulk delete all topics in a category](https://meta.discourse.org/t/bulk-delete-all-topics-in-a-category/97904)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 0\
**Last updated:** [September 23, 2018, 10:43pm UTC](https://meta.discourse.org/t/bulk-delete-all-topics-in-a-category/97904 "2018-09-23T22:43:29Z")

</div>

:bookmark: This guide provides instructions on how to bulk delete all topics within a category on a self-hosted Discourse instance. :person\_raising\_hand: Required user level: System Administrator :warning: SSH acces…

---

## [Using Hidden Site Settings](https://meta.discourse.org/t/using-hidden-site-settings/308773)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 0\
**Last updated:** [May 20, 2024, 10:51pm UTC](https://meta.discourse.org/t/using-hidden-site-settings/308773 "2024-05-20T22:51:56Z")

</div>

:bookmark: This is a how-to guide about Hidden Site Settings, how to enable them, and why you might want to adjust them. :person\_raising\_hand: Required user level: Administrator :warning: Important: Console access is …

---

## [Hidden Site Settings Reference Guide](https://meta.discourse.org/t/hidden-site-settings-reference-guide/308774)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 0\
**Last updated:** [May 20, 2024, 10:55pm UTC](https://meta.discourse.org/t/hidden-site-settings-reference-guide/308774 "2024-05-20T22:55:23Z")

</div>

:bookmark: This is a reference guide for describing all available Hidden Site Settings. :person\_raising\_hand: Required user level: Administrator Hidden site settings in Discourse are advanced configuration options th…

---

## [Troubleshoot email on a new Discourse install](https://meta.discourse.org/t/troubleshoot-email-on-a-new-discourse-install/16326)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 36\
**Last updated:** [April 27, 2026, 7:59pm UTC](https://meta.discourse.org/t/troubleshoot-email-on-a-new-discourse-install/16326 "2026-04-27T19:59:20Z")

</div>

You just installed Discourse via the install guide, but email doesn’t seem to work. Unfortunately this means you can’t log in as an admin to finalize the install. :cry: Let’s troubleshootize! Try the doctor …

---

## [Using Discourse with Cloudflare: Best Practices](https://meta.discourse.org/t/using-discourse-with-cloudflare-best-practices/293405)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 28\
**Last updated:** [April 26, 2026, 7:31pm UTC](https://meta.discourse.org/t/using-discourse-with-cloudflare-best-practices/293405 "2026-04-26T19:31:10Z")

</div>

Using Discourse with Cloudflare :bookmark: This guide explains how to configure and use Discourse with Cloudflare, including security best practices and troubleshooting tips. :person\_raising\_hand: Required user level:…

---

## [Use Caddy instead of NGINX as your reverse proxy](https://meta.discourse.org/t/use-caddy-instead-of-nginx-as-your-reverse-proxy/54716)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 20\
**Last updated:** [February 26, 2026, 8:19pm UTC](https://meta.discourse.org/t/use-caddy-instead-of-nginx-as-your-reverse-proxy/54716 "2026-02-26T20:19:28Z")

</div>

Here are some notes about how I got my test Discourse instance running with Caddy Server. Cool stuff about Caddy: They use Discourse :smile: Free SSL with Let’s Encrypt HTTP2 and QUIC out of the box Easier…

---

## [Configure direct-delivery incoming email for self-hosted sites with Mail-Receiver](https://meta.discourse.org/t/configure-direct-delivery-incoming-email-for-self-hosted-sites-with-mail-receiver/49487)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 76\
**Last updated:** [March 27, 2026, 1:20am UTC](https://meta.discourse.org/t/configure-direct-delivery-incoming-email-for-self-hosted-sites-with-mail-receiver/49487 "2026-03-27T01:20:21Z")

</div>

Discourse is all about enabling civilized discussion. While plenty of people like a web interface, e-mail is still the “hub” of many people’s online lives. That’s why sending e-mail is so important, and when you’re sen…

---

## [Create an admin account from the console](https://meta.discourse.org/t/create-an-admin-account-from-the-console/17274)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 1\
**Last updated:** [January 2, 2025, 5:02pm UTC](https://meta.discourse.org/t/create-an-admin-account-from-the-console/17274 "2025-01-02T17:02:18Z")

</div>

:bookmark: This guide provides instructions for creating an admin account or granting admin privileges using the console in a self-hosted Discourse installation. :person\_raising\_hand: Required user level: System Admini…

---

## [Manually update Discourse and Docker image to latest](https://meta.discourse.org/t/manually-update-discourse-and-docker-image-to-latest/23325)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 13\
**Last updated:** [January 16, 2025, 11:14am UTC](https://meta.discourse.org/t/manually-update-discourse-and-docker-image-to-latest/23325 "2025-01-16T11:14:13Z")

</div>

:bookmark: This guide provides step-by-step instructions for manually updating Discourse, the Docker container, and the Ubuntu operating system on a self-hosted setup. :person\_raising\_hand: Required user level: System …

---

## [Configure a firewall for Discourse](https://meta.discourse.org/t/configure-a-firewall-for-discourse/20584)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 5\
**Last updated:** [March 25, 2025, 11:14pm UTC](https://meta.discourse.org/t/configure-a-firewall-for-discourse/20584 "2025-03-25T23:14:23Z")

</div>

If you are using a standard Docker based Discourse install, the following Uncomplicated Firewall rules will protect any non-Docker services on your server: ufw allow http ufw allow https ufw allow ssh ufw enable That i…

---

## [Create a swapfile for your Linux server](https://meta.discourse.org/t/create-a-swapfile-for-your-linux-server/13880)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 5\
**Last updated:** [December 18, 2024, 3:03pm UTC](https://meta.discourse.org/t/create-a-swapfile-for-your-linux-server/13880 "2024-12-18T15:03:04Z")

</div>

:bulb: For servers with \<= 4GB of RAM, running ./discourse-setup will prompt for and automatically create a 2GB swapfile. Most cloud virtual machine providers do not set up swapfiles as part of their server provisioni…

---

## [Change the domain name or rename your Discourse](https://meta.discourse.org/t/change-the-domain-name-or-rename-your-discourse/16098)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 7\
**Last updated:** [June 19, 2025, 6:23pm UTC](https://meta.discourse.org/t/change-the-domain-name-or-rename-your-discourse/16098 "2025-06-19T18:23:25Z")

</div>

:bookmark: This guide explains how-to change the domain name of your Discourse site, and includes information about setting up DNS changes, editing configuration files, updating site settings, and correcting social logi…

[Next page](https://meta.discourse.org/c/documentation/self-hosting/55.md?page=1)
