Grafana Loki
Keep Grafana Loki’s log chunks and index in XNS storage; the same S3 settings shape applies to Mimir, Tempo and Thanos.
Overview
Grafana Loki is a log store for Grafana. It keeps recent logs in memory and writes compressed chunks and its TSDB index to object storage, which is where it reads them from for queries. With XNS, that object storage is a bucket on your Relayer. Grafana’s metrics and tracing stores (Mimir and Tempo) and Thanos for Prometheus use the same kind of S3 block; their settings are listed at the end of this guide.
Tested with Grafana Loki 3.7.8 (single binary, in Docker) on 2026-10-18 against Relayer build 59a37e64.
The run pushed 500 log lines through the push API, queried them back, flushed the chunks to the bucket and stopped Loki, which uploaded its index. A new Loki container with an empty local disk then returned all 500 lines from the bucket alone, matching the original by SHA-256. It ran once over HTTP on port 9000 and once over HTTPS on port 9443 with a trusted certificate. Mimir, Tempo and Thanos were not tested.
Connect to XNS
Every S3 tool connects to your Relayer with the same settings. Enter them exactly as shown; the notes below the table cover the two that most tools get wrong by default.
| Setting | Value |
|---|---|
| Endpoint (HTTP) | http://<relayer-host>:9000, where <relayer-host> is the address of the machine running your Relayer. Always available. |
| Endpoint (HTTPS) | https://<relayer-host>:9443, available only after a certificate is installed on the Relayer. Port 9000 never serves HTTPS. |
| Region | us-east-1 |
| Addressing | Path-style. In tools that ask, turn on force path style or path-style access, and turn off virtual-hosted style. |
| Signature | Signature Version 4 (V4). Version 2 is refused. |
| Access key and secret key | For a tool, create a scoped key: IAM → Create IAM User in the Relayer UI. The secret is shown once, so copy it then. The install’s root pair is on Configure → Credentials; keep it for administration. |
| Bucket | Create it first: Files → Create Bucket in the Relayer UI, or let the tool create it. Names are 3-63 characters of lowercase letters, digits, hyphens and periods. |
HTTPS and certificates. The Relayer UI offers two certificates for port 9443: Let’s Encrypt, which needs a domain managed in Cloudflare and a Cloudflare API token, or self-signed. Most tools refuse a self-signed certificate unless certificate verification is turned off in the tool. On a private network, plain HTTP on port 9000 avoids the question.
Path-style. A tool left on virtual-hosted style (often labeled Amazon S3 or AWS) sends the bucket name in the hostname, and the Relayer cannot find the bucket. Choose the tool’s S3 compatible or generic S3 option and set path-style.
Not supported: server-side encryption with customer-provided keys (SSE-C) or KMS keys (SSE-KMS), bucket website hosting and bucket replication. Server-side encryption with AES256 is accepted. See Encryption at the Gateway, Identity and Access and Configure.
Prerequisites
- Loki 3.x (single binary, Docker image
grafana/loki, or the Helm chart). - A bucket and a scoped key on your Relayer (see the table above).
Step 1: Set the storage block
This is the configuration from the tested run (a single-binary Loki), with the keys replaced by placeholders and without its short test-only chunk timers.
auth_enabled: false
server:
http_listen_port: 3100
common:
path_prefix: /loki
replication_factor: 1
ring:
kvstore:
store: inmemory
storage:
s3:
endpoint: <relayer-host>:9000
region: us-east-1
bucketnames: <bucket>
access_key_id: <access key>
secret_access_key: <secret key>
s3forcepathstyle: true
insecure: true
schema_config:
configs:
- from: 2024-01-01
store: tsdb
object_store: s3
schema: v13
index:
prefix: index_
period: 24h
compactor:
working_directory: /loki/compactor| Field | Value |
|---|---|
endpoint | <relayer-host>:9000, host and port only, with no scheme |
insecure | true for port 9000 (plain HTTP). For HTTPS use <relayer-host>:9443 and insecure: false. |
s3forcepathstyle | true. Without it Loki puts the bucket name in the hostname. |
region | us-east-1 |
bucketnames | The bucket you created on the Relayer |
Step 2: Start Loki and check it
- Start Loki and wait until
http://<loki-host>:3100/readyanswersready. - Send logs from your agent (Grafana Alloy, Promtail or any client of
/loki/api/v1/push) and query them in Grafana’s Explore view. - Chunks reach the bucket when they are full, idle or old enough (
chunk_idle_period,max_chunk_age), or at once withPOST /flush. The index is uploaded periodically and when Loki stops cleanly. List the bucket with any S3 tool: chunks sit under a folder named after the tenant (fakewhenauth_enabledis false), and the index underindex/.
Mimir, Tempo and Thanos
These use the same values (host and port endpoint, plain-HTTP switch, path-style, us-east-1). The blocks below follow each tool’s documentation. They were not tested by XNS.
Grafana Mimir
common:
storage:
backend: s3
s3:
endpoint: <relayer-host>:9000
region: us-east-1
access_key_id: <access key>
secret_access_key: <secret key>
insecure: true
bucket_lookup_type: path
blocks_storage:
s3:
bucket_name: mimir-blocks
alertmanager_storage:
s3:
bucket_name: mimir-alertmanager
ruler_storage:
s3:
bucket_name: mimir-rulerGrafana Tempo
storage:
trace:
backend: s3
s3:
bucket: <bucket>
endpoint: <relayer-host>:9000
region: us-east-1
access_key: <access key>
secret_key: <secret key>
insecure: true
forcepathstyle: trueThanos (objstore.yml)
type: S3
config:
bucket: <bucket>
endpoint: <relayer-host>:9000
region: us-east-1
access_key: <access key>
secret_key: <secret key>
insecure: true
signature_version2: false
bucket_lookup_type: pathKeep signature_version2: false in Thanos (and Tempo’s signature_v2 off): the Relayer refuses Signature Version 2. Sources: Loki storage, Mimir object storage, Tempo S3, Thanos storage.
Known limits
- Logs not yet flushed live only on Loki’s disk. Stop Loki cleanly (it flushes chunks and uploads its index on shutdown) or keep its local directory on persistent storage.
- Retention and deletion were not tested. Loki removes old chunks through its compactor when retention is turned on; a bucket lifecycle rule is an alternative for whole-bucket expiry.
- HTTPS needs port 9443 and an installed certificate. A self-signed certificate was not tested.
- Mimir, Tempo and Thanos were not tested; their blocks above follow their documentation.
- Not supported by the Relayer: SSE-C and SSE-KMS server-side encryption and bucket replication. Server-side encryption with
AES256is accepted.
