Self-hosted observability backend for ErrorSight SDKs. Written in Go with support for SQLite (default) and PostgreSQL.
- OAuth2 client credentials flow for SDK authentication
- JWT-based admin authentication with refresh tokens
- Single-registration mode (first user becomes admin, then locks)
- Log ingestion with batch support
- Screenshot upload and storage
- Gotify push notification integration
- Dashboard stats, top exceptions, and daily error trends
- Configurable via environment variables
- Go 1.26+ (for local development)
- Docker & Docker Compose (for deployment)
- Clone the repository:
git clone https://github.com/ErrorSight/api.git
cd api- Create your environment file:
cp .env.example .envEdit .env and set a strong ES_JWT_SECRET.
- Start the development stack (SQLite):
docker-compose up -d- Start the production stack (PostgreSQL + Traefik + Redis + Gotify):
docker-compose -f docker-compose.prod.yml up -dThe API will be available at http://localhost:8080 in development, or at your configured DOMAIN in production.
All configuration is done via environment variables:
| Variable | Default | Description |
|---|---|---|
DOMAIN |
api.errorsight.io |
Domain served by Traefik |
ACME_EMAIL |
contact@errorsight.io |
Let's Encrypt contact email |
ES_SERVER_PORT |
8080 |
HTTP server port |
ES_DATABASE_DSN |
host=db ... |
PostgreSQL connection string |
ES_REDIS_ADDR |
redis:6379 |
Redis server address |
ES_REDIS_PASSWORD |
- | Redis password (optional) |
ES_JWT_SECRET |
- | Required. Secret key for signing JWTs |
ES_JWT_ACCESS_TTL |
15m |
Access token lifetime |
ES_JWT_REFRESH_TTL |
168h |
Refresh token lifetime |
ES_BASE_URL |
https://api.errorsight.io |
Base URL for screenshot links |
ES_STORAGE_PATH |
/data/screenshots |
Screenshot storage directory |
ES_GOTIFY_URL |
http://gotify:80 |
Internal Gotify URL |
ES_GOTIFY_APP_TOKEN |
- | Gotify application token |
ES_GOTIFY_ENABLED |
true |
Enable push notifications |
GOTIFY_USER |
admin |
Gotify admin username |
GOTIFY_PASS |
admin |
Gotify admin password |
After starting the production stack:
- Obtain a Gotify app token by creating an application inside Gotify.
- Set
ES_GOTIFY_APP_TOKENin your.env. - Restart the API:
docker-compose -f docker-compose.prod.yml restart api.
GET /healthPOST /api/v1/auth/register # First user only
POST /api/v1/auth/login
POST /api/v1/auth/refreshGET /api/v1/admin/config
PATCH /api/v1/admin/configPOST /api/v1/projects
GET /api/v1/projects
GET /api/v1/projects/:id
PATCH /api/v1/projects/:id
DELETE /api/v1/projects/:idGET /api/v1/dashboard/stats
GET /api/v1/dashboard/top-exceptions?limit=10
GET /api/v1/dashboard/daily-errors?days=30POST /oauth/token # client_credentialsPOST /v1/logs
GET /v1/logs?level=ERROR&limit=50
POST /v1/screenshotsThis API is designed to work with the official ErrorSight SDKs:
MIT License. Copyright (c) 2026 Aztekode.