Skip to content

Install

You need:

  • A Linux server with Docker and 2 GB of RAM.
  • A domain name, like playdex.example.com, whose DNS points at the server.
  • Ports 80 and 443 open.
  1. Get the files

    Terminal window
    mkdir playdex && cd playdex
    base=https://raw.githubusercontent.com/ivankaizer/playdex/main/selfhost
    curl -fsSLO $base/docker-compose.yml
    curl -fsSLO $base/Caddyfile
    curl -fsSL $base/.env.example -o .env
  2. Fill in .env

    Three values are required:

    .env
    PLAYDEX_DOMAIN=playdex.example.com
    POSTGRES_PASSWORD= # openssl rand -hex 32
    JWT_SECRET= # openssl rand -hex 32

    Everything else is optional. See Configuration.

  3. Start it

    Terminal window
    docker compose up -d

    Caddy gets a certificate on its own. The API sets up the database on first start.

  4. Check it

    Terminal window
    curl https://playdex.example.com/api/
    # {"data":"Ok","error":null}
  5. Create your account

    There is no public sign-up. Make yourself an admin:

    Terminal window
    docker compose exec app dotnet Api.dll create-user [email protected] --admin

    It prints a generated password once. To choose your own, pipe it in:

    Terminal window
    echo 'my password' | docker compose exec -T app dotnet Api.dll create-user [email protected] --admin
  6. Sign in

    Open https://playdex.example.com. The admin console is at /admin.

Next: connect your platforms.