# Self-host Wakapi

> A self-hosted, WakaTime-compatible backend for tracking coding time and stats.

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

## Requirements
- Memory: about 256 MiB
- amd64: published, arm64: tested
- Needs configuration before start: no
- Pinned image tag: 2.13.0

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| db | postgres | 16-alpine | none | wakapi_db_data -> /var/lib/postgresql/data |
| wakapi | ghcr.io/muety/wakapi | 2.13.0 | 3000 | wakapi_data -> /data |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| db | POSTGRES_DB | preset |
| db | POSTGRES_PASSWORD | generated |
| db | POSTGRES_USER | generated |
| wakapi | WAKAPI_DB_HOST | preset |
| wakapi | WAKAPI_DB_NAME | preset |
| wakapi | WAKAPI_DB_PASSWORD | generated |
| wakapi | WAKAPI_DB_PORT | preset |
| wakapi | WAKAPI_DB_TYPE | preset |
| wakapi | WAKAPI_DB_USER | generated |
| wakapi | WAKAPI_SECURITY_PASSWORD_SALT | generated |

## Deploy

### CLI

```bash
levelrail-cli templates deploy wakapi --name my-wakapi
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/wakapi/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

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

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id wakapi for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image postgres:16-alpine, ghcr.io/muety/wakapi:2.13.0 is what you deploy there.

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