Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

You can self-host Discourse on a Docker-capable, 64-bit Linux VPS with root SSH access. Start with at least one CPU core, 1 GB of RAM plus swap, and 10 GB of disk; 2 or more cores, 2 GB or more RAM, and 20 GB or more disk is a safer starting point. Point a DNS name at the server, run Discourse’s installer, provide administrator and email details, and let the installer build the container and request HTTPS. The installation is straightforward, but DNS, SMTP, updates, backups, and host security remain your responsibility.

What self-hosting Discourse on a VPS means

Discourse is deployed as a web application, database, Redis service, background jobs, and supporting components. The officially supported self-hosting path is Docker on a 64-bit Linux server. Discourse’s own documentation states that the only officially supported installs are Docker based. A VPS gives you root-level control over the operating system, network ports, storage, backups, and upgrade schedule, while you operate every part of the forum.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The standard deployment uses the Discourse Docker Manager configuration and a single application container. This standalone template is the easiest path for a new forum. More advanced installations can split services across multiple containers or servers, but that adds firewall, monitoring, backup, and upgrade work.

VPS requirements and sizing

The published minimum is suitable for a small test forum, not a guarantee of capacity for a busy community. A modern single-core CPU, 1 GB of RAM with swap, and 10 GB of disk are the minimum figures. The general requirements also include PostgreSQL matching the deployed Discourse image, Redis 7, and Ruby 3.2 or newer. The Docker image supplies and manages the application stack when you use the supported installer.

Resource Minimum published starting point Recommended starting point What it affects
CPU 1 modern core 2 or more cores Container builds, page generation, background jobs, and concurrent users
Memory 1 GB RAM plus swap 2 GB or more RAM PostgreSQL, Redis, web workers, jobs, and rebuilds running together
Storage 10 GB 20 GB or more Operating system, container layers, database, uploads, logs, and backups
Operating system 64-bit Linux with Docker support Fresh Ubuntu or Debian VPS Predictable package versions and a clean Docker installation

Use the minimum only when the forum is small and traffic is light. Uploaded images, file attachments, database growth, container rebuilds, and local backup archives consume disk over time. Memory pressure is especially noticeable during rebuilds and upgrades, so additional RAM reduces the chance of the Linux kernel terminating a service. Swap helps a 1 GB test machine survive short spikes; it does not replace physical memory for sustained load.

What to check with a VPS provider

  • Root SSH access and permission to run Docker.
  • A 64-bit Ubuntu or Debian image, preferably freshly provisioned.
  • Enough CPU, RAM, and disk headroom for rebuilds as well as normal traffic.
  • Inbound and outbound firewall controls, including ports 80 and 443.
  • Snapshot or backup tools, and a way to move backups off the VPS.
  • IPv4 and, if needed, IPv6 support, plus a region close to your audience.
  • Reliable networking and support appropriate for a public community.

DigitalOcean, AWS EC2, Google Cloud, Linode/Akamai, Vultr, and Hetzner are examples named in the official cloud guide, but any provider that supplies a Docker-compatible VPS can work. Compare total monthly cost, storage and bandwidth limits, snapshot pricing, support, and regional latency rather than choosing solely on the advertised CPU count.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a hostname and prepare DNS

Decide the permanent HTTPS hostname before running the wizard. A subdomain such as forum.example.com keeps the forum separate from a main website. Create an A record for that name pointing to the VPS’s public IPv4 address. If you publish an IPv6 address, configure the corresponding AAAA record only when the server and firewall are correctly prepared for IPv6.

Allow DNS changes to propagate before certificate issuance. The installer verifies that the hostname resolves to the server and uses that resolution when requesting a Let’s Encrypt certificate. If the name still points elsewhere, is hidden behind an incorrect proxy, or has stale records, HTTPS provisioning can fail even when the VPS itself is healthy.

The cloud guide also offers an optional *.discourse.diy subdomain for testing, learning, or hobby projects. A custom domain is the appropriate choice for a production community because it remains under your control if you change providers.

Install Discourse with the supported Docker workflow

Provision the VPS, confirm that you can log in as root over SSH, and then perform the installation from a clean server. The installer can install Docker and Git if they are not already present, download the Discourse Docker configuration, and launch an interactive setup wizard.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Connect over SSH

    From your local terminal, connect to the server using its public address and root account. Use your provider’s documented SSH syntax and key or password method. Confirm that the shell is on the new VPS, not another machine, before making changes.

  2. Run the official installer

    Execute the installer exactly as documented:

    wget -qO- https://raw.githubusercontent.com/discourse/discourse_docker/main/install-discourse | sudo bash

    The script installs missing Docker and Git components, downloads the configuration repository, and starts the setup process. Review the script source and your provider’s security guidance if your organization requires approval before piping a downloaded script to a shell.

  3. Enter the hostname and administrator addresses

    Provide the fully qualified hostname you prepared, such as forum.example.com, and one or more administrator email addresses. These addresses are used during first-run registration and administration. Check spelling carefully; an address you cannot access will make account activation and recovery harder.

  4. Configure email choices

    Enter SMTP details if you want conventional email registration, password recovery, notifications, digests, mailing-list mode, or replies by email. The current wizard can skip SMTP and enable Discourse ID login or social sign-in instead, but skipping SMTP does not provide the traditional outbound email workflows. You can configure SMTP later from the administration settings when those features become necessary.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  5. Review and confirm the generated configuration

    Read the summary before accepting it. Verify the hostname, administrator email, SMTP server and credentials (if supplied), and any selected authentication options. Correcting a value here is easier than rebuilding after a failed launch.

  6. Wait for the container build

    The official guide estimates roughly five to ten minutes for a normal build, although CPU, disk speed, and network conditions change the duration. The installer checks ports 80 and 443, verifies DNS, tunes some settings for available resources, and requests a Let’s Encrypt certificate when the hostname resolves correctly.

Do not close the SSH session merely because the terminal appears quiet; wait for the installer to report completion. If the build fails, capture the final error and inspect the logs before rerunning commands at random.

Complete the first-run setup

When the build finishes, open the HTTPS hostname in a browser. Register with one of the administrator email addresses supplied during installation, confirm the account as prompted, and complete Discourse’s in-app setup wizard. Set the forum name, description, default language, trust-level expectations, and moderation contacts for your community. These settings are independent of the VPS and can be changed from the administration interface.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Test the complete path before inviting users: load the home page over HTTPS, create a test topic, upload a small image if uploads are enabled, sign out and back in, and verify that a notification email arrives when SMTP is configured. Testing from a separate network can reveal DNS, firewall, or certificate issues hidden by a cached local connection.

SMTP: optional for installation, important for email features

Discourse can now be installed without SMTP when you use Discourse ID or another supported social-login route. Traditional email-based registration and account recovery still depend on a functioning outbound mail service. Mailing-list mode, digests, notification messages, and email replies likewise require SMTP configuration.

Information to collect before configuring SMTP

  • SMTP hostname and port.
  • Encryption mode required by the mail provider.
  • Username and password or another permitted authentication method.
  • The sender address and domain you want recipients to see.
  • Any required SPF, DKIM, or DMARC records for your sending domain.

Send test messages to more than one mailbox provider and check spam placement, not just whether the message leaves the server. Keep an eye on bounces and authentication failures; a forum can appear healthy while users miss activation or password-reset mail.

HTTPS, ports, and firewall rules

Public access normally requires TCP ports 80 and 443. Port 80 is used for HTTP validation and redirect behavior, while 443 serves the forum over HTTPS. A provider firewall, VPS firewall, or local ruleset that blocks either port can prevent certificate issuance or make the site unreachable. Permit SSH only from the networks you need when practical, and avoid exposing database or Redis ports to the public internet.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Certificate provisioning depends on DNS and reachability together. A correct A record is not enough if a firewall drops the validation request, another service occupies port 80, or a reverse proxy sends the request to a different host.

Routine administration after launch

Upgrade through the web interface

Use Discourse’s web administration upgrade page for routine updates. Review the proposed version and release notes, confirm that backups are current, and start the upgrade during a period when a short maintenance interruption is acceptable.

Rebuild from the command line

The supported command-line pattern is:

cd /var/discourse
./launcher rebuild app

A rebuild recreates the application image with updated code and dependencies. It can take several minutes and uses CPU, memory, disk, and network bandwidth. Avoid starting a rebuild while the VPS is already near its memory or storage limits.

Inspect logs when something fails

Start with the application log:

cd /var/discourse
./launcher logs app

For an interactive shell inside the container, use:

cd /var/discourse
./launcher enter app

When a Rails-level diagnosis is needed, review the production log from inside the container. Look for the first meaningful error rather than the last cascade of connection failures. Record the time, request path, and recent change so you can correlate errors with an upgrade or configuration edit.

Keep the host patched

Enable unattended security updates on Ubuntu or Debian where that policy fits your maintenance requirements. Consider fail2ban or an equivalent control for repeated SSH or web authentication attempts. Use key-based SSH authentication, disable unused services, and apply a provider firewall before exposing the forum publicly.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Backups, restores, and disk management

Operating the VPS includes protecting the database and uploaded files. A snapshot is useful for rapid rollback, but it should not be your only copy: a damaged or deleted VPS can take its snapshot with it. Keep backups off the server, monitor their age and size, and periodically perform a restore test on a separate environment. The official deployment guidance does not prescribe a universal retention schedule or performance guarantee, so choose retention based on how much forum activity you can afford to lose.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Monitor free disk space, database growth, upload volume, container layers, and log files. A forum can fail to rebuild or accept uploads when the filesystem is full even though CPU and memory look normal. Set alerts before free space becomes critical and include backup storage in capacity calculations.

Single-container versus multi-container deployment

The standalone template is the easiest supported starting point. A multi-container arrangement can separate the database or Redis service, reduce upgrade downtime, and scale components across servers, but it requires more design and operations work.

Consideration Standalone application container Multi-container or split-server design
Initial setup Lowest complexity; follows the standard installer Higher complexity; services, networks, and firewall rules must be designed
Upgrades Simple rebuild workflow with a short interruption Can reduce downtime when components are orchestrated carefully
Scaling Suitable for a small or growing community on one VPS Useful when web, database, or background workloads need separate capacity
Isolation Application, PostgreSQL, and Redis are managed together Database and Redis can run on stronger or dedicated hardware
Security work Fewer internal network paths to protect PostgreSQL and Redis must be firewalled and never exposed unnecessarily
Failure recovery Fewer moving parts to restore More independent components and dependencies to document and test

Choose the standalone design unless you have a clear scaling, isolation, or maintenance requirement. Splitting services does not remove the need for backups, monitoring, upgrades, or secure email delivery.

Troubleshooting common installation problems

The certificate request fails

  • Confirm the hostname’s A record resolves to the VPS’s current public IP.
  • Check that ports 80 and 443 are allowed by both provider and operating-system firewalls.
  • Remove conflicting DNS records or reverse-proxy routes.
  • Wait for propagation if the record was changed recently, then rerun the relevant setup step.

The site is unreachable after installation

Verify the VPS is running, the container completed its build, and the hostname in the browser exactly matches the configured hostname. Check provider firewall rules, local firewall rules, and whether another service is already bound to ports 80 or 443. Use ./launcher logs app to distinguish an application failure from a network problem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The build runs out of memory

Confirm that swap exists and that the VPS has not exhausted its disk. Stop unnecessary services, retry during a quiet period, and move to the recommended 2 GB or larger memory tier if rebuilds repeatedly fail. Increasing swap can help a temporary spike, but sustained workloads need more physical RAM.

Email registration or notifications do not arrive

Recheck SMTP host, port, encryption, credentials, and sender address. Inspect the application log for authentication or connection errors, then check recipient spam folders and domain authentication records. If SMTP was skipped during installation, configure it in the administration settings before expecting conventional email workflows.

The forum becomes slow as it grows

Check memory, CPU, disk latency, database size, background-job queues, and upload volume. Remove unnecessary services from the VPS, keep the host patched, and move to additional CPU or RAM before the machine begins swapping continuously. A multi-container architecture is a later scaling option, not a substitute for measuring the current bottleneck.

Operational checklist

  • Use a 64-bit Ubuntu or Debian VPS with root SSH and Docker support.
  • Start at 1 core, 1 GB RAM with swap, and 10 GB disk only for a small test; prefer 2 or more cores, 2 GB or more RAM, and 20 GB or more disk for a production starting point.
  • Create the forum DNS A record before certificate provisioning.
  • Allow TCP ports 80 and 443 and protect SSH with a firewall and strong authentication.
  • Run the official installer and verify every wizard value.
  • Choose SMTP during setup when email registration, digests, mailing-list mode, or email replies are required.
  • Complete the in-app administrator setup and test HTTPS, posting, uploads, login, and mail.
  • Keep the host and Discourse container updated.
  • Monitor disk, memory, logs, backups, and email deliverability.
  • Test restoring a backup before you need it.

When a VPS is the right choice

A VPS is appropriate when you want control over the forum’s domain, software updates, data location, and operating costs and you are prepared to maintain Linux, Docker, email, security, and backups. The official cloud guide describes the software as working on any Docker-compatible cloud provider or local server. If you do not want responsibility for those operations, a managed Discourse service may be a better fit; self-hosting is valuable precisely because it gives you control, not because it eliminates maintenance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.