Deploying ToolJet using Docker Compose
Follow the steps below to deploy ToolJet on a server using Docker Compose. ToolJet requires a PostgreSQL database to store applications definitions, (encrypted) credentials for datasources and user authentication data.
If you rather want to try out ToolJet on your local machine with Docker, you can follow the steps here.
Installing Docker and Docker Compose
Install docker and docker-compose on the server.
- Docs for Docker Installation
- Docs for Docker Compose Installation
Deployment options
There are four options to deploy ToolJet using Docker Compose:
- Using an external PostgreSQL database. This setup is recommended if you want to use a managed PostgreSQL service such as AWS RDS or Google Cloud SQL.
- Using in-built PostgreSQL database. This setup uses the official Docker image of PostgreSQL.
- Using an external PostgreSQL database and auto SSL. Recommended only if you want the Docker container itself to do SSL termination.
- Using in-built PostgreSQL database and auto SSL. Recommended only if you want the Docker container itself to do SSL termination.
Confused about which setup to select? Feel free to ask the community via Slack: https://tooljet.com/slack.
We recommend using the managed PostgreSQL service on production for ease of administration, security, and management (backups, monitoring, etc). If you'd want to run postgres with persistent volume rather, curl for the alternate docker compose file shared in the next step.
- With external DB
- With in-built DB
- With auto SSL & external DB
- With auto SSL & in-built DB
Setup a PostgreSQL database and make sure that the database is accessible.
Download our production docker-compose file into the server.
curl -LO https://raw.githubusercontent.com/ToolJet/ToolJet/main/deploy/docker/docker-compose.yaml
Create
.env
file in the current directory (where the docker-compose.yaml file is downloaded):curl -LO https://raw.githubusercontent.com/ToolJet/ToolJet/main/deploy/docker/.env.example
mv .env.example .envSet up environment variables in
.env
file as explained in environment variables referenceTOOLJET_HOST
environment variable can either be the public ipv4 address of your server or a custom domain that you want to use.Examples:
TOOLJET_HOST=http://12.34.56.78
orTOOLJET_HOST=https://yourdomain.com
orTOOLJET_HOST=https://tooljet.yourdomain.com
信息Please make sure that
TOOLJET_HOST
starts with eitherhttp://
orhttps://
信息If there are self signed HTTPS endpoints that Tooljet needs to connect to, please make sure that
NODE_EXTRA_CA_CERTS
environment variable is set to the absolute path containing the certificates.Once you've populated the
.env
file, rundocker-compose up -d
to start all the required services.
信息If you're running a linux server,
docker
might need sudo permissions. In that case you can either run:sudo docker-compose up -d
or setup docker to run without root privileges by following the instructions written here https://docs.docker.com/engine/install/linux-postinstall/If you've set a custom domain for
TOOLJET_HOST
, add aA record
entry in your DNS settings to point to the IP address of the server.
Download our production docker-compose file into the server.
curl -LO https://raw.githubusercontent.com/ToolJet/ToolJet/main/deploy/docker/docker-compose-db.yaml
mv docker-compose-db.yaml docker-compose.yaml
mkdir postgres_dataCreate
.env
file in the current directory (where the docker-compose.yaml file is downloaded):curl -LO https://raw.githubusercontent.com/ToolJet/ToolJet/main/deploy/docker/.env.example
mv .env.example .envSet up environment variables in
.env
file as explained in environment variables referenceTOOLJET_HOST
environment variable can either be the public ipv4 address of your server or a custom domain that you want to use.Examples:
TOOLJET_HOST=http://12.34.56.78
orTOOLJET_HOST=https://yourdomain.com
orTOOLJET_HOST=https://tooljet.yourdomain.com
信息Please make sure that
TOOLJET_HOST
starts with eitherhttp://
orhttps://
信息If there are self signed HTTPS endpoints that Tooljet needs to connect to, please make sure that
NODE_EXTRA_CA_CERTS
environment variable is set to the absolute path containing the certificates.Once you've populated the
.env
file, rundocker-compose up -d
to start all the required services.
信息If you're running on a linux server,
docker
might need sudo permissions. In that case you can either run:sudo docker-compose up -d
OR Setup docker to run without root privileges by following the instructions written here https://docs.docker.com/engine/install/linux-postinstall/If you've set a custom domain for
TOOLJET_HOST
, add aA record
entry in your DNS settings to point to the IP address of the server.
Setup a PostgreSQL database and make sure that the database is accessible.
Download our production docker-compose file into the server.
curl -LO https://raw.githubusercontent.com/ToolJet/ToolJet/main/deploy/docker/docker-compose-ssl.yaml
mv docker-compose-ssl.yaml docker-compose.yamlCreate
.env
file in the current directory (where the docker-compose.yaml file is downloaded):curl -LO https://raw.githubusercontent.com/ToolJet/ToolJet/main/deploy/docker/.env.example
mv .env.example .envSet up environment variables in
.env
file as explained in environment variables referenceTOOLJET_HOST
environment variable can either be the public ipv4 address of your server or a custom domain that you want to use.信息We use the lets encrypt plugin on top of nginx to create TLS certificates on the fly. And in case you want to modify the nginx config, you can use this template and then mount the volume at
/etc/openresty/nginx.conf.template
on the client container.Examples:
TOOLJET_HOST=http://12.34.56.78
orTOOLJET_HOST=https://yourdomain.com
orTOOLJET_HOST=https://tooljet.yourdomain.com
信息Please make sure that
TOOLJET_HOST
starts with eitherhttp://
orhttps://
信息If there are self signed HTTPS endpoints that Tooljet needs to connect to, please make sure that
NODE_EXTRA_CA_CERTS
environment variable is set to the absolute path containing the certificates.Once you've populated the
.env
file, rundocker-compose up -d
to start all the required services.
信息If you're running on a linux server,
docker
might need sudo permissions. In that case you can either run:sudo docker-compose up -d
OR Setup docker to run without root privileges by following the instructions written here https://docs.docker.com/engine/install/linux-postinstall/If you've set a custom domain for
TOOLJET_HOST
, add aA record
entry in your DNS settings to point to the IP address of the server.
Download our production docker-compose file into the server.
curl -LO https://raw.githubusercontent.com/ToolJet/ToolJet/main/deploy/docker/docker-compose-ssl-db.yaml
mv docker-compose-ssl-db.yaml docker-compose.yaml
mkdir postgres_dataCreate
.env
file in the current directory (where the docker-compose.yaml file is downloaded):curl -LO https://raw.githubusercontent.com/ToolJet/ToolJet/main/deploy/docker/.env.example
mv .env.example .envSet up environment variables in
.env
file as explained in environment variables referenceTOOLJET_HOST
environment variable can either be the public ipv4 address of your server or a custom domain that you want to use.信息We use the lets encrypt plugin on top of nginx to create TLS certificates on the fly. And in case you want to modify the nginx config, you can use this template and then mount the volume at
/etc/openresty/nginx.conf.template
on the client container.Examples:
TOOLJET_HOST=http://12.34.56.78
orTOOLJET_HOST=https://yourdomain.com
orTOOLJET_HOST=https://tooljet.yourdomain.com
信息Please make sure that
TOOLJET_HOST
starts with eitherhttp://
orhttps://
信息If there are self signed HTTPS endpoints that Tooljet needs to connect to, please make sure that
NODE_EXTRA_CA_CERTS
environment variable is set to the absolute path containing the certificates.Once you've populated the
.env
file, rundocker-compose up -d
to start all the required services.
信息If you're running on a linux server,
docker
might need sudo permissions. In that case you can either run:sudo docker-compose up -d
OR Setup docker to run without root privileges by following the instructions written here https://docs.docker.com/engine/install/linux-postinstall/If you've set a custom domain for
TOOLJET_HOST
, add aA record
entry in your DNS settings to point to the IP address of the server.
Creating admin workspace and account
docker-compose exec server npm run db:seed:prod
This seeds the database with a default user with the following credentials:
- email: `dev@tooljet.io`
- password: `password`
Make sure that the server can receive traffic on port 80 & 443. For example, if the server is an AWS EC2 instance and the installation should receive traffic from the internet, the inbound rules of the security group should look like this:
protocol | port | allowed_cidr |
---|---|---|
TCP | 80 | 0.0.0.0/0 |
TCP | 443 | 0.0.0.0/0 |
You're all done! ToolJet would now be served at the URL you've set in TOOLJET_HOST
.