Deploying a Pretix App
Introduction
Pretix is an open-source ticketing and event management platform with payments, seating, and scanning support. Deploying Pretix with a Dockerfile on Klutch.sh gives you reproducible builds, managed secrets, and persistent storage—all configured from klutch.sh/app. This guide covers installation, Dockerfile setup, environment variables, storage, Nixpacks overrides, and sample requests to verify your instance.
Prerequisites
- A Klutch.sh account (sign up)
- A GitHub repository containing your Pretix Dockerfile (GitHub is the only supported git source)
- External PostgreSQL database and Redis
- Domain and TLS for attendee-facing flows
For onboarding, see the Quick Start.
Architecture and ports
- Pretix serves HTTP on internal port
80in the standalone image. Choose HTTP traffic and set the internal port to80. - Persistent storage is required for uploaded media, invoices, and configuration; databases live in Postgres, caching in Redis.
Repository layout
pretix/├── Dockerfile # Must be at repo root for auto-detection└── README.mdKeep secrets out of Git; store them in Klutch.sh environment variables.
Installation (local) and starter commands
Build and run locally (ensure Postgres/Redis are reachable):
docker build -t pretix-local .docker run -p 8080:80 \ -e DATABASE_URL=postgres://user:pass@localhost:5432/pretix \ -e REDIS_URL=redis://localhost:6379/0 \ -e SECRET_KEY=$(openssl rand -hex 32) \ pretix-localDockerfile for Pretix (production-ready)
Place this at the repo root; Klutch.sh auto-detects Dockerfiles.
FROM pretix/standalone:stable
ENV PRETIX_DISABLE_LOCAL_CDN=trueENV PRETIX_LANGUAGE=enENV PRETIX_COUNTRY=USENV PRETIX_TIMEZONE=UTC
EXPOSE 80CMD ["/entrypoint.sh"]Notes:
- Pin to a specific tag (e.g.,
pretix/standalone:4.19.0) for predictable upgrades. /entrypoint.shstarts Pretix on port 80 inside the container.
Environment variables (Klutch.sh)
Configure these before deploying:
PORT=80DATABASE_URL=postgres://<user>:<password>@<host>:5432/<db>REDIS_URL=redis://<host>:6379/0SECRET_KEY=<secure-random-hex>PRETIX_LANGUAGE=enPRETIX_COUNTRY=USPRETIX_TIMEZONE=UTC- Optional email settings:
MAIL_FROM,SMTP_HOST,SMTP_PORT,SMTP_USER,SMTP_PASSWORD,SMTP_TLS=true
If deploying without the Dockerfile and relying on Nixpacks:
NIXPACKS_START_CMD=/entrypoint.sh
Attach persistent volumes
Add storage in Klutch.sh (path and size only):
/data— media, invoices, and generated files./etc/pretix— configuration overrides (if you mount custom settings).
Ensure the paths are writable inside the container.
Deploy Pretix on Klutch.sh (Dockerfile workflow)
- Push your repository—with the Dockerfile at the root—to GitHub.
- Open klutch.sh/app, create a project, and add an app.
- Select HTTP traffic and set the internal port to
80. - Add the environment variables above (database, Redis, secret key, locale, and email settings).
- Attach volumes at
/dataand/etc/pretixsized for your media and configuration needs. - Deploy. Access your app at
https://example-app.klutch.shand complete the Pretix setup wizard.
Sample checks
Landing/health check:
curl -I https://example-app.klutch.shIf you expose an API endpoint (replace as needed):
curl -I https://example-app.klutch.sh/api/v1/healthHealth checks and production tips
- Add an HTTP readiness probe to
/(or your health endpoint) to confirm the app is serving. - Keep
SECRET_KEY, DB, Redis, and SMTP credentials in Klutch.sh secrets; rotate them regularly. - Enforce HTTPS at the edge; back up your Postgres database and export
/datafor disaster recovery. - Pin image tags and test upgrades in staging before production rollout.
- Monitor volume usage on
/dataand/etc/pretix; resize proactively.
Pretix on Klutch.sh gives you reproducible Docker builds, managed secrets, and persistent storage—without extra YAML or CI steps. Configure ports, env vars, and storage, then launch your ticketing platform.