Skip to main content

Deploy as a Website

Deploy your systemprompt template to production with user authentication, custom domains, and SSL. Ship your AI agents to real users.

Ship your systemprompt template to production. This guide walks you through deploying to systemprompt.io Cloud with user authentication and optional custom domains.

Prerequisites

  • Working local instance (just start runs successfully)
  • GitHub or Google account (for cloud authentication)
  • Optional: Custom domain with DNS access

Step 1: Register and Login

First, authenticate with systemprompt.io Cloud:

systemprompt cloud auth login

This opens your browser for GitHub or Google OAuth. Registration is free and grants you:

  • Cloud tenant hosting
  • Managed PostgreSQL database
  • Wildcard SSL on *.systemprompt.io
  • Basic usage tier

Step 2: Create a Cloud Tenant

Create your production tenant:

# Create a cloud tenant (provisions managed database)
systemprompt cloud tenant create --region iad

# Available regions:
# iad - US East (Virginia)
# sjc - US West (San Jose)
# ams - Europe (Amsterdam)

This provisions:

  • Dedicated PostgreSQL database
  • Subdomain: {tenant-id}.systemprompt.io
  • SSL certificate (automatic)

View your tenant details:

systemprompt cloud tenant show

Step 3: Configure Your Production Profile

Creating a tenant provisions the cloud-managed database, so your production profile needs no DATABASE_URL configuration. Inspect and adjust profiles with:

systemprompt cloud profile list
systemprompt cloud profile show
systemprompt cloud profile edit

Add any required secrets as KEY=VALUE pairs:

# Add AI provider API keys
systemprompt cloud secrets set ANTHROPIC_API_KEY=sk-ant-... --profile production
systemprompt cloud secrets set OPENAI_API_KEY=sk-... --profile production

# Or sync everything from the profile's secrets.json
systemprompt cloud secrets sync --profile production

Step 4: Deploy

Deploy with a single command:

# Optional: run the pre-deploy preflight first
systemprompt cloud doctor --profile production

systemprompt cloud deploy --profile production

What happens:

  1. Preflight - Check configuration for errors
  2. Sync - Pull runtime state from cloud before deploying
  3. Build - Create Docker image (Rust compilation)
  4. Push - Upload to systemprompt registry
  5. Deploy - Start containers, zero-downtime

Watch the deployment progress in real-time. First deployment takes 3-5 minutes.

Step 5: Verify Deployment

Check your deployment status:

# View status
systemprompt cloud status

# Check the cloud database connection
systemprompt cloud db status

# Visit your site
open https://{tenant-id}.systemprompt.io

User Authentication

Your deployed site includes authentication out of the box. Users sign in at /admin/login via OAuth 2.0 Authorization Code with PKCE, and can also use:

  • Magic links (email)
  • WebAuthn (passkeys)

There is no password form to configure. See the Authentication Documentation for details on providers and session handling.

Custom Domain Setup

Step 1: Set the Domain on Your Tenant

systemprompt cloud domain set yourdomain.com

Step 2: Configure DNS

Add these DNS records at your domain registrar:

Type Name Value
CNAME www {tenant-id}.systemprompt.io
CNAME @ {tenant-id}.systemprompt.io

For root domains (apex), some DNS providers require an ALIAS or ANAME record instead of CNAME.

Step 3: Verify and Enable SSL

# Check domain and TLS certificate status
systemprompt cloud domain status

SSL is provisioned automatically once DNS resolves to your tenant.

DNS propagation can take up to 48 hours, though it's usually much faster.

Update and Redeploy

After making changes locally:

# Test locally first
just build
systemprompt infra services restart

# Deploy updates
systemprompt cloud deploy --profile production

To preview what a deploy would sync without shipping it:

systemprompt cloud deploy --profile production --dry-run

Rollback

If something goes wrong, redeploy a known-good commit:

git checkout <last-good-ref>
systemprompt cloud deploy --profile production

Troubleshooting

Build fails

# Test build locally first
just build --release

# Run the pre-deploy preflight without deploying
systemprompt cloud deploy --profile production --check

Site unreachable

# Check deployment status
systemprompt cloud status

# Check the cloud database
systemprompt cloud db status

# Check health endpoint
curl https://{tenant-id}.systemprompt.io/health

Authentication not working

  1. Confirm the site is reachable over HTTPS (OAuth callbacks require it)
  2. If you set a custom domain, verify it with systemprompt cloud domain status
  3. Check that required secrets synced to the tenant with systemprompt cloud secrets sync --profile production

Licensing

Cloud deployment is available under a commercial license. Contact ed@systemprompt.io to discuss terms.

Next Steps