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.
1.**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.
2.**Using in-built PostgreSQL database**. This setup uses the official Docker image of PostgreSQL.
Set up environment variables in `.env` file as explained in [environment variables reference](/docs/setup/env-vars)
`TOOLJET_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` or
`TOOLJET_HOST=https://yourdomain.com` or
`TOOLJET_HOST=https://tooljet.yourdomain.com`
:::info
Please make sure that `TOOLJET_HOST` starts with either `http://` or `https://`
:::
:::info
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.
Kindly uncomment PostgREST service within the [docker-compose.yaml](https://raw.githubusercontent.com/tooljet/tooljet/main/deploy/docker/docker-compose.yaml) if you intend to use tooljet database.
Set up environment variables in `.env` file as explained in [environment variables reference](/docs/setup/env-vars)
`TOOLJET_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` or
`TOOLJET_HOST=https://yourdomain.com` or
`TOOLJET_HOST=https://tooljet.yourdomain.com`
:::info
Please make sure that `TOOLJET_HOST` starts with either `http://` or `https://`
:::
:::info
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.
Kindly uncomment PostgREST service within the [docker-compose.yaml](https://raw.githubusercontent.com/ToolJet/ToolJet/main/deploy/docker/docker-compose-db.yaml) if you intend to use tooljet database.