Self-host Consul with Levelrail
VerifiedHashiCorp Consul in single-server mode with the web UI: service discovery, health checks and a key-value store.
- Authorhashicorp
- LicenceBUSL-1.1
- Memory256 MiB
- Archarm64
- Services1
How to self-host Consul
-
Pull the images
One image is pulled on your server.
Show images
hashicorp/consul:1.20
-
Create the app
One service starts in a single Compose app, with 1 named volume mount for your data, on port 8500.
-
Fill in the secrets
1 setting is preset, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
Consul requirements
- Memory
- About 256 MiB
- Architectures
- amd64 image published, arm64 tested
- Ports
- 8500
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- BUSL-1.1, source available
- Verified. Verified on arm64 with image tag 1.20. Our CI ran this exact image version and it answered on its health path. Evidence
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Consul. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the Consul docs page.
Deploy Consul your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy Consul from the CLI
levelrail-cli templates deploy consul --name my-consul Deploy Consul with the API
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://levelrail.example.com/api/v1/service-templates/consul/deploy Consul configuration
Consul services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| consul | hashicorp/consul:1.20 | 8500 | data -> /consul/data |
Consul environment variables
| Variable | Service | Value |
|---|---|---|
| CONSUL_BIND_INTERFACE | consul | Preset by the template |
Ports and volumes
- Ports
- 8500
- Volumes
- 1 named mount: data -> /consul/data
Consul FAQ
How much memory does Consul need?
The catalog lists about 256 MiB of memory for Consul.
Does Consul run on arm64?
For Consul, arm64 is tested; amd64 is image published.
What licence is Consul under?
Consul is licensed under BUSL-1.1, which is source-available, so read the terms before commercial use.
Does Consul need configuration before it starts?
No. The template fills in its own defaults.
Which ports does Consul use?
Consul listens on port 8500 inside the stack.
Where does Consul keep its data?
In a named volume: data mounted at /consul/data.
Can I deploy Consul on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Consul, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image hashicorp/consul:1.20 is what you deploy there.