Skip to content

Quickstart: self-host

Run the open-source Sypnia engine on your own machine with Docker, create a project, and see your first session and your first problem.

Applies to Engine
View as Markdown
On this page
  1. Write the Compose file
  2. Start it
  3. Check the setup
  4. Create a project and a token
  5. Add the SDK to your app
  6. Open your app and check that it sends
  7. Cause your first problem, and see it
  8. What you have, and what you do not
  9. Do these next

Engine This page is for anyone who wants to run Sypnia themselves. It starts the open-source engine on your own machine with Docker, next to its database and its storage, so you can try the whole thing before you choose where it will live. If you would rather not run servers, use the Sypnia Cloud quickstart; the snippet in your app is the same.

At the end you will have: the engine running at http://localhost:8080, a project with its keys, your app sending to it, and your first session and problem in the Console.

You need: Docker with Compose, a web app you can edit and run on the same machine, and about fifteen minutes.

  1. Write the Compose file

    In an empty folder, create this file. It starts three things: the engine, a Postgres for the numbers, and SeaweedFS as the S3-compatible store for raw events and recordings. SeaweedFS creates the bucket sypnia and the access key the engine uses when it first starts, and the engine waits until the bucket is there.

    compose.yaml
    services:
      sypnia:
        image: ghcr.io/sespinosav/sypnia-telemetry:1
        ports: ["8080:8080"]
        environment:
          SYPNIA_BASE_URL: http://localhost:8080
          SYPNIA_ROOT_TOKEN: change-me-to-a-long-random-string
          SYPNIA_AUTO_MIGRATE: "true"
          SYPNIA_DATABASE_URL: postgres://sypnia:sypnia@db:5432/sypnia
          SYPNIA_STORAGE_BUCKET: sypnia
          SYPNIA_STORAGE_ENDPOINT: http://store:8333
          SYPNIA_STORAGE_PUBLIC_ENDPOINT: http://localhost:8333
          SYPNIA_STORAGE_PATH_STYLE: "true"
          SYPNIA_STORAGE_ACCESS_KEY_ID: sypnia
          SYPNIA_STORAGE_SECRET_ACCESS_KEY: sypnia-secret
        depends_on:
          db: { condition: service_healthy }
          store: { condition: service_healthy }
    
      db:
        image: postgres:16
        environment:
          POSTGRES_USER: sypnia
          POSTGRES_PASSWORD: sypnia
          POSTGRES_DB: sypnia
        volumes: ["db:/var/lib/postgresql/data"]
        healthcheck:
          test: ["CMD-SHELL", "pg_isready -U sypnia"]
          interval: 2s
          retries: 30
    
      store:
        image: chrislusf/seaweedfs:4.53
        command: mini -dir=/data -s3.allowedOrigins=http://localhost:8080
        ports: ["8333:8333"]
        environment:
          AWS_ACCESS_KEY_ID: sypnia
          AWS_SECRET_ACCESS_KEY: sypnia-secret
          S3_BUCKET: sypnia
        volumes: ["bucket:/data"]
        healthcheck:
          test: ["CMD", "curl", "-fs", "-o", "/dev/null", "http://localhost:8888/buckets/sypnia/"]
          interval: 2s
          retries: 60
    
    volumes:
      db:
      bucket:

    Every SYPNIA_… line is a setting of the engine, explained in the configuration reference. The engine needs nothing else: no queue, no cache, no search server.

  2. Start it

    Terminal
    docker compose up -d
    curl -i http://localhost:8080/healthz
    You should see
    HTTP/1.1 200 OK. The first start takes up to a minute while the images download and the engine creates its tables.
  3. Check the setup

    Terminal
    docker compose exec sypnia sypnia doctor --skip ai
    You should see
    Text
    config    ok    10 settings read, 0 unknown
    database  ok    postgres 16.16, schema 12 (up to date), 2 ms
    storage   ok    s3://sypnia: put, get, delete, presign
    address   ok    http://localhost:8080/healthz answered 200
    pipeline  ok    last pass 9 s ago, lag 0 s, 0 quarantined, 0 failed hours, 0 dead jobs
    queue     skip  SYPNIA_INTAKE_QUEUE_URL is not set (one process: the buffer is in memory)
    webhook   skip  SYPNIA_ALERT_WEBHOOK_URL is not set (alerts are recorded only)
    clock     ok    0.1 s from the database's clock
    all checks passed

    A line that says FAIL names the setting to change. The AI check is skipped because no model key is set yet: the engine works without one, and problems then keep their technical title. Connecting a model is in Models and what is sent.

  4. Create a project and a token

    Terminal
    docker compose exec sypnia sypnia project create --name Shop
    You should see
    Text
    project     shop (prj_5k2m9x4q7w1z)
    ingest key  spk_7d1f0c9e4b8a2f6d3c5e1a9b0f4d8c2e
    
    Put the ingest key in your app. It is public: it can only send.
    Next: sypnia token create --project shop --name "My laptop" --scopes read,replay

    The ingest key goes into your app. To read what arrives you need an API token:

    Terminal
    docker compose exec sypnia sypnia token create --project shop --name "My laptop" --scopes read,replay
    You should see
    A line that starts with sps_. It is shown once: copy it now. It is a secret.
  5. Add the SDK to your app

    The fastest way is to let your coding agent do this step: pick your agent, paste what the tab shows, and give it the ingest key and the address of your engine when it asks.

    Claude Code

    1. Add the Sypnia skills

      claude plugin marketplace add sespinosav/sypnia-skills
      claude plugin install sypnia@sypnia
    2. Connect the MCP server

      claude mcp add --transport http sypnia \
        https://mcp.sypnia.com \
        --header "Authorization: Bearer YOUR_API_TOKEN"

    Then say: «Set up Sypnia in this project».

    Or do it by hand:

    npm

    npm install @sypnia/telemetry
    import { init } from '@sypnia/telemetry/browser';
    
    init({ project: 'YOUR_PROJECT_KEY' });

    Put the init call where your app starts, before it renders. Use your own ingest key, and point the SDK at your engine with endpoint:

    src/main.ts
    import { init } from '@sypnia/telemetry/browser';
    
    init({
      project: 'spk_7d1f0c9e4b8a2f6d3c5e1a9b0f4d8c2e',
      endpoint: 'http://localhost:8080',
      environment: location.hostname === 'localhost' ? 'development' : 'production',
    });

    With the script tag instead, load it from your engine: src="http://localhost:8080/v1/sdk.js" and data-endpoint="http://localhost:8080".

    endpoint is the only difference from Sypnia Cloud. The SDK is the same package.

  6. Open your app and check that it sends

    Run your app, open it in a browser, and click on a few things. Open the developer tools, tab Network, and type ingest in the filter.

    You should see
    Within 10 seconds, a POST to http://localhost:8080/v1/ingest/events with status 200 and an answer like {"accepted": 5, "dropped": 0}.
  7. Cause your first problem, and see it

    Add one line after init, save, and reload your app once. Then remove it.

    src/main.ts
    import { init, reportError } from '@sypnia/telemetry/browser';
    
    // after init({ … })
    reportError(new Error('Sypnia test: the cart total is missing'));

    Open the Console at http://localhost:8080/console, paste your API token, and choose the environment development.

    You should see
    Within 2 minutes, one problem: Error: Sypnia test: the cart total is missing, 1 person, 1 occurrence. Within 10 minutes, your session, with the pages you opened and what you clicked. Once the session has been idle for 2 minutes, its replay plays in the Console: the error started the recording.

    The same from the command line:

    Terminal
    docker compose exec -e SYPNIA_API_TOKEN=<your sps_ token> sypnia sypnia problems --environment development

What you have, and what you do not

The Sypnia engine and Sypnia Cloud compared
Sypnia engineOpen source, self-hostedSypnia CloudPaid service, with a free tier
Receiving, storing, grouping into problems, sessions, replaysRunning on your machine.The same engine, run by us.
Where you read itThe Console (problems and replays), the API, the CLI and the MCP server.The full app.
The sentence in plain words and the promptAfter you set your own model key.Included.
AlertsRecorded, and sent to a webhook if you set one. No e-mail in the default deployment.E-mail and in the app.
Pull requestsNot in the engine. Use the prompt or MCP with your own coding agent.Opened by the Sypnia GitHub App, on the Builder and Team plans, in projects that turn them on.

The whole comparison is in Open source and Sypnia Cloud.

Do these next

To getDo
A deployment that others can reach, with HTTPSDeploy with Docker or Deploy on AWS
The sentence in plain wordsSet a model key: Models and what is sent
An e-mail when something breaksAlert e-mails from a self-hosted engine
Your coding agent reading problemsInstall with your coding agent
The whole loop once, with a rage click and a replayYour first problem
Your own file names in stacksSource maps in CI

To stop the trial: docker compose down. Add -v to delete its data too.

  1. Write the Compose file
  2. Start it
  3. Check the setup
  4. Create a project and a token
  5. Add the SDK to your app
  6. Open your app and check that it sends
  7. Cause your first problem, and see it
  8. What you have, and what you do not
  9. Do these next

    Search pages, sections and terms