# Self-host VoidAuth

> A self-hosted single sign-on and identity provider with OIDC, passkeys, user invitations and self-service profiles, backed by Postgres. Create the first admin from the invitation link printed in the container log.

- Page: https://levelrail.com/templates/voidauth/
- JSON: https://levelrail.com/templates/voidauth.json
- Category: Security
- Licence: AGPL-3.0-or-later (Network copyleft (AGPL) license)
- Source: https://github.com/voidauth/voidauth
- Upstream docs: https://voidauth.app/

## 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 |
| voidauth | voidauth/voidauth | 1.19.1 | 3000 | config -> /app/config |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| db | POSTGRES_PASSWORD | generated |
| voidauth | APP_URL | preset |
| voidauth | DB_ADAPTER | preset |
| voidauth | DB_HOST | preset |
| voidauth | DB_PASSWORD | generated |
| voidauth | STORAGE_KEY | generated |

## Deploy

### CLI

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

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/voidauth/install \
  -d '{
    "name": "my-voidauth"
  }'
```

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

## First run
1. Read the first admin invitation link from the voidauth container log, open it and set the admin password.

## Questions

### Can I deploy VoidAuth 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 VoidAuth, 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, voidauth/voidauth:1.19.1 is what you deploy there.

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