Skip to content

Installing sc-cms

A site needs three things: PostgreSQL 18, file storage (a disk or an S3-compatible bucket), and the sc-cms app. The app runs as two processes from the same image: web serves the site and admin, and worker does background work such as image resizing, scheduled publishing, email, and backups. Nothing else is required: no Redis, no search server.

On a server with Docker installed, from a copy of the repository:

Terminal window
export APP_SECRET=$(openssl rand -hex 32) # keep a copy somewhere safe
export SITE_URL=https://www.example.com
docker compose -f docker/compose.yml up -d --build

This starts PostgreSQL, runs database migrations once, then starts web (port 4321) and worker. Put a reverse proxy or load balancer with HTTPS in front of port 4321.

Then open https://www.example.com/admin. The first visit runs the setup wizard.

Every setting is an environment variable, checked when the app starts. The full annotated list is in .env.example.

Setting What it does
SITE_URL The public address of the site, used for links in emails, sitemaps, and feeds.
APP_SECRET 32 or more random characters. Required.
STORAGE_DRIVER local (a disk folder) or s3 (any S3-compatible bucket). Use s3 if you run more than one web server.
SMTP_URL, MAIL_FROM Outgoing email for invitations and password resets. Without SMTP_URL, emails are only written to the log.
MEDIA_MAX_BYTES Largest upload accepted (default 50 MB).
BACKUP_* Backup schedule, retention, encryption, and where backups are stored. See Backups and recovery.
TRUSTED_PROXY_HOPS How many proxies (CDN, load balancer) sit in front, so rate limits and the activity log see real visitor addresses.
OIDC_* Single sign-on. See Single sign-on.
TURNSTILE_SITE_KEY, TURNSTILE_SECRET_KEY Turns on a bot check (Cloudflare Turnstile) for member sign-up and contact forms. Get both keys free under Turnstile in the Cloudflare dashboard.
ANTHROPIC_API_KEY Turns on AI assistance.
APP_ENV=staging Marks a copy of production that must never email anyone or contact outside services.