Self-host Grafana Loki with Levelrail

Verified

A horizontally scalable log aggregation system that indexes labels, not full text, to keep storage cheap.

  • AuthorgrafanaVerified by Levelrail
  • LicenceAGPL-3.0-only
  • Memory512 MiB
  • Archarm64
  • Services1

How to self-host Grafana Loki

  1. Pull the images

    One image is pulled on your server.

    Show images
    • grafana/loki:3.7.8
  2. Create the app

    One service starts in a single Compose app, with 1 named volume mount for your data, on port 3100.

  3. Fill in the secrets

    You do not have to fill in anything.

  4. 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

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/loki/deploy

Grafana Loki configuration

Grafana Loki services

ServiceImagePortsVolumes
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.

levelrail-cli templates deploy loki --name my-loki