GitHub

Deployment

Diskus is designed to be fully self-hosted. Whether you prefer Managed PaaS platforms or raw Docker deployments on a VPS, getting Diskus into production is a frictionless experience.

🚀 One-Click Deploy to Railway

For the easiest deployment path, we highly recommend Railway. Our official template automatically provisions the services, sets up persistent volumes for SQLite, and wires up the internal networking.

Deploy on Railway

Click the button above to instantly deploy both the Backend API and the Dashboard Frontend. All environment variables, volumes, and start commands are pre-configured.

Production Deployment via Docker

If you prefer to host Diskus on your own VPS (like DigitalOcean, Linode, or Hetzner), Diskus is fully containerized and includes a production-ready docker-compose.yml.

1. Build and Start the Services

We provide a specialized shell script that handles initial secret generation and spins up the Docker Compose stack safely.

# Ensure the script is executable
chmod +x start.sh

# Run the initialization and startup script
./start.sh

What this script does: It checks for the existence of a .env file. If none exists, it generates a cryptographically secure JWT_SECRET for you automatically, preventing you from deploying an insecure instance. It then runs docker-compose up -d --build.

2. Accessing Your Services

Once the containers are running, they are exposed on the following ports:

  • Frontend (Dashboard & Widget Embed): http://localhost:5173 (Map this to your domain using a reverse proxy like Nginx or Traefik).
  • Backend API: http://localhost:3000

Data Persistence: The SQLite database utilizes a Docker Named Volume (diskus-data). Your comments, threads, and user data will persist safely even if you stop, rebuild, or restart the containers.

Reverse Proxy Configuration (Nginx)

In a typical production environment, you should place Nginx or Caddy in front of the Diskus containers to handle SSL/TLS certificates and domain routing.

Ensure that your proxy forwards the Host headers and real IP addresses so the backend rate-limiting functions correctly:

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;

Security Initialization

Instead of manually running database seeding commands in production, Diskus handles this securely via the UI.

When you spin up a fresh production database, simply open your frontend domain in the browser. You will be greeted with a “Create Admin Account” screen. Register your account immediately. Once the first administrator is created, this setup screen is permanently locked out to secure your deployment.

Resetting the Production Database

If you ever need to completely wipe your production database (e.g., to start fresh or migrate servers), you must destroy the Docker Named Volume.

WARNING: This action is irreversible. It will permanently delete all comments, settings, and user data.

# Bring down containers and DESTROY the database volume (-v)
docker-compose down -v

# Restart the services to generate a fresh database
./start.sh