Self-hosting
In this article, you will be guided through how to host Lowcoder on your own server using Docker-Compose or Docker.
There are multiple ways of installation. We directly support:
Single Docker Image to run with a single line of command.
Multi-Docker Image deployment for scaling scenarios with Docker Compose
Kubernetes-based deployment with HELM Charts.
1) Start easy:
For easy setup and deployment, we provide an all-in-one image that bundles frontend, backend, and data persistence services altogether in one single container.
All-in-one image
Prerequisites
Docker (version 20.10.7 or above)
Docker-Compose (version 1.29.2 or above)
Recommended system spec: 1-core CPU and 2 GB RAM.
Windows users are recommended to use PowerShell for running the commands below.
In your working directory, run the following commands to make a directory named Lowcoder
to store the data of Lowcoder:
Deploy
Follow the steps below:
Download the configuration file by clicking docker-compose.yml or running the curl command:
Start the Docker container by running this command:
The docker image, about 400 MB, is downloaded during the initial start-up.
After downloading, it usually takes less than 30 seconds to start the service.
Check the logs by running this command:
When you see
frontend
,backend
,redis
, andmongo
entered the RUNNING state
, the Lowcoder service has officially started:Visit http://localhost:3000 and click Sign up. Lowcoder will automatically create a workspace for you, then you can start building your apps and invite members to your workspace.
Update to the latest version
Run the following commands to update to the latest Lowcoder image:
2) Scale
For bigger expected loads that need scaling in a cluster environment, we provide separate images of backend and frontend services with a customizable Dockerfile.
Separate images: services in stateless containers
For bigger expected loads that need scaling in a cluster environment, we offer separate images for stateless containers of the backend and frontend service with a customizable Dockerfile. A well-functioning Lowcoder deployment consists of below services:
api-service: Backend service.
node-service: Backend service.
frontend: Frontend service.
MongoDB: Used for persisting data of users, apps, data sources, etc.
Redis: Used for maintaining user sessions, rate-limiter, etc.
Prerequisites
Docker-Compose (version 1.29.2 or above)
Deploy
In your working directory, run the following commands to make a directory named
lowcoder
to store the data of Lowcoder:Download the configuration file by clicking docker-compose-multi.yml or running the curl command:
Modify service configurations in the downloaded Dockerfile according to your needs:
mongodb: Start a new MongoDB instance on your host. You can delete this part and modify the environment variable
MONGODB_URI
of the api-service to use your own MongoDB.redis: Start a new Redis instance on your host. You can delete this part and modify the environment variable
REDIS_URI
of the api-service to use your own Redis.api-service: Required.
node-service: Required.
frontend: Required. Can be optional if you deploy the frontend on CDN.
Start Docker containers by running this command:
Visit http://localhost:3000 and click Sign up. Lowcoder will automatically create a workspace for you, then you can start building your apps and invite members to your workspace.
3) Update to the latest version
Run the following commands to update services to the latest in a Docker Compose installation:
Please also have a look at this migration / update guide
4) Customize the deployment
This section shows how to customize deployment configurations by setting environment variables.
If you have already started Docker containers, you need to restart the containers for new configurations to take effect. For example, the way to restart your container running an all-in-one image is:
One single command:
It picks up configuration changes by stopping containers already in service and recreating new ones.
Below are examples of configuring the all-in-one image by setting environment variables in docker-compose.yml
. If you are self-hosting with separate images, modify the lowcoder-api-service
part of the docker-compose-multi.yml
file instead.
For more information about configurations and environment variables, see Configuration.
Use your own MongoDB and Redis
By default, Lowcoder uses the built-in MongoDB and Redis installed inside the container, and you can replace them with your own MongoDB and Redis clusters.
Add environment variables MONGODB_URI
and REDIS_URI
in docker-compose.yml
downloaded in your working directory.
Run as non-root user
By default, the supervisor will run under the user uid=9001
. You can specify the uid by adding a docker environment variable LOCAL_USER_ID
and setting its value to a different number, such as 10010
.
Add an environment variable LOCAL_USER_ID
in docker-compose.yml
downloaded in your working directory.
5) Secure your deployment
Install SSL certificate
With an SSL certificate, you can securely visit self-hosted Lowcoder with HTTPS protocol. Here are the steps to install your SSL certificate before starting a container:
Copy
fullchain.pem
andprivkey.pem
to the$PWD/lowcoder-stacks/ssl
directory.In
$PWD/docker-compose.yml
, change the value ofports
to"3443:3443"
.
In cases where you have certificates with names: server.crt
and server.key
, you need to rename them first as follows:
server.crt
=> fullchain.pem
server.key
=> privkey.pem
6) Configure the Environment
ENV Variables for Helm, Docker Compose, and Docker installations are to find in the most current version on our Github Repository.
ENV Variables for the all-in-one image
This image contains all services needed to run Lowcoder platform in one container.
API Key Secret
Also, you should set the API-KEY secret, whcih should be a string of at least 32 random characters On linux/mac, generate one eg. with: head /dev/urandom | head -c 30 | shasum -a 256
SMTP Server
To enable secure Password Reset flow for the users, you need to configure your own SMTP Server. You can do this with the following Variables (from Lowcoder v2.4.x on):
ENV Variables for the api-service image
API Key Secret
Also, you should set the API-KEY secret, whcih should be a string of at least 32 random characters On linux/mac, generate one eg. with: head /dev/urandom | head -c 30 | shasum -a 256
SMTP Server
To enable secure Password Reset flow for the users, you need to configure your own SMTP Server. You can do this with the following Variables (from Lowcoder v2.4.x on):
ENV Variables for the node-service image
ENV Variables for the web frontend image
Health checks
The API Service has an included health check endpoint from v2.4.1 on.
You can check the health of the running API Service and it's connected MongoDB & Redis by the following HTTP Call:
In response, you will get a 200 Status code if the service is up and running and a JSON like this:
Last updated