Setting Up a Cluster
This guide walks you through creating a Docker Swarm cluster in Appliku.
Requirements
- A server for a leader node — manages the cluster and runs the Nginx load balancer
- A server for a worker node — runs your applications
- A build server — it is recommended to have your build server be a standalone server (not part of the cluster), as builds can affect cluster operations. It is not recommended to use the cluster leader as a build server.
Optional:
- A database server outside of the cluster. Databases deployed via Appliku can only be deployed to standalone servers.
Supported OS: Ubuntu 22.04 LTS, Ubuntu 24.04 LTS, or Debian 12 with x86_64 or arm64 architecture. All servers in a cluster should have the same architecture.
Appliku will install all necessary packages and configure them, including Docker. Docker Swarm will be initialized automatically.
Step 1: Create a Leader Server
Go to Servers and click "Add a Server" as usual, but instead of creating a standalone server, pick "Create a new Cluster" and give it a name, then click "Create a server".
Step 2: Wait for Leader Setup
After creating a server as a new cluster leader, you will be taken to a new cluster page. Wait for the leader to finish setting up.
Step 3: Add Container Registry Credentials
To deploy an application in a cluster you must add container registry credentials where the application image will be pushed after build and pulled by cluster nodes to deploy.
While you can use any Container Registry (CR), the easiest option is to use the CR from GitHub or GitLab, where your git repository is hosted.
When you add credentials they will be verified and added to the leader node, then distributed across all nodes upon deployment. They will also be stored to push images from the build servers after successful builds.
Step 4: Add Build Server(s)
For a cluster to build applications, it needs one or more build servers. Multiple build servers are useful if you have many concurrent builds or builds that take a long time.
- Add a server as usual to Appliku (standalone)
- Wait for setup to finish
- Go to your cluster, scroll down to "Build Servers", and click "Add Build Server"
- Select the server you prepared for this role
Add more build servers if you need them.
Step 5: Create an Application in the Cluster
- Create an application — as a deployment target, select your newly created cluster
- Add a database if needed (remember: databases can only be deployed on standalone servers, not in the cluster)
- Add processes and environment variables, choose build settings, and deploy
The build process is the same as for regular apps, but includes pushing the built image to the container registry and pulling it on cluster nodes.
On the Processes tab, you can set the scale for each process — the number of replicas in Docker Swarm terms.
Limitations Compared to Standalone Apps
- One-off jobs (release phase commands and commands run from the dashboard "Run Command") are executed from the leader node
- Persistent Volumes are not supported for apps in clusters