Deploy Retool on a local machine
Learn how to deploy Self-hosted Retool on your local machine.
Follow the instructions in this guide to deploy self-hosted Retool on your local machine.
Local deployments are not intended for production use. You should instead deploy Retool on a virtual machine such as AWS EC2, Azure VM, or GCP Compute Engine. Virtual machine hardware and operating systems are more standardized than physical machines, which makes them more robust for production deployments.
Requirements
To deploy Retool on your local machine, you need:
- A Retool license key, which you can obtain from my.retool.com or your Retool account manager.
- A working installation of Docker desktop.
1. Install Retool
- Clone the
retool-on-premise
repository and change your working directory toretool
.
git clone https://github.com/tryretool/retool-onpremise.git retool
cd retool
- Run the
docker_setup
script to create adocker.env
file.
./docker-setup
2. Update environment variables
On Docker deployments, environment variables are set in docker.env
.
-
In
docker.env
, setLICENSE_KEY
to your license key. -
In
docker.env
, uncomment theCOOKIE_INSECURE=true
line. After you set up SSL, you should setCOOKIE_INSECURE
tofalse
. -
Copy the
ENCRYPTION_KEY
indocker.env
generated by the install script. Save this key in a secure location outside of Retool. This key encrypts secrets for your Retool resources.
3. Set the version and start Retool
-
In your
Dockerfile
, replaceX.Y.Z
with a Retool version tag, for example2.116.3
. Identify the appropriate release version by viewing the tags on Docker Hub. See Retool's self-hosted release notes to learn about version-specific features. -
Start Retool. It may take a few minutes to pull the images and start each service.
sudo docker-compose up -d
- Confirm the containers are running.
sudo docker-compose ps
Self-hosted Retool is now running. Go to http://0.0.0.0:3000/
to create your Retool admin account.
Additional steps
Use these additional steps to keep your local instance up-to-date.
Update Retool
- Update your
Dockerfile
with the newer version number.
FROM tryretool/backend:X.Y.Z
- Install the upgrade.
./update_retool.sh
Retool instances temporarily go down while they upgrade. You can check the status of your containers with sudo docker-compose ps
.
Update configuration files
Occasionally, new Retool products and features require updates to the configuration files in retool-onpremise
or other Retool repositories. To update these files when new features are available, pull the changes using Git.
cd retool
git pull
Refer to the product or feature-specific documentation for configuration instructions.
Updated 6 days ago