Skip to content

Quickstart: self-host

Run the open-source engine with Docker next to a Postgres of yours, create a project and make your first request.

Applies to Engine
View as Markdown
On this page
  1. Get the compose file and its settings
  2. Start it
  3. Create the project's keys
  4. Make your first request

You need Docker and ten minutes. The repository’s compose file runs Postgres 16, the engine and Mailpit, which catches every e-mail. The same engine works against any Postgres 14+ you already run: point DATABASE_URL at it.

  1. Get the compose file and its settings

    Terminal
    git clone https://github.com/sespinosav/sypnia-data && cd sypnia-data
    cp .env.example .env

    In .env, set SYPNIA_DATA_MASTER_KEY to the output of openssl rand -base64 32 (keep it: it encrypts the signing keys) and POSTGRES_PASSWORD to another random value.

  2. Start it

    Terminal
    docker compose up -d
    curl http://localhost:8080/health
    You should see
    {"status":"ok"}. On its first start the engine installed its schema in the database.
  3. Create the project's keys

    Terminal
    docker compose exec data sypnia-data keys api-key --kind publishable
    docker compose exec data sypnia-data keys api-key --kind secret
    You should see
    A publishable key syp_pk_default_… and a secret key syp_sk_default_…. The secret key is shown once.
  4. Make your first request

    Terminal
    curl http://localhost:8080/auth/v1/settings -H "apikey: syp_pk_…"
    You should see
    JSON with "email": true among the providers and "signup_open": true. Sign-up e-mails appear in Mailpit at http://localhost:8025.

From here the quickstart for Sypnia Cloud applies unchanged from step 3, with http://localhost:8080 as the address. Going to production: Self-hosting.

  1. Get the compose file and its settings
  2. Start it
  3. Create the project's keys
  4. Make your first request

    Search pages, sections and terms