Vaulx is configured entirely through environment variables — there is no YAML or TOML config file. On startup the server loads variables from aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/noelzappy/vaulx/llms.txt
Use this file to discover all available pages before exploring further.
.env file in the working directory if one is present (via godotenv), and then falls back to the process environment. This means the same binary works identically in local development, Docker Compose, and production PaaS deployments like Dokploy without any code changes.
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_URL | Yes | — | Postgres connection string, e.g. postgres://user:pass@host:5432/db?sslmode=disable |
SESSION_SECRET | Yes | — | Random string ≥ 32 chars used to sign and verify session cookies |
PORT | No | 8080 | HTTP listen port |
SEED_ADMIN_EMAIL | No | — | Email for the admin account seeded on first boot. If unset, seeding is skipped. |
SEED_ADMIN_PASSWORD | No | — | Password for the seeded admin. If unset, seeding is skipped. No length or complexity check is enforced at seed time. |
HETZNER_ACCESS_KEY | Yes | — | Hetzner Object Storage access key |
HETZNER_SECRET_KEY | Yes | — | Hetzner Object Storage secret key |
HETZNER_S3_ENDPOINT | Yes | — | Storage endpoint URL, e.g. https://fsn1.your-objectstorage.com |
HETZNER_BUCKET | Yes | — | Bucket name |
A complete Copy
.env file for local development looks like this:.env.example from the repository root and fill in your values before the first run.Session configuration
Sessions are backed by PostgreSQL usingpgstore. The store is initialised in main.go with the following options:
| Setting | Value | Notes |
|---|---|---|
MaxAge | 86400 * 7 (7 days) | Sessions expire after one week |
HttpOnly | true | Cookie is not accessible via JavaScript |
SameSite | Lax | Protects against most CSRF vectors |
Secure | true | Cookie is only sent over HTTPS |
| Cleanup interval | 5 minutes | Expired session rows are pruned automatically |
Storage configuration
Vaulx uses the AWS SDK for Go v2 (aws-sdk-go-v2) with a custom endpoint, which makes it compatible with any S3-compatible object store.
- Supported backends
- CORS
- S3 key paths
| Backend | How to configure |
|---|---|
| Hetzner Object Storage | Set HETZNER_S3_ENDPOINT to your region endpoint, e.g. https://fsn1.your-objectstorage.com |
| AWS S3 | Point HETZNER_S3_ENDPOINT to the standard AWS regional endpoint for your bucket |
| MinIO | Point HETZNER_S3_ENDPOINT to your MinIO server URL |
Rate limiting
Vaulx usesgo-chi/httprate to apply per-IP rate limits on endpoints that are either sensitive or computationally expensive. Limits are configured in main.go:
| Route | Method | Limit |
|---|---|---|
/auth/login | POST | 10 requests per IP per minute |
/s/{slug}/zip/prepare | POST | 5 requests per IP per minute |
429 Too Many Requests. No configuration is needed — the limits are fixed in the source.
Database
Vaulx requires PostgreSQL 16. The connection is established via thepgx/v5 driver using the DATABASE_URL environment variable.
Automatic migrations
Migrations are embedded directly in the compiled binary using Go’s
embed.FS and executed automatically at startup via golang-migrate. There is no separate migration step or CLI command — the database is always up to date when the server starts.Session storage
The
pgstore session backend creates its own http_sessions table in the same database. No additional setup is required — the table is created by pgstore on first use. Sessions are cleaned up every 5 minutes by a background goroutine.