Deploying a Vikunja App
Introduction
Vikunja is an open-source task management platform with a lightweight API and web UI. This guide shows how to containerize Vikunja, connect it to PostgreSQL (and optionally Redis), persist uploads, and deploy it to Klutch.sh over HTTP.
Prerequisites
- GitHub repository containing your Dockerfile.
- PostgreSQL database (managed or deployed separately).
- Optional Redis instance for rate limiting and caching.
- Klutch.sh project ready in klutch.sh/app.
Project structure
.└── DockerfileSample Dockerfile
FROM vikunja/api:latest
# Default Vikunja portENV VIKUNJA_HTTP_PORT=3456EXPOSE 3456Required environment variables
VIKUNJA_DATABASE_TYPE=postgresVIKUNJA_DATABASE_HOST– database hostVIKUNJA_DATABASE_DATABASE– database nameVIKUNJA_DATABASE_USERVIKUNJA_DATABASE_PASSWORDVIKUNJA_SERVICE_JWTSECRET– strong secret for tokensVIKUNJA_SERVICE_FRONTENDURL– e.g.,https://example-app.klutch.shVIKUNJA_HTTP_PORT=3456
Optional environment variables
VIKUNJA_REDIS_ENABLED=trueand Redis connection settingsVIKUNJA_SERVICE_ENABLEREGISTRATION=falseto control signupsVIKUNJA_LOG_LEVEL=info
Persistence
If you store file uploads locally, attach a volume:
- Mount path:
/app/vikunja/files - Size: based on expected attachment volume
Networking
- Protocol: HTTP
- Internal port:
3456 - Users reach
https://example-app.klutch.shwhile Klutch.sh routes to port3456inside the container.
Health check (recommended)
curl -I http://localhost:3456/healthDeployment on Klutch.sh
- Push your Dockerfile to GitHub.
- In klutch.sh/app, create a new app and select GitHub as the source.
- Klutch.sh automatically detects the Dockerfile in the repository root.
- Select HTTP traffic and set the internal port to
3456. - Add environment variables for database connection,
VIKUNJA_SERVICE_JWTSECRET, andVIKUNJA_SERVICE_FRONTENDURL. Add Redis variables if used. Mark sensitive values as secrets. - Attach a persistent volume at
/app/vikunja/filesif storing uploads locally. - Deploy. After the app starts, create your admin user via the UI.
Verification
-
UI: open
https://example-app.klutch.shand confirm the login/setup screen loads. -
Health:
Terminal window curl -I https://example-app.klutch.sh/health
Next steps
- Configure registration policies and JWT rotation.
- Enable Redis to improve performance and rate limiting.
- Set up database backups and volume backups for file uploads.