# Self-host Svix

> A webhooks sending service with retries, signatures, a message log and an HTTP API, backed by Postgres and Redis. Create applications and send events through the API with a token signed by your JWT secret.

- Page: https://levelrail.com/templates/svix/
- JSON: https://levelrail.com/templates/svix.json
- Category: Developer Tools
- Licence: MIT (Permissive license)
- Source: https://github.com/svix/svix-webhooks
- Upstream docs: https://docs.svix.com/

## Requirements
- Memory: about 384 MiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: no
- Pinned image tag: 17.11-alpine

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| db | postgres | 17.11-alpine | none | pgdata -> /var/lib/postgresql/data |
| redis | redis | 7.4.7-alpine | none | redis_data -> /data |
| svix | svix/svix-server | v1.105.0 | 8071 | none |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| db | POSTGRES_DB | preset |
| db | POSTGRES_PASSWORD | generated |
| db | POSTGRES_USER | preset |
| svix | SVIX_DB_DSN | generated |
| svix | SVIX_JWT_SECRET | generated |
| svix | SVIX_REDIS_DSN | preset |
| svix | WAIT_FOR | preset |

## Deploy

### CLI

```bash
levelrail-cli templates install svix --name my-svix
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain db=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/svix/install \
  -d '{
    "name": "my-svix"
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## First run
1. Create an API token with the svix-server jwt generate command inside the container, then call the API at the published port.

## Questions

### Can I deploy Svix on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Svix, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image postgres:17.11-alpine, redis:7.4.7-alpine, svix/svix-server:v1.105.0 is what you deploy there.

Self-host Svix, Svix docker compose file, deploy Svix on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
