Self-host Grafana Loki with Levelrail
VerifiedA horizontally scalable log aggregation system that indexes labels, not full text, to keep storage cheap.
- Authorgrafana
- LicenceAGPL-3.0-only
- Memory512 MiB
- Archarm64
- Services1
How to self-host Grafana Loki
-
Pull the images
One image is pulled on your server.
Show images
grafana/loki:3.7.8
-
Create the app
One service starts in a single Compose app, with 1 named volume mount for your data, on port 3100.
-
Fill in the secrets
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.
Grafana Loki requirements
- Memory
- About 512 MiB
- Architectures
- amd64 image published, arm64 tested
- Ports
- 3100
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- AGPL-3.0-only, network copyleft (agpl) license
- Verified. Verified on arm64 with image tag 3.7.8. Our CI ran this exact image version and it answered on its health path. Evidence
- Host ports. It publishes port 3100 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 Grafana Loki. 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 Grafana Loki docs page.
Deploy Grafana Loki your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy Grafana Loki from the CLI
levelrail-cli templates deploy loki --name my-loki Deploy Grafana Loki with the API
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://levelrail.example.com/api/v1/service-templates/loki/deploy Grafana Loki configuration
Grafana Loki services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| loki | grafana/loki:3.7.8 | 3100 | loki_data -> /loki |
Grafana Loki environment variables
The catalog lists no environment variables for this template.
Ports and volumes
- Ports
- 3100
- Volumes
- 1 named mount: loki_data -> /loki
Grafana Loki FAQ
How much memory does Grafana Loki need?
The catalog lists about 512 MiB of memory for Grafana Loki.
Does Grafana Loki run on arm64?
For Grafana Loki, arm64 is tested; amd64 is image published.
What licence is Grafana Loki under?
Grafana Loki is licensed under AGPL-3.0-only, which is network copyleft, so source sharing also applies when it is offered as a hosted service.
Does Grafana Loki need configuration before it starts?
No. The template fills in its own defaults.
Which ports does Grafana Loki use?
Grafana Loki listens on port 3100 inside the stack.
Where does Grafana Loki keep its data?
In a named volume: loki_data mounted at /loki.
Can I deploy Grafana Loki 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 Grafana Loki, 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 grafana/loki:3.7.8 is what you deploy there.