How to Install Redash Data Visualization Dashboard on Ubuntu 18.04 LTS

(: November 19, 2018)

This blog post will cover the installation of Redash Data Visualization Dashboard on Ubuntu 18.04 LTS release. Redash is a data visualization tool built to allow for fast and easy access to billions of records collected from various data sources.

Today Redash has support for querying multiple databases, including: Redshift, Google BigQuery, PostgreSQL, MySQL, Graphite, Presto, Google Spreadsheets, Cloudera Impala, Hive and custom scripts. The dashboards supported are charts, pivot table, cohorts and many more.

For CentOS / Fedora, use: Installing Redash Data Visualization Dashboard on CentOS 7 / Fedora{text-align:left} img{margin:0 auto 0 0}

Redash consists of two parts:

  1. Query Editor: This is your editor for SQL queries. You can browse schema and import with a click of a button.
  2. Visualizations and Dashboards: create different visualizations from your dataset, and then combine several visualizations into a single dashboard.

Features of Redash

  • It gives you a powerful query editor with collaboration capabilities
  • Rich API – You get an API for accessing Redash and extend its functionality.
  • User Management: Redash support SSO, access control and many other great features for enterprise-friendly workflow.
  • Alerts: Set up alerts and get notified on certain events on your data.
  • Support for many Data Sources: Redash supports SQL, NoSQL, Big Data and API data sources – query your data from different sources to answer complex questions. Redash supports more than 25 data sources.

Setup Environment

This installation of Redash has the following dependencies

  • Installed and running Ubuntu 18.04 LTS server
  • Docker Engine
  • Docker compose

The installation of Redash Data Visualization Dashboard on Ubuntu 18.04  can be done from a script which automates the process for you, or manual steps.

Step 1: Update Ubuntu 18.04 system

As a rule of thumb, your system should be updated before installing any packages.

sudo apt update
sudo apt upgrade
sudo reboot

Once the system is rebooted, proceed to step 2

Step 2: Install Docker and Docker Compose

Run the following commands to install Docker on Ubuntu 18.04:

sudo apt-get update 
sudo apt-get -yy install apt-transport-https ca-certificates curl software-properties-common wget pwgen
curl -fsSL | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"
sudo apt-get update && sudo apt-get -y install docker-ce

Install Docker Compose

export VER="1.22.0"
sudo curl -L${VER}/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose

Make the file executable

sudo chmod +x /usr/local/bin/docker-compose

Allow the current user to run Docker commands

sudo usermod -aG docker $USER
newgrp docker

Step 3: Prepare environment and install Redash

Automated with Script

You can download and run Redash installation script without following all the steps shown in the next manual installation section.


Make the script executable and run it

chmod +x

The script will:

  1. Install both Docker and Docker Compose.
  2. Download  Docker Compose configuration files and bootstrap Redash environment
  3. Start all Redash docker containers

Doing Manual installation

If you’re a person who likes to manually setup stuff, then this section is for you. The steps are obtained from the script.

Create Project directory

sudo mkdir -p $REDASH_BASE_PATH

Create PostgreSQL data directory

sudo mkdir $REDASH_BASE_PATH/postgres-data

Create the envfile to store variables

rm $REDASH_BASE_PATH/env 2>/dev/null

Export required variables

COOKIE_SECRET=$(pwgen -1s 32)
POSTGRES_PASSWORD=$(pwgen -1s 32)
echo "REDASH_REDIS_URL=redis://redis:6379/0" >> $REDASH_BASE_PATH/env

Setup Docker Compose

LATEST_VERSION=`curl -s "$REQUESTED_CHANNEL"  | json_pp  | grep "docker_image" | head -n 1 | awk 'BEGIN{FS=":"}{print $3}' | awk 'BEGIN{FS="""}{print $1}'`

REDASH_BRANCH="${REDASH_BRANCH:-master}" # Default branch/version to master if not specified in REDASH_BRANCH env var
sed -ri "s/image: redash/redash:([A-Za-z0-9.-]*)/image: redash/redash:$LATEST_VERSION/" docker-compose.yml
echo "export COMPOSE_PROJECT_NAME=redash" >> ~/.profile
echo "export COMPOSE_FILE=/opt/redash/docker-compose.yml" >> ~/.profile
source ~/.profile
docker-compose run --rm server create_db
docker-compose up -d

The setup may take a couple of minutes to finish. When done, you should have a number of containers running

Step 4: Access Redash Dashboard

Once Redash is installed, the service will be available on your server IP or DNS name assigned. Point your browser to the server address to access it.

The first thing you’re asked to do is create your admin account, fill the information required then click the “Setup” button. It will finish the setup and greet you with the admin dashboard

 You can now start using Redash to create Dashboards, Queries, and Alerts. For more reading on administration, visit Redash Admin page.

If you need SSL, follow Redash SSL setup guide for Nginx.{text-align:left} img{margin:0 auto 0 0}