AWS Deploy

Using Retool with EC2

This guide will walk you through how to deploy Retool on your own AWS EC2 instance.

Spinning up an EC2 instance

  1. Log into AWS and go to the EC2 dashboard; Click “Launch Instance”
  1. Select Ubuntu 20.04

  2. Select the instance type. You should choose at least t2.medium.

  3. Make sure you select the VPC that also includes the databases / API’s you will want to connect to.

  1. Make sure there is at least 60 GiB of storage. Most of the Retool storage database is actually taken up by audit logs.

  2. Optionally add some Tags, e.g. app = retool. In general, you can skip this unless you have a lot of instances.

  3. Set the security groups. We need to open ports 80 (http) and 443 (https) so that you can connect to the server from a browser, as well as port 22 (ssh) so that we can ssh into the instance to configure it and run Retool. We also need to add in a Custom TCP rule to open port 3000.

  1. When launching the instance, create a new key pair or select a preexisting one. Download the .pem file and make sure it’s stored in a folder you’ll remember on your computer
  1. After a few minutes you should see the instance with a status of running

Connect to the EC2 instance

  1. Now that the instance is launched, click Connect in the EC2 dashboard. We’ll see the command we need to run to connect to the EC2 instance
  1. Launch the terminal on your computer and navigate to the folder where your .pem file is stored, then connect to your EC2 server:
chmod 400 YOUR_PEM_FILE.pem # only need to run the first time you use this pem file
    ssh -i "YOUR_PEM_FILE.pem" [email protected]_IP.compute-1.amazonaws.com
    # You should now be in the EC2 server!

Install Retool

Running the easy install script

Run this script to create Retool at ~/retool/retool-onpremise and run the docker containers

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/tryretool/retool-onpremise/master/local-trial)"

Retool will now be running at localhost:3000. You can open this page in your browser then click sign up.

Installing Retool without the script

Prefer to install manually rather using the script? That's cool too. Just follow the steps below to clone our docker image and spin up Retool.

# clone the Retool on-premise repo
git clone https://github.com/tryretool/retool-onpremise

# cd into the folder
cd retool-onpremise/

# install Docker and Docker Compose; this script will also set up all the environment variables you'll need
./install.sh
# Just click enter on this prompt: "Please type your fully qualified domain below..."

# start the retool server (this could take 1-2 minutes)
sudo docker-compose up -d

Once it’s done, make sure the server is running with sudo docker-compose ps. Navigate to the public IP address of your EC2 instance in a browser, and you should see Retool (add :3000 to the end of the URL if it doesn’t work!). You will get a notice in your browser that the site is not trusted, this is because we haven’t set up a trusted certificate yet — just navigate through anyway and you can configure this here when you're ready.

That's it! You're done.

Explaining the script

The script you ran did three main things:

  1. Downloaded the latest version of Retool and installed it in ~/Retool
  2. Configured the docker.env file with the correct environment variables
  3. Ran the Retool docker containers

To stop running Retool, you can end the process by running stop-local-trial, which is inside ~/retool/retool-onpremise by default.

Next steps

That's it! Have fun, build a few apps, and reach out if you'd like help with a larger deployment!


Did this page help you?