Redash
Videos
Overview: Redash on Ubuntu 24.04 LTS on Azure: overview (watch on YouTube)
Launch and log in: Redash on Ubuntu 24.04 LTS on Azure: launch and log in (watch on YouTube)
Deep Dive: Redash on Ubuntu 24.04 LTS on Azure: deep dive (watch on YouTube)
Overview
Redash is an open-source platform for querying your data with SQL, visualizing the results and assembling them into shareable dashboards. It connects to dozens of databases and APIs, runs and schedules queries, and turns result sets into charts. A team can build and share dashboards from a browser.
This SecureAnyCloud image deploys Redash 10.1.0.b50633 as the official production Docker Compose stack, fronted by an nginx reverse proxy on port 80. All state lives on a dedicated Azure data disk, every secret is rotated, and a unique admin account is created on the first boot of every VM.
What you get:
- Redash 10.1.0.b50633 deployed from the official Docker Compose stack, pinned to
redash/redash:10.1.0.b50633 - The full multi-container stack:
server(gunicorn),scheduler, two Celery workers (scheduled_workerandadhoc_worker), PostgreSQL and Redis - nginx on
:80as a reverse proxy to the loopback Redash server, plus a static, unauthenticated/healthprobe - PostgreSQL and Redis bound to the private Docker network only, never published on the host
- A per-VM admin account (email, password and API key) generated on first boot and recorded in a root-only file
- A dedicated Azure data disk at
/var/lib/redashthat holds the PostgreSQL metadata database and Redis data, with the Docker data-root relocated there redash.service,redash-firstboot.service,nginx.serviceanddocker.serviceas enabled, active systemd units- 24/7 SecureAnyCloud support
Prerequisites
You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region.
Standard_B4ms (4 vCPU / 16 GiB RAM) is the recommended size, because the multi-container Redash stack needs the memory.
Configure the network security group (NSG) to allow inbound 22/tcp from your management network and 80/tcp. Redash serves plain HTTP on port 80, so for production, terminate TLS in front of it with your own domain.
Step 1 - Deploy from the Azure Marketplace
Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Redash by SecureAnyCloud, and select Create.
On the Basics tab, pick your subscription, resource group, region and size (Standard_B4ms or larger). Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80).
Review the dedicated data disk on the Disks tab, then select Review + create and Create.
Step 2 - Deploy from the Azure CLI
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:redash-ubuntu-24-04:default:latest
az vm create \
--resource-group <your-rg> \
--name redash \
--image sac1647283583153:redash-ubuntu-24-04:default:latest \
--size Standard_B4ms \
--admin-username azureuser \
--ssh-key-values ~/.ssh/id_ed25519.pub \
--vnet-name <your-vnet> --subnet <your-subnet> \
--public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name redash --port 80 --priority 1010First boot takes a few minutes. In the background, the VM generates its own credentials and starts the services. If you connect as soon as the VM shows as running, wait for that setup to finish before you continue:
bash sudo cloud-init status --wait
The command prints status: done when the VM is ready. The credentials and services described below exist only after that point.
Step 3 - Connect to your VM
Connect to the VM over SSH:
ssh azureuser@<vm-public-ip>Step 4 - Confirm the services are running
Redash runs as a Docker Compose stack managed by redash.service, behind nginx. Confirm the units are active:
systemctl is-active redash.service nginx.service docker.serviceEach unit reports active. On first boot, the image rotates every secret and creates a per-VM admin account.
Step 5 - Confirm the container stack
The stack runs six containers: the web server, the scheduler, two Celery workers, PostgreSQL and Redis. List them:
docker compose -f /opt/redash/docker-compose.yml psAll six report Up. PostgreSQL and Redis are attached to the private Docker network only and are never published on the host. Only nginx on port 80 is reachable from outside.
Step 6 - Confirm the health and ping endpoints
nginx serves a static, unauthenticated /health file for load balancers and probes. It also proxies Redash's own /ping liveness endpoint. Check the health endpoint first:
curl -s -o /dev/null -w 'health=%{http_code}\n' http://localhost/healthThe command returns health=200. Then check Redash's application ping, which returns PONG:
curl -s http://localhost/ping; echoStep 7 - Retrieve your admin credentials
Your VM generates its own admin email, password and API key on first boot and writes them to a root-only file. Read it as root:
cat /root/redash-credentials.txtThe file contains REDASH_ADMIN_EMAIL (admin@sac.local), REDASH_ADMIN_PASSWORD and REDASH_ADMIN_API_KEY. Store them somewhere safe.
Step 8 - Sign in to the Redash web UI
Browse to http://<vm-public-ip>/ and sign in as admin@sac.local with the password from Step 7.
After you sign in, you land on the Dashboards home. The left navigation lists Dashboards, Queries, Alerts and Create.
Open Create > New Query to reach the query editor. Write SQL against a connected data source, run it, and turn the result into a visualization.
Open Settings > Data Sources to connect Redash to your databases and APIs, including PostgreSQL, MySQL, BigQuery, Redshift, Elasticsearch and many more.
Step 9 - Verify the REST API with your API key
Every Redash user has an API key that authenticates REST calls without a session. Read the per-VM admin key from the credentials file and call the dashboards endpoint:
API=$(grep '^REDASH_ADMIN_API_KEY=' /root/redash-credentials.txt | cut -d= -f2-)
curl -s -o /dev/null -w 'api=%{http_code}\n' -H "Authorization: Key $API" http://localhost/api/dashboardsThe command returns api=200. A request with a wrong key is rejected.
To authenticate as a browser session instead, POST your admin email and password to the login form. For example, curl -i -c cookies.txt -d 'email=admin@sac.local' -d 'password=<REDASH_ADMIN_PASSWORD>' http://<vm-public-ip>/login returns a 302 redirect on success.
Step 10 - Confirm data lives on the dedicated disk
The PostgreSQL metadata database (users, queries, dashboards and cached results) and the Redis data live on the dedicated Azure data disk. The data survives OS changes, and you can resize the disk independently. Confirm the mount:
findmnt /var/lib/redashThe mount is backed by a separate Azure data disk that is captured into the image and re-provisioned on every VM. Docker's data-root is relocated under it, so every Redash named volume lands on the resizable disk.
Inviting your team by email (SMTP setup)
The image does not include an outbound email server, because sending mail needs credentials for your own provider: SendGrid, Microsoft 365, Google Workspace, Amazon SES or your own SMTP server. Until you add them, Redash cannot send user invitations or alert emails. Configure them once and both start working.
- Edit the Redash environment file and add your provider's settings. The file already contains a
REDASH_MAIL_DEFAULT_SENDERline, so change it to a real address on your domain:
bash sudo nano /opt/redash/.env
REDASH_MAIL_SERVER=smtp.sendgrid.net REDASH_MAIL_PORT=587 REDASH_MAIL_USE_TLS=true REDASH_MAIL_USERNAME=apikey REDASH_MAIL_PASSWORD=<your-smtp-password-or-api-key> REDASH_MAIL_DEFAULT_SENDER=redash@yourdomain.com
For Microsoft 365, use smtp.office365.com on port 587 with TLS. For SendGrid, the username is the literal word apikey and the password is your API key. If your provider uses SSL on port 465, set REDASH_MAIL_USE_SSL=true instead of the TLS line.
Make sure no line has a trailing space after its value. Docker reads trailing spaces literally, and the login will fail.
- Recreate the stack so every container, including the background workers that send the mail, picks up the new settings. A plain restart does not always reload them:
bash cd /opt/redash && sudo docker compose up -d --force-recreate
- Confirm that it works. Invite a user from Settings > Users, or send a test message that prints the exact SMTP response. Replace the recipient with an inbox you can check:
bash cd /opt/redash && sudo docker compose run --rm --entrypoint python server -c " import os, smtplib s = smtplib.SMTP(os.environ['REDASH_MAIL_SERVER'].strip(), int(os.environ['REDASH_MAIL_PORT'])) s.set_debuglevel(1); s.starttls() s.login(os.environ['REDASH_MAIL_USERNAME'].strip(), os.environ['REDASH_MAIL_PASSWORD'].strip()) s.sendmail(os.environ['REDASH_MAIL_DEFAULT_SENDER'].strip(), ['you@yourdomain.com'], 'Subject: Redash SMTP test\n\nWorks!') s.quit(); print('OK') "
Reaching external inboxes (Gmail, Outlook). Verifying a single sender is enough to send mail. However, Gmail and Outlook often junk or reject mail from a domain that is not authenticated at your provider.
If test mail reaches your own mailbox but invitations to external addresses do not, set up domain authentication. In SendGrid, go to Settings > Sender Authentication > Authenticate Your Domain. Then add the SPF and DKIM records it gives you to your DNS. Most providers show a per-message delivery log (SendGrid's is the Activity Feed) that tells you whether each invitation was delivered, dropped or blocked, and why.
Invite links. The sign-in link in the invitation is built from REDASH_HOST in the same .env file. It is set to your VM's address on first boot. If you move Redash behind a custom domain or HTTPS, update REDASH_HOST to match so the links resolve.
If the test email works but invitations never arrive. In this case, invitations also never appear in your provider's send logs. Redash sends the test email directly from the server container, but it sends invitation and alert emails through a background worker on its emails queue. Confirm that a worker is assigned that queue.
Open /opt/redash/docker-compose.yml, find the adhoc_worker service, and make sure its QUEUES line includes emails:
adhoc_worker: ... environment: QUEUES: 'queries,emails,default,periodic'If emails is missing, add it as above, then recreate the stack so the worker picks it up:
cd /opt/redash && sudo docker compose up -d --force-recreateResend the invitation. It is now sent and appears in your provider's activity log. Any invitations you queued before the change may all send at once when the worker starts.
Building with Redash
Connect a data source under Settings > Data Sources, write a query in the editor and save it. Add a visualization to the query, such as a chart, counter, pivot or table. Then pin one or more visualizations onto a dashboard and share it with your team.
You can schedule queries to refresh on an interval, which the scheduler and workers handle. Alerts notify you when a value crosses a threshold. The Redash documentation covers the query language, data source options and API reference.
Maintenance
- Admin users. Add users and groups from Settings > Users and Settings > Groups in the web UI.
- Backups. Snapshot the
/var/lib/redashdata disk, or back up the PostgreSQL metadata database inside thepostgrescontainer. - Data. The metadata database and Redis data live under
/var/lib/redash(the Docker data-root). - Stack control. Manage the stack with
sudo systemctl restart redash.service, or withdocker composein/opt/redash. - TLS. Redash serves plain HTTP on port 80. In production, front it with TLS (for example certbot) and your own domain.
- Upgrades. Edit the pinned image tag in
/opt/redash/docker-compose.yml, then runsudo systemctl restart redash.service. - Security patches. unattended-upgrades stays enabled, so the OS keeps receiving security updates automatically.
Support
SecureAnyCloud provides 24/7 expert support for this image. For questions or help with your deployment, contact sales@secureanycloud.com.
Deploy on Azure
Launch Redash on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.
View this image
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com
Overview
Redash is an open-source data visualization, SQL query and dashboard platform. Connect a data source, write a query in the shared SQL editor, turn the result into a chart, and combine charts into interactive dashboards that you can schedule and share.
This image is the official Redash production Docker Compose stack, pinned to a fixed release so it never silently upgrades. A system nginx reverse proxy is the only service exposed on the public interface.
What you get:
- The Redash web server, the scheduler and two Celery workers, alongside a PostgreSQL metadata database and a Redis broker, all on a private Docker network
- nginx terminating port 80 and forwarding to the Redash server on
127.0.0.1:5000, while PostgreSQL and Redis are never published to the network - An unauthenticated health endpoint at
/healthfor load balancer and readiness probes - No default credentials. On the first boot of every deployed instance, a fresh Redash secret key, cookie secret and database password are generated, the metadata database is initialized empty, and a unique administrator account is created and written to
/root/redash-credentials.txtwith mode 0600 - PostgreSQL and Redis data on a dedicated, independently resizable EBS data volume mounted at
/var/lib/redash, separate from the operating system disk
Prerequisites
Before you deploy this image, make sure you have:
- An Amazon Web Services account where you can launch EC2 instances
- IAM permissions to launch instances, create security groups and subscribe to AWS Marketplace products
- An EC2 key pair in the target Region for SSH access to the instance
- A VPC and subnet in the target Region, with a security group that allows inbound port 22 from your management network and inbound port 80 (and 443 once you add TLS) from the networks your users will reach Redash on
- The AWS CLI (version 2) installed locally, if you plan to deploy from the command line
- A data source to analyze, such as PostgreSQL, MySQL, SQL Server, Amazon Redshift, Amazon Athena, BigQuery or Elasticsearch. You can connect the bundled PostgreSQL metadata database first to explore
Launch the instance from the AWS Marketplace
Sign in to the AWS Management Console, open the EC2 service and select Launch instance. Under Application and OS Images, choose AWS Marketplace AMIs and search for Redash. Select the SecureAnyCloud listing, choose Select, then choose Continue on the subscription summary.
Pick an instance type of m5.large or larger. Redash runs several containers (the web server, scheduler, two workers, PostgreSQL and Redis) and benefits from memory. Choose your EC2 key pair under Key pair (login).
Under Network settings, select your VPC and subnet. Create or select a security group that allows inbound port 22 from your management network and inbound port 80 (and 443) from the networks your users use. Leave the root volume at the default size or larger. The metadata database and Redis data are stored on the separate data volume.
Select Launch instance. First-boot initialization takes approximately three to five minutes after the instance state becomes Running. During that time Redash rotates every secret, initializes the database, runs its migrations and creates the administrator.
Launch the instance from the AWS CLI
The command below launches an instance from the SecureAnyCloud Redash Marketplace AMI into an existing subnet and security group.
Replace <ami-id> with the AMI ID shown on the Marketplace listing, <key-name> with your EC2 key pair name, <subnet-id> with your subnet ID, and <security-group-id> with a security group that opens ports 22 and 80 (and 443) as described above.
aws ec2 run-instances \
--image-id <ami-id> \
--instance-type m5.large \
--key-name <key-name> \
--subnet-id <subnet-id> \
--security-group-ids <security-group-id> \
--block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs":{"VolumeSize":30,"VolumeType":"gp3"}}]' \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=redash-01}]'On success, the command prints a JSON document. Note the instance ID. Once the instance is running, retrieve its public address with aws ec2 describe-instances --instance-ids <instance-id> --query "Reservations[].Instances[].PublicIpAddress" --output text.
Connect and retrieve the administrator login
Connect over SSH with the key pair you selected and the public IP address from Step 2. The SSH login user depends on the operating system of the AMI variant you launched:
AMI variant SSH login user
Redash 10.1 on Ubuntu 24.04 ubuntu
ssh <login-user>@<public-ip>Once connected, read the per-instance credentials file. The first-boot service writes this file before you can log in, so it is already in place:
sudo cat /root/redash-credentials.txtThe file is plain text. It contains the Redash URL, the administrator email (admin@sac.local), the generated administrator password and an API key.
From the same SSH session, confirm that the deployment is healthy. The health endpoint is open and unauthenticated:
curl -fsS http://127.0.0.1/healthOKThe proxied Redash server also answers its own readiness probe with HTTP 200:
curl -s -o /dev/null -w 'ping: HTTP %{http_code}\n' http://127.0.0.1/pingSign in for the first time
Open a web browser and go to http://<public-ip>/. First boot has already created the administrator, so you land on the sign-in page. Enter the email and password from /root/redash-credentials.txt.
The Redash sign-in page, served on first boot with a unique per-instance administrator and no default credentials.
After you sign in, you reach the Redash home. It shows the getting-started checklist, your favorite dashboards and queries, and the Dashboards, Queries, Alerts and Create navigation.
The Redash home: connect a data source, create a query and build a dashboard.
Connect a data source
Redash connects to your databases, warehouses and APIs. Open Settings (the gear icon), then Data Sources, then New Data Source.
Choose a type. PostgreSQL, MySQL, SQL Server, Amazon Redshift, Amazon Athena, BigQuery, Elasticsearch and dozens more are supported. Enter the host, port and credentials, then select Save and Test Connection.
For an Amazon RDS or Redshift instance in the same VPC, use its endpoint and database name.
Write a query and build a chart
Select Create, then Query. Choose your data source, write SQL in the editor and select Execute. The result appears as a table.
Select Add Visualization to turn the result into a chart (bar, line, pie, scatter, map, counter, pivot and more), then Save the query. The screenshot below shows a query running against the bundled PostgreSQL data source, with its result rendered as a bar chart.
A SQL query executed against a connected data source, with the result rendered as a chart ready to add to a dashboard.
Combine saved queries and their visualizations into a Dashboard (from Create, then Dashboard), with filters and parameters for an at-a-glance view. You can also schedule queries to refresh automatically.
Verify the full query pipeline (optional)
You can test the whole stack end to end from the shell: the web server, the Celery workers, Redis and PostgreSQL. Use the REST API and the API key from your credentials file.
The command below connects the bundled PostgreSQL metadata database as a data source, runs an ad-hoc query through the worker pipeline and prints the returned rows.
sudo bash -c ' set -e API=$(grep "^REDASH_ADMIN_API_KEY=" /root/redash-credentials.txt | cut -d= -f2-) PGPW=$(grep "^POSTGRES_PASSWORD=" /opt/redash/.env | cut -d= -f2-) H="http://127.0.0.1"; A="Authorization: Key ${API}"; CT="Content-Type: application/json" DSID=$(curl -s -H "$A" "$H/api/data_sources" | python3 -c "import json,sys;d=json.load(sys.stdin);print(next((x[\"id\"] for x in d if x[\"name\"]==\"sac verify\"), \"\"))") if [ -z "$DSID" ]; then DSID=$(curl -s -H "$A" -H "$CT" -X POST "$H/api/data_sources" -d "{\"name\":\"sac verify\",\"type\":\"pg\",\"options\":{\"host\":\"postgres\",\"port\":5432,\"user\":\"postgres\",\"password\":\"${PGPW}\",\"dbname\":\"postgres\"}}" | python3 -c "import json,sys;print(json.load(sys.stdin)[\"id\"])") fi JID=$(curl -s -H "$A" -H "$CT" -X POST "$H/api/query_results" -d "{\"data_source_id\":${DSID},\"query\":\"SELECT n AS number, n*n AS square FROM generate_series(1,5) AS n ORDER BY n\",\"max_age\":0}" | python3 -c "import json,sys;print(json.load(sys.stdin)[\"job\"][\"id\"])") for i in $(seq 1 30); do QRID=$(curl -s -H "$A" "$H/api/jobs/${JID}" | python3 -c "import json,sys;print(json.load(sys.stdin)[\"job\"].get(\"query_result_id\") or \"\")") [ -n "$QRID" ] && break; sleep 2 done [ -n "$QRID" ] || { echo "FAILED: query did not complete"; exit 1; } curl -s -H "$A" "$H/api/query_results/${QRID}" | python3 -c "import json,sys;d=json.load(sys.stdin)[\"query_result\"][\"data\"];print(\"columns:\",[c[\"name\"] for c in d[\"columns\"]]);print(\"rows:\",d[\"rows\"])" 'A columns: line and a rows: line that list the five squared numbers confirm that the full server, worker, Redis and PostgreSQL pipeline is healthy.
Enable HTTPS with Let's Encrypt
For any production deployment, serve Redash over HTTPS so that session cookies and data cannot be intercepted. The image includes nginx, which certbot can configure automatically.
The commands below assume that a DNS record points your fully qualified domain name at the instance's public IP address.
sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d redash.your-domain.example \
--non-interactive --agree-tos -m you@your-domain.example \
--redirectAfter certbot finishes, set REDASH_HOST in /opt/redash/.env to https://redash.your-domain.example so that Redash generates correct links. Then restart the stack with sudo systemctl restart redash.
Backups and maintenance
Redash keeps all of its state in its PostgreSQL metadata database, which lives on the dedicated data volume. That state includes users, data source definitions, queries, dashboards, alerts and cached results. Back it up regularly by dumping it from the database container:
sudo docker compose -f /opt/redash/docker-compose.yml exec -T postgres pg_dump -U postgres postgres > <backup-dir>/redash-metadata-$(date +%F).sqlShip the dump to an Amazon S3 bucket or another object store. Because the metadata database is on its own EBS volume, you can also take coordinated EBS snapshots of it.
For kernel and package updates, Ubuntu's unattended-upgrades is enabled by default.
The Redash container images are pinned in /opt/redash/docker-compose.yml. To upgrade Redash, change the pinned tag and run sudo systemctl restart redash. This recreates the stack and applies any database migrations. Always back up first. See https://redash.io/help/.
Scaling beyond a single instance
For larger deployments, decouple Redash from the single-instance layout:
- Move the metadata database to Amazon RDS for PostgreSQL and point
REDASH_DATABASE_URLin/opt/redash/.envat it - Move the broker to Amazon ElastiCache for Redis and point
REDASH_REDIS_URLat it - Put the web tier behind an Application Load Balancer and scale the worker containers for query concurrency
The official Redash documentation at https://redash.io/help/ covers each of these.
Support
SecureAnyCloud provides 24/7/365 expert technical support for this image, with a guaranteed response within 24 hours and a one-hour average for critical issues. Contact sales@secureanycloud.com.
For general Redash questions, consult the documentation at https://redash.io/help/. Redash is distributed under the BSD 2-Clause License; use of the name here is nominative and does not imply affiliation or endorsement.
Deploy on AWS
Launch Redash on AWS with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com