Loki with Azure Blob Storage and Google Cloud Storage

Teams running self-hosted Loki on Azure or Google Cloud need to choose an authentication method, lay out containers or buckets and confirm retention settings before go-live. This page explains each step and what to verify.

On this page

Loki with Azure Blob Storage and Google Cloud Storage: when your team needs it

If your Loki cluster runs in an Azure or Google Cloud account, you need to decide early that logs will live in object storage rather than on local disk. Loki stores compressed log chunks and its index in object storage, so the store you pick becomes the durable home of every log line you keep. Azure Blob Storage and Google Cloud Storage are both listed among the recommended production object stores in the Loki storage documentation, which makes them the natural choices for a cloud-hosted cluster. The choice is not cosmetic: it shapes how Loki authenticates to the store, how retention and deletion behave, and how you will operate the cluster day to day.

Before you start, confirm the facts that will drive the design in your own environment. Check which Azure subscription or Google Cloud project owns the logging data, which region the storage must sit in for data residency, and whether your security team requires keyless access. Confirm which Loki version and deployment mode you plan to run, since the storage settings and the component that writes to storage differ between the monolithic and simple scalable modes described in the deployment docs. Also confirm whether your organization already standardizes on one cloud's identity system, because that choice determines which authentication options are practical.

Be clear about what the storage layer does not do for you. Loki's retention is applied by the compactor and is disabled by default, so logs stay in the bucket or container until you configure retention, and a lifecycle rule on the storage side does not replace that setting. Plan who owns the storage account or bucket, who may read or delete objects in it, and how you will check that the cloud spend matches the retention you expect. The detailed authentication options, container and bucket layout, and version-specific settings are covered in the sections that follow.

Object storage options for self-hosted Loki and when each fits

This table compares Azure Blob Storage, Google Cloud Storage, Amazon S3, S3-compatible stores such as MinIO, and the local filesystem for Loki chunks and indexes. Read each row for the Loki docs' production position and the environment where that store fits, then confirm the current support status against the Loki storage documentation before you commit.

Object storeLoki docs position for productionWhere it fits
Azure Blob StorageListed among the recommended production object storesYour workloads and identity already run in Azure and you want Loki data in the same cloud account
Google Cloud StorageListed among the recommended production object storesYour platform already runs in Google Cloud and you want Loki data in the same project and IAM model
Amazon S3Listed among the recommended production object storesYour organization already operates on AWS, or you need a comparison point before choosing Azure or GCS
S3-compatible stores such as MinIOSupported, but not typically recommended for productionOn-premises data centers where you run your own durability, replication and backup for the object store
Local filesystemSupported, but not typically recommended for productionSingle-binary test installs and small trials where losing the data is acceptable
Cloud object store in a different cloud than your workloadsFollows the recommended store you choose, so the same production position appliesRare, but cross-cloud egress and latency costs should be confirmed before choosing this layout

How authentication to Azure and Google Cloud storage differs

Azure gives Loki the widest range of authentication methods. At the simplest end, a shared account key or connection string grants broad access to the whole storage account. At the other end, Microsoft Entra ID identities such as managed identities and workload identities let Loki obtain short-lived tokens, so no secret sits in the Loki configuration. The Loki storage documentation describes Azure Blob Storage as a recommended production object store, but the authentication fields themselves belong to the storage configuration reference.

  • Account key or connection string: the most static option and the easiest to start with. Anyone holding the key can read and write every container in the account, so keep it to short proofs of concept.
  • Managed identity: a identity attached to a virtual machine or host that Loki runs on. Loki requests tokens from the platform, so no secret needs to be stored with the configuration.
  • Workload identity on AKS: a federated identity linked to a Kubernetes service account, so Loki pods obtain tokens without a stored secret. Confirm the federation setup against your cluster version and your Loki deployment method.
  • Role scope: whichever method you choose, grant the identity a storage data role limited to the one account and the containers Loki uses, not the whole subscription.

Confirm each option's exact configuration fields and supported client behavior against the current Loki storage configuration reference for your version before you build. Creating, storing, rotating and revoking any account key or secret remains your team's responsibility.

How Loki components reach the bucket or container and where trust boundaries sit

The diagram starts with log shippers sending requests through an authenticating reverse proxy, which passes the tenant header to Loki's write and read components. The ingester and compactor are the only parts that write chunks and index files to the object store, so they are where storage credentials or workload identity must be granted. The boundary between Loki's runtime and the storage account or project is the point to check: confirm which identity the runtime uses, whether it is a cloud identity or a static credential, and that readers and shippers never hold storage access directly.

Log traffic enters through the proxy, and only Loki's runtime holds storage access.

Container and bucket layout, and what changes with the Thanos-based storage clients

Plan one container or bucket per Loki cluster, and separate environments such as production and staging into different containers or buckets rather than sharing one. A dedicated container keeps the chunk and index objects for one cluster together, makes the access policy and retention for that cluster easy to review, and avoids one environment's deletion activity touching another's data. Inside the container, Loki separates chunks and index files by prefix according to the storage configuration in your release, so confirm the exact prefix layout in the storage docs for your version before you write access policies that depend on it. Ruler data, if you enable rule storage, should also be placed under a prefix you can identify and scope separately. Ask your platform team to name the container or bucket in the configuration and in the infrastructure code so the layout can be recreated during a restore.

Storage-side retention rules, such as Azure lifecycle management policies or Google Cloud Storage object lifecycle rules, must never delete objects sooner than Loki's own retention would. If the bucket rule expires chunks while the index still points to them, queries return gaps that are hard to explain and hard to detect. Set the bucket rule to a period longer than your longest Loki retention setting, or leave lifecycle deletion off and let the compactor remove data, and document which of these you chose. Loki's retention is applied by the compactor and is disabled by default, so confirm that retention_enabled is set deliberately in the cluster configuration. Test deletion in a non-production bucket before relying on it.

Before upgrading or changing storage clients, confirm in the storage reference for your Loki release which configuration keys for the Azure and Google Cloud Storage clients changed, which new keys replace them, and whether the old keys are still accepted or are rejected at startup. Do not assume the key names from an earlier release carry over. Check the default behavior that changed, such as authentication fallbacks or retry settings, and plan a staged rollout in a non-production environment that reads and writes real test data. Record the release version and the storage client settings in your change record so auditors and on-call engineers can see what was in effect at any point.

Set up Loki on Azure or Google Cloud storage in order

This sequence takes a self-hosted Loki install from version selection to a verified write and read against Azure Blob Storage or Google Cloud Storage. Each step ends with a check so the team knows the storage layer works before any production log traffic arrives.

  1. Confirm the Loki version and deployment mode

    Pick the Loki release you will run and check the deployment mode against your expected log volume. The official deployment modes are monolithic, simple scalable and microservices, and the documentation says simple scalable is being deprecated and will be removed with Loki 4.0, so new installs should favor monolithic or microservices. Confirm the current release on the Loki GitHub releases page and record it in your change ticket. Done when the version, mode and expected daily volume are written down and the team agrees on them.

  2. Create the container or bucket and access model

    Create one Azure Blob container or Google Cloud Storage bucket for Loki chunks and index data, in the region and project your security team has approved. Decide who can read and write it, and grant access only to the Loki service identity and the administrators who maintain it. Keep public access off and turn on the provider's audit logging for the bucket or container if your policy requires it. Done when the empty container or bucket exists, public access is blocked, and a test identity without the Loki role is denied a write.

  3. Choose and create the storage identity

    Select the authentication method Loki will use. On Azure, options include a storage account key or connection string for simple setups, or a managed identity or workload identity for keyless access. On Google Cloud, options include a service account key file or workload identity federation for Kubernetes. Prefer keyless identities where the platform supports them, and confirm the exact configuration keys for your Loki version in the storage documentation before writing them. Done when the identity has object read and write permission on the Loki container or bucket only, and a credential test from the Loki host succeeds.

  4. Set the storage block and TSDB schema

    Edit the Loki configuration to point the storage backend at your Azure or GCS container, and set the index store to TSDB with a schema_config period whose from date is at or before your first ingest. Keep the object storage settings and the index settings in the same configuration file so reviewers see one source of truth. Store the file in version control and avoid putting keys in plain text when a secret store is available. Done when Loki starts without storage errors in its logs and the configuration passes review.

  5. Enable multi-tenancy and the reverse proxy if needed

    If more than one team or customer will share the cluster, set auth_enabled to true so Loki requires the X-Scope-OrgID header on every request. Loki has no built-in authentication, so place an authenticating reverse proxy such as nginx, HAProxy, OAuth2 Proxy or Pomerium in front of it and connect that proxy to your identity provider. Check that requests without a tenant header are rejected and that a valid user reaches only their tenant. Done when unauthenticated and wrong-tenant requests fail as expected.

  6. Run a test write and read

    Send a small set of labeled test lines to Loki with a single known tenant header, then query them in Grafana or with the Loki API. Confirm that objects appear in the container or bucket under the prefixes Loki created for chunks and index files, and that the query returns the exact test lines with the expected labels. Remove the test data according to your retention plan once the check passes. Done when the test lines come back from a query and the objects are visible in the storage console or CLI.

Security controls to set before logs reach the bucket

Logs often contain credentials, personal data and internal topology, so the storage account or bucket behind Loki is a sensitive target. The controls below work together: identity limits what Loki can do, the network limits where it can be reached from, and the proxy limits who can query what Loki holds.

Least-privilege roles per container or bucket

Grant the Loki identity read, write and list rights only on the one container or bucket Loki uses for chunks and index data, not on the whole storage account or project. Owned by the platform team that provisions storage. Verify that the role cannot delete or change other containers, and that any separate bucket for ruler data is granted in its own statement. Test the scope by attempting a write to an unrelated container with the Loki identity and confirming it is refused.

Workload identity instead of stored keys

Prefer Azure managed identity or workload identity federation, or Google Cloud service account attachment through workload identity, over connection strings and exported service account key files. Owned by the platform team with input from security. Verify that no static account key or JSON key is present in Helm values, ConfigMaps or Git history, and that the identity used by the Loki pods is the one you expect. Rotation then becomes a platform concern rather than a manual task.

Private access to the storage endpoint

Place the storage account or bucket behind a private endpoint or Private Service Connect, and disable public network access where your design allows it. Owned by the network team. Verify from a pod in the Loki namespace that the storage hostname resolves to a private address, and from an outside host that the public endpoint refuses access. Confirm that DNS resolution inside the cluster points to the private record.

Encryption and key ownership

Storage providers encrypt data at rest by default, but you decide whether the keys are provider-managed or customer-managed in Azure Key Vault or Cloud KMS. Owned by security or the team that holds key governance. Confirm which option your compliance program requires, who can disable or rotate the key, and what happens to log data if the key is revoked. Check that the key policy allows only the Loki identity and key administrators to use it.

Access logging on the storage account

Turn on access logs or diagnostic logs for the storage account or bucket so reads, writes and deletes by the Loki identity and any other principal are recorded. Owned by the security operations team. Verify that logs are sent to a location the Loki operators cannot alter, that retention on those logs meets your audit policy, and that you can find a test write by the Loki identity in them.

Authenticating reverse proxy in front of Loki

Loki has no built-in authentication, so the Loki push and query endpoints must sit behind an authenticating reverse proxy such as nginx, HAProxy, OAuth2 Proxy or Pomerium. Owned by the platform team with identity input. Verify that unauthenticated requests to the push and query paths are rejected, that the X-Scope-OrgID header is set by the proxy and not trusted from clients when multi-tenancy is on, and that the proxy is the only route to the Loki service.

Loki authentication docs

What teams ask before running Loki on Azure or GCS

What does a Loki deployment on Azure Blob or GCS cost, and what drives it?

The cost has two parts: the one-time work to design and build the deployment, and the recurring cloud spend for compute, storage capacity and storage requests. Design work covers identity, network paths, container or bucket layout, retention and sizing, and testing. Recurring spend depends on how many gigabytes of chunks and index you keep for the retention period you set, how many read and write requests Loki makes, and how much data leaves the cloud region. Ask any provider to quote the design phase separately from ongoing support, and to list which cloud resources they expect you to pay for directly. DeployOpen does not publish a price list; a quote follows from a written scope.

How long does a first Loki setup on Azure or GCS take?

Duration depends mostly on how much of the environment is ready when work starts. Timing shifts with the number of log sources, whether identity federation (workload identity or a managed identity) must be approved by your cloud or security team, how many tenants you separate, and whether the retention policy is already agreed. A single-cluster build with one identity model and a short list of log sources is far quicker than a multi-tenant setup that must pass a security review. No fixed duration applies to every environment, so ask for a phased timeline in the written scope and confirm the approval steps with your own cloud and security owners.

What must our team provide before the work starts?

Most delays come from missing inputs rather than from the build itself. Plan to provide:

  • Cloud access to the subscription or project where Loki will run, with rights to create storage, identities and network rules
  • Identity decisions: whether Loki authenticates with a connection string, a managed identity, or workload identity, and who approves it
  • A list of log sources, their volume and the teams that own them
  • A written retention policy per tenant or stream, including any compliance period you must meet
  • Named owners for on-call, backups and approvals

Confirm these with your cloud platform team and your compliance lead before you agree a start date.

Can our internal team set up Loki on Azure or GCS without a partner?

Yes, if your team already runs Kubernetes or Linux servers, manages cloud identities and has written retention rules. The Loki documentation covers the configuration keys for both clouds, and the deployment modes page explains which architecture fits your daily volume. Teams usually struggle with the identity model (keeping static keys out of configuration), the bucket lifecycle rules that must outlast Loki retention, and proving that deletion works. A partner is useful when you need the work done to a documented, reviewable standard within a fixed window, or when your own staff cannot cover operations after handover. Assess your own skills and capacity before deciding.

How do we estimate storage request and capacity costs, and what should we ask a provider to quote?

Start with the volume you ingest per day, the compression ratio you measure in a pilot, and the retention period per tenant. Multiply those into stored gigabytes, then add the request load from ingesters, the compactor and queriers. Object storage pricing varies by provider, region and tier, so take current rates from your Azure or Google Cloud price pages rather than from any estimate here. Ask a provider to quote: the storage tier and region assumed, the expected stored volume and retention, the request and egress assumptions, the lifecycle rules, and which items are one-time versus monthly. Ask them to state which assumptions they will re-check after the pilot.

How do we confirm that deleted log data is actually gone from Azure or GCS?

Deletion has to be checked in the storage layer, not only in Grafana. Retention runs through the compactor, which is disabled by default, so first confirm that retention is enabled and that the rule you set matches the policy. After a retention run, query the expected time window and check that no results return, then list the object prefixes or blobs for that period and confirm they are removed or aged out. Remember that your bucket or container lifecycle rules also remove objects, so check both mechanisms together. Keep a dated record of each check for your auditors. Confirm the exact behavior for your Loki version in the retention and deletion documentation before you rely on it.

Why do identity choices change the security review for Loki on Azure or GCS?

Identity choices decide who can read and write your log storage, so they shape the security review more than any other setting. Connection strings and account keys are simple to configure but are long-lived secrets that must be stored, rotated and audited. Managed identities and workload identity remove stored keys, but they require role assignments that your cloud administrators must approve. Loki also has no built-in authentication layer, so the Loki documentation says you must place an authenticating reverse proxy in front of it, and tenant access depends on the X-Scope-OrgID header when authentication is enabled. Ask your security team to review the chosen identity method, the proxy, and the role scope before go-live.

Limits to confirm in your environment before go-live

Loki with Azure Blob Storage or Google Cloud Storage depends on details that vary by Loki release, deployment mode, runtime and cloud account. The cards below are checks to complete in your own environment before you accept the design, since each one can change which configuration is valid.

Which Loki version and storage client are in use?

Confirm the exact Loki release you will run and read its storage client documentation for that release, because Azure and GCS settings, authentication options and defaults can change between versions. The current release listed on the Loki GitHub releases page is v3.7.8, but a planned install should be checked against the version you pin. Ask whether the object store client for your target cloud is the one the release documents as supported for production.

Loki releases

Is the deployment mode supported for your volume?

Loki documents monolithic, simple scalable and microservices modes, and each one is sized for a different daily log volume. Simple scalable mode is being deprecated and will be removed in Loki 4.0, so a new build that depends on it needs a migration plan. Confirm your expected ingest rate against the mode limits before choosing the object store layout.

Deployment modes docs

Does the cloud identity method fit the runtime?

Workload identity on Kubernetes and managed identity on virtual machines are different mechanisms, and each requires the cluster or host to be configured for it. Static keys or connection strings are simpler but place long-lived secrets in config files that must be stored and rotated. Confirm which method your runtime supports, who owns the federation setup, and how credentials are rotated and revoked.

Are regions and networking aligned?

Loki reads and writes chunks on every query and flush, so the storage account or bucket should sit in the same region as the Loki components to control latency and egress cost. Check private endpoint or VPC routing, DNS resolution, firewall egress rules and whether the storage account allows traffic from your network. Confirm the data residency rules that apply to the region you choose.

Do bucket lifecycle rules outlast Loki retention?

Loki removes data through the compactor when retention is enabled, so a lifecycle rule on the container or bucket that deletes objects earlier can drop data that Loki still expects to find. Retention is disabled by default, which means logs are kept indefinitely until you set it. Confirm that any lifecycle rule is set longer than your retention period, and verify removal with a test stream before relying on it.

Retention docs

Who controls access in front of Loki?

Loki has no built-in authentication layer, so its HTTP endpoints are open unless you place an authenticating reverse proxy in front of them. Multi-tenant setups also depend on the X-Scope-OrgID header, which the proxy must set or validate. Confirm which proxy you will run, how it authenticates Grafana and log shippers, and how the tenant header is enforced so one team cannot read another team's logs.

Authentication docs

How DeployOpen works on this

DeployOpen plans, builds, documents and supports self-hosted Loki inside your own Azure or Google Cloud accounts, so the storage, identity and retention settings can be reviewed by your security and compliance teams. Engagements are fixed-scope, with the storage layout, authentication model and handover agreed in writing before work starts.

How we scope

  • We confirm which Loki deployment mode, cloud account and region the storage will serve.
  • The written scope names the authentication method for each Azure or GCS identity used by Loki.
  • We agree container or bucket layout, retention targets and who owns lifecycle rules before build.

How we build

  • We configure Loki object storage settings in a non-production environment and test reads and writes.
  • We set up workload identity or managed identity where your cloud policy allows it, avoiding static keys.
  • We verify that compactor retention removes data as configured, and document any lifecycle policies alongside it.

How we hand over

  • You receive configuration files, a storage layout diagram and a record of the identities and permissions granted.
  • Runbooks cover credential rotation, retention checks and the steps to take when a storage call fails.
  • Handover includes a walkthrough with your platform and security teams so they can review and operate the setup.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Upgrades to later Loki releases are planned against the storage and configuration changes in the official guide.
  • Retainer scope, response expectations and review cadence are agreed in writing and confirmed before signing.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.