Self-host ClickHouse with Levelrail
A columnar database built for fast analytical queries over large datasets.
- AuthorClickHouse
- LicenceApache-2.0
- Memory1 GiB
- Archarm64
- Services1
How to self-host ClickHouse
-
Pull the images
One image is pulled on your server.
Show images
clickhouse/clickhouse-server:26.3-alpine
-
Create the app
One service starts in a single Compose app, with 1 named volume mount for your data, on port 8123.
-
Fill in the secrets
1 secret is generated and stored encrypted, 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.
ClickHouse requirements
- Memory
- About 1 GiB
- Architectures
- amd64 image published, arm64 image published
- Ports
- 8123
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- Apache-2.0, permissive license
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
- Host ports. It publishes port 8123 on the host, so open them in the VPS firewall only if you want that.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then ClickHouse. 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 ClickHouse docs page.
Deploy ClickHouse your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy ClickHouse from the CLI
levelrail-cli templates deploy clickhouse --name my-clickhouse Deploy ClickHouse with the API
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://levelrail.example.com/api/v1/service-templates/clickhouse/deploy ClickHouse configuration
ClickHouse services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| clickhouse | clickhouse/clickhouse-server:26.3-alpine | 8123 | clickhouse_data -> /var/lib/clickhouse |
ClickHouse environment variables
| Variable | Service | Value |
|---|---|---|
| CLICKHOUSE_PASSWORD | clickhouse | Generated at deploy |
Ports and volumes
- Ports
- 8123
- Volumes
- 1 named mount: clickhouse_data -> /var/lib/clickhouse
ClickHouse FAQ
How much memory does ClickHouse need?
The catalog lists about 1 GiB of memory for ClickHouse.
Does ClickHouse run on arm64?
For ClickHouse, an arm64 image is published; amd64 is image published.
What licence is ClickHouse under?
ClickHouse is licensed under Apache-2.0, which is permissive, with few conditions on reuse.
Does ClickHouse need configuration before it starts?
No. The template fills in its own defaults and generates secrets at deploy time.
Which database does ClickHouse bundle?
The template includes ClickHouse, running as part of the stack.
Which ports does ClickHouse use?
ClickHouse listens on port 8123 inside the stack.
Where does ClickHouse keep its data?
In a named volume: clickhouse_data mounted at /var/lib/clickhouse.
Can I deploy ClickHouse on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id clickhouse for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image clickhouse/clickhouse-server:26.3-alpine is what you deploy there.