Deploy

Single node

Run everything on one server with the install script: sizing, DNS, secrets and environment.

Server Requirements

OS Ubuntu
CPU 4
RAM 8GB

DNS

You will need a domain name. This deployment uses two sub domains.

Subdomain Purpose
app Serves the application.
storage Serves the storage service.

We recommend using a subdomain such as rr.example.com instead of example.com.

Configure DNS to point two A-Names to the IP of the host.

A 100.00.00.00 app.rr.example.com
A 100.00.00.10 storage.rr.example.com

Secrets

You will need to provide these values for self hosted installs.

We recommend generating keys with openssl, like this:

openssl rand -hex 24

You will need to generate the following secrets:

cmd
SECRET_KEY openssl rand -base64 45 django secret key
MINIO_ADMIN_PASSWORD openssl rand -hex 24 admin pw for minio
POSTGRES_PASSWORD openssl rand -hex 24 pw for pg
AWS_SECRET_ACCESS_KEY openssl rand -hex 24 secret key for access to bucket
NTFY_PREFIX echo -n "$(openssl rand -hex 16)-rapid-response" [optional] random channel name for push notifs

Env

Copy the template and populate it. For single-node deployments, there are a few additional required values.

Env var Example Description
ROOT_DOMAIN rr.example.com The root domain for the deployment. Used to generate app and storage domain.
ADMIN_EMAIL [email protected] Admin email for server alerts.
MINIO_ADMIN_PASSWORD openssl rand -hex 24 See Secrets section above.
POSTGRES_USER rapidresponse Leave as is but, if changed, ensure it matches the value in DATABASE_URL.
POSTGRES_PASSWORD openssl rand -hex 24 See Secrets section above.

Instructions

Resource Address
env template https://docs.rapidresponse.io/assets/deploy/single-node/env.template
install script https://docs.rapidresponse.io/assets/deploy/single-node/install.sh
  1. Create a server.
  2. SSH In
  3. Copy the env template over and add your values. See env docs for details.
  4. Install the install script
  5. Run the install script.
# copy env template
curl https://docs.rapidresponse.io/assets/deploy/single-node/env.template -o ~/env
# populate env template
curl https://docs.rapidresponse.io/assets/deploy/single-node/install.sh -o /tmp/install.sh
# run install script with first arg as location of env file
bash /tmp/install.sh ~/env
# follow the prompts

At this point, the installs script will check your configs then set everything up running with docker compose.

Install.sh

The install script automates the complete setup of a RapidResponse.IO single-node deployment. It performs the following operations:

System Setup:

  • Creates a dedicated rapidresponse user and group
  • Installs system dependencies: Docker, Caddy, PostgreSQL client, Redis CLI
  • Configures UFW firewall (allows SSH, HTTP, HTTPS; denies all other incoming)
  • Sets up a Python virtual environment for system monitoring

Service Deployment:

  • Creates systemd services for:
    • MinIO (S3-compatible storage) on ports 9000/9001
    • PostgreSQL 15 database on port 5432
    • Redis cache on port 6379
    • RapidResponse application (nginx + web + worker via Docker Compose)
  • Configures Caddy as reverse proxy with automatic TLS for app.$ROOT_DOMAIN and storage.$ROOT_DOMAIN

Post-Installation:

  • Verifies DNS configuration for required subdomains
  • Initializes MinIO bucket and access keys
  • Sets up monitoring cron job (runs every 5 minutes)
  • Runs database migrations and preflight checks
  • Displays QR code for ntfy.sh push notification channel

The script is idempotent and can be safely run multiple times. It expects to be run as root and requires a properly configured environment file as its first argument.

Previous
Deploy