Setting up a Redash Instance
The provisioning script works on Ubuntu 16.04. This script installs all needed dependencies and creates basic setup.
To ease the process, there are also images for AWS, Google Compute Cloud and Docker. These images were created with the same provision script using Packer.
Create an Instance
Launch the instance with from the pre-baked AMI (for small deployments t2.small should be enough):
(the above AMIs are of version: 2.0.0)
When launching the instance make sure to use a security group, that only allows incoming traffic on: port 22 (SSH), 80 (HTTP) and 443 (HTTPS). These AMIs are based on Ubuntu so you will need to use the user
ubuntu when connecting to the instance via SSH.
Now proceed to “Setup”.
Google Compute Engine
First, you need to add the images to your account:
$ gcloud compute images create "redash-2-0-0" --source-uri gs://redash-images/redash.2.0.0.b2990.tar.gz
Next you need to launch an instance using this image (n1-standard-1 instance type is recommended).
For development environment setup, please refer to the developer guide (which includes Docker specific instructions as well).
- Make sure you have a Docker machine up and running.
- Make sure your current working directory is the root of this GitHub repository.
- Use the
docker-compose.production.ymlconfiguration and modify configuration values as needed. For example, you may want to change:
- The Postgres volume location
- The value of
REDASH_COOKIE_SECRET(especially if this instance is not just for testing purposes)
docker-compose -f docker-compose.production.yml run --rm server create_dbto setup the database.
docker-compose -f docker-compose.production.yml up
- Redash should be available on port 80, of the host machine.
Now proceed to “Setup”.
Download the provisioning script and run it on a new machine. Note that:
- You need to run the script as root.
- It was tested only on Ubuntu 16.04.
- It’s designed to run on a “clean” machine. If you’re running this script on a machine that is used for other purposes, you might want to tweak it to your needs.
Once you created the instance with either the image or the script, you should have a running Redash instance with everything you need to get started. Redash should be available using the server IP or DNS name you assigned to it. You can point your browser to this address.
Before you can continue, it will ask you to create your admin account. Once this is done, you can start using Redash. But to make it useful, there are a few more steps that you need to manually do to complete the setup:
Make sure to complete the web based setup before using the CLI or proceeding with the rest of the setup.
First ssh to your instance and change directory to
/opt/redash. If you’re using the GCE image, switch to root (
Users & Google Authentication Setup
Most of the settings you need to edit are in the
If you want to use Google OAuth to authenticate users, you need to create a Google Developers project (see instructions and then add the needed configuration in the
export REDASH_GOOGLE_CLIENT_ID="" export REDASH_GOOGLE_CLIENT_SECRET=""
- Configure the domain(s) you want to allow to use with Google Apps, by running the command:
cd /opt/redash/current sudo -u redash bin/run ./manage.py org set_google_apps_domains
If you’re passing multiple domains, separate them with commas.
- Restart the web server to apply the configuration changes:
sudo supervisorctl restart redash_server.
- Once you have Google OAuth enabled, you can login using your Google Apps account. If you want to grant admin permissions to some users, you can do this by adding them to the admin group (from
- If you don’t use Google OAuth or just need username/password logins, you can create additional users by opening the
For the system to be able to send emails (for example when alerts trigger), you need to set the mail server to use and the host name of your Redash server. If you’re using one of our images, you can do this by editing the .env file:
# Note that not all values are required, as they have default values. export REDASH_MAIL_SERVER="" # default: localhost export REDASH_MAIL_PORT="" # default: 25 export REDASH_MAIL_USE_TLS="" # default: false export REDASH_MAIL_USE_SSL="" # default: false export REDASH_MAIL_USERNAME="" # default: None export REDASH_MAIL_PASSWORD="" # default: None export REDASH_MAIL_DEFAULT_SENDER="" # Email address to send from export REDASH_HOST="" # base address of your Redash instance, for example: "https://demo.redash.io"
Once you updated the configuration, restart all services with
sudo supervisorctl restart all.
- Note that not all values are required, as there are default values.
- It’s recommended to use some mail service, like Amazon SES or Mailgun to send emails to ensure deliverability.
To test email configuration, you can run bin/run ./manage.py send_test_mail (from /opt/redash/current).
How to upgrade?
It’s recommended to upgrade once in a while your Redash instance to benefit from bug fixes and new features. See here for full upgrade instructions.
Redash uses environment variables for configuration. For a full list of environment variables, see the settings article.
If this is a production setup, you should enforce HTTPS and make sure you set the cookie secret (see instructions).