Self-hosting

Ticket Cricket ships as a Docker Compose stack: the bot, the dashboard, PostgreSQL, Redis, a Caddy reverse proxy with automatic HTTPS, and a nightly database backup.

Requirements

  • A Linux VPS with Docker and Docker Compose (2 GB RAM is plenty to start).
  • A domain pointing at the server (for HTTPS and Discord login).
  • A Discord application (bot token, client ID, client secret).
  • Optional: a Stripe account for paid plans.

Steps

  1. Clone the repository and copy .env.example to .env. Fill in the Discord values, set DASHBOARD_URL=https://your-domain, DOMAIN=your-domain, and generate secrets for AUTH_SECRET and TOKEN_ENCRYPTION_KEY.
  2. In the Discord Developer Portal add https://your-domain/api/auth/callback under OAuth2 → Redirects and enable Message Content Intent on the Bot page.
  3. Run docker compose --profile prod up -d --build. The migrate service applies database migrations before the bot and dashboard start.
  4. Register the slash commands once: docker compose --profile prod run --rm bot node dist/deploy-commands.js.
  5. Open https://your-domain, log in with Discord and add the bot to a server.

For Stripe, create four recurring prices (Premium/All Access × monthly/yearly), paste their IDs into .env, and add a webhook endpoint for https://your-domain/api/stripe/webhook with the events checkout.session.completed, customer.subscription.created, customer.subscription.updated, customer.subscription.deleted and invoice.paid.

The full deployment guide with backup and upgrade steps is in docs/DEPLOYMENT.md in the repository.

Self-hosting · Docs · Ticket Cricket