Why moving Loki to the Thanos object storage clients is a config change with real risk
Moving an existing Loki cluster to the Thanos objstore clients is mostly a configuration change, but it touches every component that reads or writes chunks and index files, so the risk lies in the rollout rather than the edit. Loki added these clients in 3.4, and in 3.x they are opt-in through use_thanos_objstore: true. Loki 4.0 makes them the default and deprecates the legacy clients, so a cluster that stays on the old clients will need to move before or during its 4.0 upgrade. The core task is to change storage configuration and roll it out consistently across the write, read and backend paths, plus any compactor or ruler that touches the same bucket.
The risk comes from mixed state. If some components load the new client and others still use the legacy one during a rolling restart, you need to confirm that every component can read data written by the other before you move on. Start by inventorying each pod, container or host that carries the Loki configuration file, including the compactor, since retention deletes objects and a wrong bucket or prefix there can remove data you meant to keep. Confirm the exact configuration keys in the storage client documentation for your Loki version, and test the change in a non-production bucket with a copy of real data before touching production.
Effort depends on how many components share one configuration, whether you run in monolithic, simple scalable or microservices mode, and how many storage backends you operate. Confirm with your platform team how configuration is delivered (Helm values, a shared file or a secret) and how long a rolling restart takes in your environment, since neither is supplied here. The Loki storage client migration guide is the primary reference for the switch and should be read against your exact version before you schedule the change.
Which storage settings map cleanly to the Thanos clients and which need review
This table compares each storage backend Loki uses for chunks and indexes with what changes under the Thanos objstore clients. Read the status column first: backends marked as likely carrying over still need key-by-key confirmation, and rows marked for review should be checked against the migration documentation before you change a running cluster.
| Backend or setting | Status under the Thanos clients | What to confirm before switching |
|---|---|---|
| Amazon S3 | Recommended production store, likely carries over | Confirm region, endpoint, bucket and prefix keys in the migrate storage clients docs before editing values |
| Google Cloud Storage | Recommended production store, likely carries over | Confirm bucket and prefix keys and how service account credentials are supplied in the new format |
| Azure Blob Storage | Recommended production store, needs review | Confirm account, container and authentication settings, since key names may differ from the legacy block |
| MinIO and other S3-compatible stores | Supported, not typically recommended for production | Confirm endpoint, path-style addressing, TLS and insecure flags against the new client settings |
| Local filesystem | Supported, not typically recommended for production | Confirm the directory path and that existing chunk and index files remain readable after the switch |
| Credentials and identity | Needs review on every backend | Check whether static keys, IAM roles, workload identity or managed identity are supported in the same form |
| Bucket names and prefixes | Needs review on every backend | A changed prefix can make existing objects unreachable, so keep the current path until the migration is verified |
| Shared config with Mimir | Changes the review scope | Confirm that shared settings do not force Mimir to change its own storage keys during the same window |
How use_thanos_objstore changes the storage configuration
In Loki 3.x, the Thanos-based object storage clients are opt-in. Loki added them in 3.4, and you enable them by setting use_thanos_objstore: true in the storage configuration. Until you set that switch, Loki keeps reading the legacy clients, so the change is a deliberate step rather than something that happens on upgrade. Loki 4.0 uses the Thanos-based clients by default and deprecates the legacy ones, which is why the switch is worth planning for now. The official migration guide at Migrate to Thanos storage clients describes the new layout, and you should read it against the exact Loki version you run before editing anything.
The reason Grafana Labs gives for the change is consistent storage configuration across Loki, Mimir and other Grafana telemetry databases. In practice, the new format lets you describe the bucket for each backend in the same way across those products, so an operator who has configured one of them can recognize the layout in another. The important operational rule is that every component (ingesters, queriers, compactor, index gateway and ruler) must read the same storage block. If the compactor applies retention with one bucket definition while the queriers read another, you get chunks that are written, deleted or never found depending on which component touches them. Before a rollout, compare the storage block on every component, not just on the component you edited first.
Confirm three things in your own environment before you change a value. First, confirm the exact key names and nesting that your Loki version expects for S3, GCS, Azure and filesystem storage, because the layout is the part of the migration most likely to differ between releases. Second, confirm which components in your deployment mode read the storage block, including the index gateway and ruler if you run them. Third, record the current configuration for every component so you can roll back to the legacy form if a component fails to start. Ask your vendor or internal platform owner to confirm the bucket names, credentials source and endpoint values match what the Thanos-based clients will read, since a mismatch here usually shows up as missing data rather than an obvious startup error.
How the move differs by storage backend
Amazon S3 is one of the recommended production object stores for Loki, so most production clusters start here. The move is mainly about carrying identity and endpoint settings into the new client without changing where data lives. Confirm which authentication method your ingesters, queriers, compactor and index gateway use today, whether that is an access key pair, an instance or pod role, or a web identity token, and make sure every component receives the same permissions after the switch.
- Credentials and roles: Verify that each component's IAM role or key still grants read, write, list and delete on the Loki bucket, since the compactor needs delete rights when retention is on.
- Endpoint and region: Confirm the region and any custom endpoint, and whether path-style addressing is in use for S3-compatible services.
- Bucket layout: Keep the existing bucket name and prefixes unchanged so chunks and index files written before the switch stay readable.
- Encryption and lifecycle rules: Check bucket policies, server-side encryption settings and any lifecycle rules that could delete objects Loki still needs.
- Pre-cutover test: In a non-production cluster, run a write, a query over data written before the change, and a compactor pass against a copy of the bucket.
Check the exact configuration keys in the Loki migration guide before editing any file.
Google Cloud Storage uses a service account or workload identity model, and the main risk is that a component silently loses access after a configuration rewrite. The bucket layout is the same data you already have, so the goal is to change only the client configuration. Ask which service account each Loki component uses, and confirm that the account can read, write, list and delete objects in the bucket.
- Service account and workload identity: Confirm which identity each component runs as and that the mapping still applies in the cluster after the change.
- Credential files: If a key file is mounted into pods or hosts, check its path, permissions and rotation schedule.
- Bucket name and prefixes: Keep the bucket and object prefixes identical so existing index and chunk paths resolve.
- Retention and object holds: Check for retention policies or holds on the bucket that could block compactor deletions or conflict with your retention settings.
- Pre-cutover test: Run a rolling restart in a staging environment, then confirm writes, queries over older data and a compactor run all succeed before touching production.
Record the service account names and bucket settings in your change record so the rollback path is clear.
Azure Blob Storage is also a recommended production store. The migration risk here is usually in account keys, managed identities and container naming, which are easy to change in one place and forget in another. Document which authentication method each component uses today, then confirm the same method is expressed in the new client configuration for every component, including those that run only in read paths.
- Authentication method: Confirm whether components use a shared account key, a SAS token or a managed identity, and that each one still has the required data-plane permissions.
- Account and endpoint: Verify the storage account name and endpoint suffix, particularly for sovereign or private cloud Azure environments.
- Container layout: Keep the container name and blob prefixes unchanged so existing data remains addressable.
- Secret rotation: If keys are rotated, make sure the rotation process updates every component's secret, not just the ingesters.
- Pre-cutover test: Run a write and read cycle, then trigger a compactor pass and confirm retention deletions behave as expected in a copy of the container.
Confirm the exact keys with the migration guide and with your Azure administrator before rollout.
Filesystem storage is supported for Loki, but the documentation notes it is not typically recommended for production. In a single-node or lab setup, the migration is mostly about the directory path and file ownership, and it often has no cloud credentials to move. The risk is that data is stored on a single host and a path change or permission change can make the whole store appear empty, so verify access before anything else.
- Directory path: Confirm the exact path used for chunks and index files and keep it identical in the new configuration.
- File ownership and permissions: Check that the Loki process user can read, write and delete files in those directories, including after any service restart.
- Volume mounts in containers: If Loki runs in a container, verify that the volume mount still points at the same host or persistent volume.
- Backups: Take a copy of the directory before the change, because a misconfigured path can leave the cluster looking like it has no history.
- Pre-cutover test: Start the upgraded process against a copy of the directory, then query a time range you know contains data.
If you plan to move to an object store later, treat that as a separate migration with its own test plan.
How to sequence the storage client switch with a parallel check and cutover
This sequence moves a running Loki cluster from the legacy object storage clients to the Thanos-based clients with a tested staging run, a rollback path and a clean removal of legacy settings.
Inventory storage blocks and running versions
The platform owner records the Loki version on every component, the current storage_config block, the object store in use (S3, GCS, Azure Blob Storage or filesystem), the period_config and schema entries, and where the same bucket or credentials are shared with other Grafana systems such as Mimir. Confirm that the running version is 3.4 or later, since the use_thanos_objstore switch is documented from that release, and that the cluster is on a version that supports the switch in your planned upgrade path. The step is done when the inventory is written down and reviewed by the team that owns the buckets and credentials.
Build a staging copy with the new clients enabled
The team deploys a copy of the cluster in a non-production environment, pointing at a copy or snapshot of the production bucket where the access policy allows it, and sets use_thanos_objstore: true in the storage configuration. Engineers check the official migration guide for the exact configuration keys and any changes required for the new format before editing values. The step is done when the staging Loki starts on every component with no configuration errors in the logs.
Verify reads and writes of chunks and index
Engineers push a known set of test streams through the staging write path, then query them back through the read path and compare results with the production copy for the same time range. They confirm that new chunks land in the expected object prefixes, that the index is readable for each period, and that queries across old and new periods return the same line counts. The step is done when the written and queried results match and the verification is recorded with the Loki version and configuration hash tested.
Prepare the rollback configuration
Before production changes, the team saves the complete current configuration for every component, including the legacy storage settings, and stores it in version control with a tag tied to the change window. They document the exact steps to restore the previous configuration and confirm that the rollback has been rehearsed in staging. The step is done when the saved configuration can be redeployed to all components and the rollback steps have a named owner.
Roll the change across all components
The team applies the new storage configuration one component group at a time, following the rolling pattern used for your deployment mode, and checks ingestion, query and compactor health after each group. Because all components must read the same storage configuration, the team confirms that no component is still running the legacy client before the change is considered complete. The step is done when every component reports healthy, writes and queries succeed against production, and no storage errors appear in the component logs.
Confirm shared configuration and monitor after cutover
If the same bucket or storage settings are used by Mimir or other Grafana telemetry databases, the team checks that those systems still read and write correctly and that the shared configuration keys match the intended values. The team watches ingestion, query latency and storage error metrics for a period agreed in advance by the owners. The step is done when the owners sign off that the cluster is stable on the new clients and the rollback configuration is still retained.
Remove legacy settings and retire the rollback copy
Once the stable period is complete, the team removes the legacy storage settings from the configuration in version control, updates the runbooks and the upgrade plan for the planned Loki 4.0 release, and records the final configuration. They confirm that the next upgrade does not depend on the removed keys. The step is done when the configuration in version control contains only the Thanos-based settings and the change record links to the verification results.
How Loki components share one storage configuration during the switch
The diagram starts at the Loki components that write and read chunks and index data in object storage: ingesters and the compactor on the write and maintenance side, queriers and the ruler on the read side. The legacy client path and the Thanos objstore client path sit side by side as a transition choice, and Mimir appears as a second consumer of the same bucket. Check that every Loki component reads the same storage block after the switch, and that Mimir's block is configured with the same client settings you intend to share.
Loki components and Mimir reading one object store through either client path.
What drives the effort of the storage client migration
The migration is a configuration change on paper, but the effort depends on how many Loki components and clusters share the same storage settings, and on what the store and credentials look like. The cards below cover the drivers that change the work most and what to ask for before agreeing a fixed scope.
Clusters and components in scope
Each Loki cluster carries its own storage_config and common block, and each component (ingester, querier, compactor, ruler, index gateway) must load the new client settings. More clusters and more components mean more rollout waves, more restart windows and more verification. Ask the partner to list every cluster, every deployed component and the config source for each, including Helm values or templated files.
Storage backend type
Amazon S3, Google Cloud Storage, Azure Blob Storage and the filesystem each have their own keys and authentication fields in the new format. S3-compatible stores such as MinIO need endpoint and path-style settings checked against the documented options. Filesystem storage is the simplest to switch but usually has no shared-access path. Ask which backend each cluster uses and whether any custom endpoint or certificate handling applies.
Migration docsMimir sharing the same store
When Loki and Mimir write to one bucket or one set of Grafana telemetry storage settings, the change has to be planned for both systems together. A shared configuration block can be aligned once, but a mismatch can break one product while the other keeps running. Ask whether the partner will review Mimir's storage configuration, which team owns it and whether both change windows can be coordinated.
Current Loki version
The switch is optional in 3.x, which means a cluster on a recent 3.x release can be migrated on its own schedule. A cluster still on an older release may need an upgrade first, and that upgrade adds its own schema and configuration work. Ask for the exact version of every running component, because mixed versions during a rolling change are a common source of delay.
- Default client switch
- 4.0
Credential model
Static access keys in configuration are the simplest case to convert, since the keys move into the new format and can be rotated afterward. Workload identity, such as IAM roles bound to Kubernetes service accounts, requires the pods to receive the right identity and the config to rely on it without embedded secrets. Ask whether keys are stored in plain config, a secret store or injected identities, and who can rotate them during the change.
Data that must stay readable
Logs already written under the old clients must remain queryable through the cutover, and retention, compaction and deletion must keep working on the same objects. The amount of data and the number of schema periods determine how much verification is needed before and after the change. Ask how much data is retained, how many schema periods exist, and whether a test query set can prove that older logs still return results.
Questions teams ask before changing Loki storage clients
How much does it cost to move Loki to the Thanos object storage clients?
The cost is mostly the engineering time to change configuration, test reads and writes against a copy of your storage settings, and roll the change out across every Loki component. No supplied source gives a price for this work, and DeployOpen does not publish prices. Costs rise with the number of Loki components and environments, the number of storage backends in use, and how many change windows you need. Ask any partner for a quote built from a written scope that lists the environments, components, and test steps covered.
How long does a storage client migration take?
No supplied source gives a duration, so confirm the timeline against your own environment before planning. The main variables are how many clusters share the storage configuration, whether you run Loki 3.x with the switch or move straight to 4.0, and how long your change approval process takes. Read the Loki migration guide for the exact steps, then size a test cluster run and a staged production rollout from that list.
What does the team need to provide for this work?
Plan for access to the Loki configuration as deployed, the storage backend details (bucket or container names, endpoints, and credentials handling), and a way to restart or roll each Loki component. You also need a non-production Loki cluster that mirrors production storage settings so you can confirm reads of existing chunks and indexes. Confirm who owns the object storage account and who can approve a change to live configuration.
Can our own team make this change without a partner?
Yes, if your team already operates Loki and understands its configuration. The change is a configuration migration: it turns on the new clients, moves storage settings into the new format, and verifies that existing data stays readable. Teams without recent Loki operations experience usually benefit from a written test plan and a rollback path before touching production. A partner can supply that plan as part of a fixed-scope engagement if your team prefers not to build it.
Do we have to copy our existing log data to a new bucket?
Based on the supplied migration documentation, the switch changes the client library Loki uses to talk to storage, not where the data lives. Confirm this against the official migration guide for your exact version before relying on it. If your plan does involve a new bucket, container, or endpoint, the data copy becomes a separate project with its own cost, verification, and retention checks. Keep existing chunks and index periods accessible throughout.
How does sharing storage configuration with Mimir change the scope?
Grafana Labs gives consistent storage configuration across Loki, Mimir and other Grafana telemetry databases as one reason for the Thanos-based clients. If Mimir uses the same object storage, the scope grows: you must review Mimir's storage settings, coordinate change windows with the team that runs it, and test both systems against the shared buckets or credentials. Confirm which teams own each system and whether they share one storage account before you estimate the work.
What could go wrong, and how do we check the result?
The most common risks are a misspelled or misplaced configuration key that stops a component from starting, credentials that work for one component but not another, and a component still running the old client after the rollout. Verify each Loki component after the change, confirm that queries return historical logs and new writes land in storage, and check that the retention compactor still runs as expected. Keep the previous configuration ready for rollback until the change is verified in production.
Should we do this before or after moving to Loki 4.0?
Confirm the sequencing against the Loki upgrade guide, because the supplied facts say Loki 4.0 uses the new clients by default and deprecates the legacy ones. Doing the storage change on 3.x first lets you isolate it from the larger version upgrade, which makes failures easier to diagnose. Plan for both changes to be tested separately before combining them in one maintenance window.
How DeployOpen scopes and delivers a Loki storage migration
DeployOpen treats the move to the Thanos object storage clients as a configuration change that touches live data paths, so the work starts with an inventory of your current storage settings and ends with evidence that reads and writes behave the same. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work begins.
How we scope
- Inventory the current storage blocks for each Loki component, including S3, GCS, Azure or filesystem settings in use today.
- Confirm the target Loki version, the planned use of use_thanos_objstore, and whether Mimir or other Grafana databases will share storage settings.
- Agree in writing which environments, tenants and retention rules are in scope, and which are excluded from the change.
How we build
- Convert the storage configuration to the new format in a non-production copy and record each key that changed.
- Test writes, reads, compactor runs and retention deletes against the converted configuration before any production change.
- Document the rollout order across ingesters, queriers, compactors and other components so the cutover is repeatable.
How we hand over
- Deliver the converted configuration files, a before and after comparison, and the test results for each storage backend.
- Provide a rollback procedure that restores the legacy client settings and names the checks that decide whether to roll back.
- Walk your platform and security teams through the runbook so they can review access to the bucket and credentials.
How we support
- Offer ongoing support, upgrades and continuous testing as a retainer after the migration is complete.
- Confirm with your team how the Loki 4.0 default change will be handled in your upgrade plan, using the Loki documentation as the reference.
- Schedule a follow-up review of storage metrics and errors after the first retention cycle to confirm the new clients behave as expected.

