DEV Community

Cover image for Setup self-hosted Redash Ready with Ubuntu Server (Local Machine/AWS)

Posted on

Setup self-hosted Redash Ready with Ubuntu Server (Local Machine/AWS)

Looking for building a dashboard with historical analytics graphs without spending time on searching for a paid BI tool and time-series database migration, then your spaceship landed in a correct space.

Redash features

Let's discuss the few points that Redash can achieve for your project:

1. - Browser-based: Everything in your browser, with a shareable URL.

2. - Ease-of-use: Become immediately productive with data without the need to master complex software.

3. - Query editor: Quickly compose SQL and NoSQL queries with a schema browser and auto-complete.

4. - Visualization and dashboards: Create beautiful visualizations with drag and drop, and combine them into a single dashboard.

5. - Sharing: Collaborate easily by sharing visualizations and their associated queries, enabling peer review of reports and queries.

6. - Schedule refreshes: Automatically update your charts and dashboards at regular intervals you define.

7. - Alerts: Define conditions and be alerted instantly when your data changes.

8. - REST API: Everything that can be done in the UI is also available through REST API.

9. - Broad support for data sources: Extensible data source API with native support for a long list of common databases and platforms.

Coming to the knowledge as far as I was into redash, let me guide you guys to set up a redash local environment in your machine, where you can explore the redash as much as you can.

Pre-requisites :

  • Install Docker
  • Install Docker Compose
  • Install Git
  • Install Node 14.16.1 or newer, can be installed with Homebrew on OS/X
  • Install Yarn npm install --global yarn@1.22.10
  • Install Nginx
  • Install PostgreSQL

Setup #1

Clone the Git repository

First you will need to clone the Git repository:
git clone
cd redash/

Set up environment variables

Create a .env file at the root and set any environment variables you need.
touch .env

Enter fullscreen mode Exit fullscreen mode

As we will use PostgreSQL and Redis images from the docker-hub we can leave the POSTGRES_PASSWORD as blank and REDASH_DATABASE_URL as it is.

Step #2

Create Docker Services

Once you have the above setup, you need to create the Docker services:
docker-compose up -d
This will build the Docker images and fetch some prebuilt images and then start the services (Redash web server, worker, PostgreSQL and Redis).

make sure you give your Docker VM enough memory (4GB or more).

Step #3

Install Node Package

rum this command
yarn --frozen-lockfile

Step #4

Create Database

Create tables
docker-compose run --rm server create_db
Create database for tests
docker-compose run --rm postgres psql -h postgres -U postgres -c "create database tests"

Health Check for Installation

After your installation is complete, you can do the healthcheck by calling /ping API endpoint.

Step #5

Run webpack Dev Server

Once all Docker services are running (can be started either by docker-compose up or docker-compose start), Redash is available at http://localhost:5000/.

While we will use webpack’s dev server, we still need to build the frontend assets at least once, as some of them used for static pages (login page and such):
yarn build
To work on the frontend code, you need to use the webpack dev server, which you start with:
yarn start
Now the dev server is available at http://localhost:8080.
Start page of redash
Step #6

Installing new Python packages(requirements.txt)

If you pulled a new version with new packages or added some yourself, you will need to rebuild the server and worker images:
docker-compose build worker
docker-compose build server

After this setup process, you will be able to create queries, add visualization, create dashboards with multiple visualizations, etc in your local machine.


Top comments (0)