Deploying a Redash App
Introduction
Redash is an open-source analytics and dashboarding platform that connects to numerous data sources. Deploying Redash with a Dockerfile on Klutch.sh provides 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 checks.
Prerequisites
- A Klutch.sh account (sign up)
- A GitHub repository containing your Redash Dockerfile (GitHub is the only supported git source)
- External PostgreSQL (metadata) and Redis (queues)
- Domain and TLS for secure access
For onboarding, see the Quick Start.
Architecture and ports
- Redash web/worker image serves HTTP on internal port
5000. Choose HTTP traffic and set the internal port to5000. - Persistent storage is optional (for logs); primary data lives in Postgres and Redis.
Repository layout
redash/├── 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 redash-local .docker run -p 5000:5000 \ -e REDASH_WEB_WORKERS=1 \ -e REDASH_DATABASE_URL=postgres://user:pass@localhost:5432/redash \ -e REDASH_REDIS_URL=redis://localhost:6379/0 \ -e REDASH_COOKIE_SECRET=$(openssl rand -hex 32) \ -e REDASH_SECRET_KEY=$(openssl rand -hex 32) \ redash-localDockerfile for Redash (production-ready)
Place this at the repo root; Klutch.sh auto-detects Dockerfiles.
FROM redash/redash:latest
ENV PYTHONUNBUFFERED=1ENV REDASH_WEB_WORKERS=1
EXPOSE 5000CMD ["server"]Notes:
- Pin to a specific tag (e.g.,
redash/redash:10.1.0.b50633) for stability. serverruns the web server; worker execution relies on Redis and the same image—deploy a second app if you need a dedicated worker process.
Environment variables (Klutch.sh)
Set these before deploying:
PORT=5000REDASH_DATABASE_URL=postgres://<user>:<password>@<host>:5432/<db>REDASH_REDIS_URL=redis://<host>:6379/0REDASH_COOKIE_SECRET=<secure-random-hex>REDASH_SECRET_KEY=<secure-random-hex>- Optional:
REDASH_WEB_WORKERS=2,REDASH_MAIL_DEFAULT_SENDER,REDASH_MAIL_SERVER,REDASH_MAIL_USERNAME,REDASH_MAIL_PASSWORD,REDASH_MAIL_PORT,REDASH_MAIL_USE_TLS=true
If deploying without the Dockerfile and relying on Nixpacks:
NIXPACKS_START_CMD=server
Attach persistent volumes
If you store logs locally, add storage in Klutch.sh (path and size only):
/var/log/redash— optional application logs.
Most state lives in Postgres/Redis; volumes are optional.
Deploy Redash 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
5000. - Add the environment variables above (Postgres, Redis, secrets, mail settings).
- Attach a volume at
/var/log/redashonly if you want local logs. - Deploy. Your app will be reachable at
https://example-app.klutch.sh; complete setup in the UI.
Sample checks
Landing page:
curl -I https://example-app.klutch.shIf you expose a health endpoint (replace if different):
curl -I https://example-app.klutch.sh/healthcheckHealth checks and production tips
- Add an HTTP readiness probe to
/or/healthcheck. - Keep Postgres/Redis credentials and secrets in Klutch.sh secrets; rotate regularly.
- Consider a second app using the same image/env for dedicated workers if needed.
- Pin image versions and test upgrades in staging before production.
- Back up Postgres regularly; Redis typically holds ephemeral state but back it up if you rely on persisted queues.
Redash on Klutch.sh delivers reproducible Docker builds, managed secrets, and optional logging storage—without extra YAML or CI steps. Configure ports, env vars, and storage, then launch your analytics dashboards.