---
title: "Deploy Redash"
description: "Query databases with SQL and turn results into shared dashboards"
category: "Analytics"
url: https://railway.com/deploy/redash-analytics
---

# Deploy Redash

Query databases with SQL and turn results into shared dashboards

**[Deploy Redash on Railway](https://railway.com/template/redash-analytics)**

- **Creator:** A3A
- **Category:** Analytics
- **Total deploys:** 1

## Template content

### redash-worker-adhoc https://cdn.simpleicons.org/redash/FF7964.svg

- **Image:** redash/redash:26.3.0
- **Start command:** `/app/bin/docker-entrypoint worker`

### redash-scheduler https://cdn.simpleicons.org/redash/FF7964.svg

- **Image:** redash/redash:26.3.0
- **Start command:** `/app/bin/docker-entrypoint scheduler`

### redash-server https://cdn.simpleicons.org/redash/FF7964.svg

- **Image:** redash/redash:26.3.0
- **Start command:** `/bin/sh -c 'for i in $(seq 1 30); do /app/manage.py database create_tables && break; echo "waiting for database ($i)"; sleep 5; done; /app/manage.py db upgrade; exec /app/bin/docker-entrypoint server'`
- **Health check:** /ping
- **Public domain:** Yes

### Postgres https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### redash-worker-scheduled https://cdn.simpleicons.org/redash/FF7964.svg

- **Image:** redash/redash:26.3.0
- **Start command:** `/app/bin/docker-entrypoint worker`

### Redis https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/redis.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

### redash-worker-default https://cdn.simpleicons.org/redash/FF7964.svg

- **Image:** redash/redash:26.3.0
- **Start command:** `/app/bin/docker-entrypoint worker`

## Documentation

![Redash logo](https://redash.io/assets/images/logo.png)

# Deploy and Host Redash on Railway

Redash is an open-source data platform that turns SQL into shared charts and dashboards. Point it at a database, write a query, pick a visualization, and pin the result to a dashboard that refreshes on a schedule. It ships connectors for more than sixty sources — PostgreSQL, MySQL, BigQuery, Snowflake, ClickHouse, Athena, Databricks, MongoDB, Elasticsearch, Trino and Google Sheets among them — so one instance can front a whole warehouse estate. Analysts get a schema browser and autocomplete; everyone else gets a URL. Redash has been in use since 2013 and is BSD-licensed.

Self-host Redash on Railway and you get the topology its own production compose file describes, already wired together. A gunicorn web service serves the UI and REST API behind a generated HTTPS domain. A scheduler enqueues periodic work, and three worker services drain separate RQ queues: ad-hoc queries, scheduled refreshes and schema scans, and maintenance such as alert evaluation and result cleanup. Managed PostgreSQL holds queries, dashboards, users and cached results; managed Redis is the job broker and rate-limit store. Everything but the web service stays private.

![Diagram of the Redash server, scheduler, worker and datastore services on Railway](https://res.cloudinary.com/rroe4rtk/image/upload/v1787732085/redash-architecture.png)

## Getting Started with Redash on Railway

Open the generated domain once the deploy finishes. The first visit lands on `/setup`, a one-time wizard creating the admin account and organisation — there are no default credentials, and the page disappears once the first account exists, so complete it promptly. Enter your name, email, a strong password and an organisation name to reach the home screen. Next go to **Settings → Data Sources → New Data Source**, choose your database type, fill in host, port, user, password and database name, then press **Test Connection** before saving. Now click **Create → Query**, pick that data source, write a `SELECT` and press **Execute**: the request is queued in Redis and run by the ad-hoc worker, so a returned result table proves the stack is healthy end to end. Add a visualization from the tab strip under the results, publish the query, then use **Create → Dashboard** to place it as a widget. Finally set a **Refresh Schedule** to confirm the scheduler and its worker are running — "Last Executed At" on the Queries list starts advancing on its own.

![Redash dashboard with revenue counter, stacked column chart and channel pie](https://res.cloudinary.com/rroe4rtk/image/upload/v1787732087/redash-dashboard.png)
![Redash query editor showing SQL, schema browser and result table](https://res.cloudinary.com/rroe4rtk/image/upload/v1787732090/redash-query-editor.png)
![Redash data source catalogue listing available database connectors](https://res.cloudinary.com/rroe4rtk/image/upload/v1787732094/redash-data-sources.png)

## About Hosting Redash

Redash is deliberately narrow: it does not model your data and does not replace your warehouse. It gives SQL-literate people a fast loop — query, chart, share, schedule — and everyone else a link. That suits teams who know their schema and want reporting without a modelling project.


Key features:

- Query editor with schema browser, autocomplete, snippets and parameters
- Around twenty visualization types: charts, counters, pivot tables, cohorts, funnels, maps
- Dashboards built from any published visualization, with dashboard-level filters
- Scheduled refreshes plus alerts to email, Slack, Discord, Teams, PagerDuty, Datadog and webhooks
- A full REST API, so anything the UI does can be scripted
- Groups and per-data-source permissions, plus Google OAuth, SAML and LDAP

Splitting the queues across separate services matters in practice: a slow ad-hoc query cannot starve scheduled refreshes, and neither can block alert evaluation or cleanup.

## Why Deploy Redash on Railway

Railway removes the server work self-hosting Redash usually involves:

- Managed PostgreSQL and Redis, provisioned and connected for you
- HTTPS domain, certificates and redirects handled at the edge
- Five services from one click, no compose file to maintain
- Private networking between workers and datastores
- Independent scaling and logs per worker tier

## Common Use Cases

- A shared analytics front end over a production replica, so teams self-serve without database credentials
- Scheduled operational reporting — daily revenue, signup funnels, queue depth
- Data-quality alerting: a query that counts anomalies, a threshold, and a Slack or webhook destination
- One query surface across disconnected systems, joining a Postgres extract against a Google Sheet

## Dependencies for Redash

- `redash/redash:26.3.0` — the web, scheduler and worker services all run this image ([GitHub](https://github.com/getredash/redash), [Docker Hub](https://hub.docker.com/r/redash/redash))
- Railway managed PostgreSQL — metadata store for queries, dashboards, users, groups, alerts and cached results
- Railway managed Redis — RQ broker for every background job, and the store behind login rate limiting

All five application services must run the same image tag: they share a schema and enqueue jobs for each other, so version skew produces jobs that fail on deserialisation.

### Environment Variables Reference

| Variable | Purpose |
|---|---|
| `REDASH_DATABASE_URL` | PostgreSQL connection string for Redash's own metadata |
| `REDASH_REDIS_URL` | Redis connection string used as the RQ broker |
| `REDASH_COOKIE_SECRET` | Signs session cookies — must stay stable, or everyone is logged out |
| `REDASH_SECRET_KEY` | Encrypts data-source credentials — change it and existing sources break |
| `REDASH_HOST` | Public base URL used in invite links and alert emails |
| `QUEUES` / `WORKERS_COUNT` | Which RQ queues a worker drains, and how many processes it starts |
| `REDASH_MAIL_*` | Optional SMTP settings for alert emails and invitations |

### Deployment Dependencies

- Source: https://github.com/getredash/redash — image: https://hub.docker.com/r/redash/redash
- Docs: https://redash.io/help/ — reference setup: https://github.com/getredash/setup
- Runtime: Python 3.13, gunicorn, RQ, supervisord

## Hardware Requirements for Self-Hosting Redash

| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 2 vCPU total | 4+ vCPU |
| RAM | 4 GB total | 8 GB total |
| Storage | 5 GB PostgreSQL volume | 20 GB+ for large cached results |
| Runtime | Python 3.13 | Python 3.13 |

Redash itself is light. What grows is the `query_results` table, since every execution stores its full result set. A cleanup job removes unused results older than seven days; lower `REDASH_QUERY_RESULTS_CLEANUP_MAX_AGE` if you query wide tables.

## Self-Hosting Redash with Docker

Redash needs its schema created before the web service starts. This shell command does that against existing PostgreSQL and Redis instances:

```
docker run --rm \
  -e REDASH_DATABASE_URL="postgresql://user:pass@postgres/redash" \
  -e REDASH_REDIS_URL="redis://redis:6379/0" \
  -e REDASH_COOKIE_SECRET="$(openssl rand -hex 16)" \
  redash/redash:26.3.0 create_db
```

Then start the web service, the scheduler and one worker per queue:

```
docker run -d -p 5000:5000 -e REDASH_WEB_WORKERS=4  redash/redash:26.3.0 server
docker run -d  redash/redash:26.3.0 scheduler
docker run -d -e QUEUES="queries" -e WORKERS_COUNT=2  redash/redash:26.3.0 worker
```

Upstream also publishes an installer and compose file at https://github.com/getredash/setup.

## How Much Does Redash Cost to Self-Host?

Redash is free and open source under the BSD 2-Clause licence — no paid edition, no seat limits, no feature gating; every connector, alert destination and SSO option ships in the same build. The hosted redash.io service was retired years ago, so self-hosting is the only way to run it. On Railway you pay for compute and storage only, and cost tracks how often your scheduled queries run.

## FAQ

**What is Redash?**

An open-source tool for querying databases with SQL, turning results into visualizations, and combining those into shareable dashboards that refresh on a schedule. It supports over sixty data sources and is BSD 2-Clause licensed.

**What does this Railway template deploy?**

Seven services: a Redash web and API service on a public HTTPS domain, a scheduler, three RQ workers splitting ad-hoc queries, scheduled refreshes and maintenance, and managed PostgreSQL and Redis.

**Why does Redash need both PostgreSQL and Redis?**

PostgreSQL is Redash's own metadata store — queries, dashboards, users, groups, alerts and cached results. Redis is the job broker: each query execution, schema refresh and alert check is an RQ job a worker picks up. Neither holds the data you analyse; that stays in the sources you connect.

**How do I create the first admin user in self-hosted Redash?**

Open the deployed URL and complete the `/setup` wizard on your first visit; it creates the admin account and organisation together. No default credentials exist, and the page becomes unreachable once an account is present. Further users are invited from **Settings → Users**.

**Can I invite team members without configuring SMTP?**

Yes. With no mail server configured, Redash shows the invitation link directly in the admin UI so you can send it yourself. Set `REDASH_MAIL_*` only for alert emails, password resets or automatic invitations.

**How do I scale Redash if queries start queuing?**

Each worker service is separate, so raise `WORKERS_COUNT` on whichever queue is backing up — usually the ad-hoc worker — or add replicas. Raise `REDASH_WEB_WORKERS` only if the UI feels slow, and keep the web service at one replica during initial setup.


## Similar templates

- [Betterlytics](https://railway.com/deploy/betterlytics) — Betterlytics is a cookieless analytics platform GDPR-compliant.
- [Finance Tracker](https://railway.com/deploy/finance-tracker-1) — Private multi-user household finance ledger with budgets and CSV import.
- [Matomo Analytics + MariaDB](https://railway.com/deploy/matomo-analytics-mariadb) — Privacy-friendly analytics with MariaDB and persistent volumes.

Open this page in a browser: https://railway.com/deploy/redash-analytics
