Rotating Qdrant API keys without downtime

Change a self-hosted Qdrant API key on a running cluster using alt_api_key and rolling restarts, with a runbook for clients, secrets stores and JWTs signed with the old key.

On this page

Why Qdrant API key rotation needs a plan before the first key is issued

Rotating a Qdrant API key without downtime starts with a plan made before the first key is issued. A self-hosted Qdrant instance ships with no authentication, so the first key changes the contract for every caller at once. Once the instance requires a key, each client, secrets store, scheduled job and JWT issuer that talks to it must send the right key, and changing that key later means touching all of them in a controlled order. The Qdrant security documentation states that self-deployed instances listen on all network interfaces and have no authentication configured by default, so many teams add a key to a cluster that has been running open for a long time.

Rotation also reaches beyond the database. Admin and read-only keys, introduced in v1.2.0, are only one layer, and JWTs introduced in v1.9.0 are signed with a key that the cluster checks. A rotated key can therefore affect tokens that are already in circulation, along with every service that caches a token or reads the key from a file. The open-source engine is licensed under Apache-2.0 and is free to self-host, so there is no license change to manage. The cost of rotation is operational: staff time, change windows, testing and the rolling restarts that a multi-node cluster needs. Those costs are the ones a quote from a partner would cover.

Before the first key goes live, write down three things. First, list every caller and the key type it needs, so query-only services are not given admin rights. Second, decide where each key is stored and who can read it, and confirm that your secrets store can update values without a redeploy. Third, agree on a window in which the old and new keys must both be accepted, and on the owner who signs off each step. Confirm the exact rotation behavior for your Qdrant version in the official documentation before you test it in a non-production environment.

Rotation approaches and when each fits

This table compares three planned rotation approaches and one emergency variant for a self-hosted Qdrant API key. Read each row for its downtime risk, how many clients change at once, and what must be in place before you start. The main takeaway is that the overlap window is the only approach that keeps existing clients working through the change, and it holds only if every node and client can be reached during that window.

ApproachDowntime riskClients touched at oncePrerequisites
Dual-key overlap with alt_api_keyLow, if every node restarts in turn and every client updates inside the windowClients move one group at a time, while old and new keys both workVersioned secrets store, rolling restart capacity, and a current inventory of every client and key holder
Hard cutover in a maintenance windowHigh, since requests with the old key fail once the new key takes effectAll clients at once, during the scheduled windowApproved change record, a tested rollback plan, and the new key staged in the secrets store before the window
Rotation that also replaces JWT signing keysMedium to high, since tokens signed with the old key may stop validating and services may return 403 errorsEvery service that presents or mints JWTs, plus the token issuerToken issuer in your identity layer, a reissue path for active tokens, and a confirmed expiry plan from the security docs
Emergency rotation after suspected exposureHigh until the new key is live on every node and clientEvery client, usually without a planned orderNamed incident owner, audit logs if enabled, and a ready list of clients and the secrets they read

Runbook: rotating the key on a running cluster

This sequence changes the Qdrant API key on a running cluster without taking it offline. The new key is added as the alternate key, nodes restart one at a time, clients move over, and the old key is removed only after checks pass.

  1. Inventory every client and secrets entry

    Before changing anything, list every service, script, CI job, dashboard and SDK configuration that sends the Qdrant API key, along with each secrets store path that holds it. Record the owner, the host or namespace, and whether the client calls REST or gRPC. Mark any service that uses a JWT signed with the current key, because those tokens need a separate plan. The platform team confirms the list with each owner. Done when every row has a named owner and no known consumer is missing.

  2. Store the new key as the alternate key

    The platform team generates a new key with a strong random generator and writes it to the secrets store as a new version, leaving the current value in place. They then set the new key as the alternate key (alt_api_key) in each node's configuration, so the cluster accepts either key during the transition. Confirm the exact setting path and how the alternate key is read for your Qdrant version in the Qdrant security documentation before the change window. Done when both keys are stored and every node's configuration contains the alternate key.

  3. Restart nodes one at a time

    Restart the nodes in a rolling sequence, one node at a time. The distributed deployment docs recommend at least three nodes for production so quorum survives a node failure, so a rolling restart of a three-node cluster keeps quorum while each node is down. Before each restart, confirm that no collection still has shards in recovery. After each restart, wait for the node to rejoin and confirm the cluster reports all peers connected before moving on. Rollback: if a node fails to rejoin, stop the rollout and restore that node's previous configuration, which still accepts the old key. Done when all nodes run the new configuration and the cluster reports every peer connected.

  4. Verify health and authenticate with both keys

    Run health checks against every node, then send an authenticated read request with the old key and another with the new key against a test collection. Both should succeed while the alternate key is active. Send one request with an incorrect key and confirm it is rejected. Record the results in the change record. Rollback: if either key fails on any node, return the affected node to its previous configuration and hold the rollout. Done when every node passes its health check, both valid keys succeed, and the incorrect key is rejected.

  5. Move clients and JWT issuers to the new key

    Work through the inventory, starting with the lowest-risk services. For each entry, update the secrets store reference to the new key version, reload or redeploy the client, and confirm its requests succeed. If audit logging is enabled (available from v1.17.0), check the logs for the client's new key usage. Services that rely on JWTs need tokens reissued from your identity layer under the new key, and you should confirm how the alternate key treats tokens signed with the old key before the old key is removed. Rollback: point the affected client back to the old key version, which stays available until step six. Done when every inventory row shows the new key in use and the old key no longer appears in successful requests.

  6. Remove the old key and retest

    Remove the old key from the cluster configuration so the new key is the only accepted key, then restart the nodes again one at a time using the same checks as before. Rerun the health checks and the authenticated requests, and confirm that the old key is now rejected on every node. Keep the old key version disabled in the secrets store for the rollback period set in your change plan. Rollback: if a client fails after removal, restore the old key as the alternate key on each node and restart in the same rolling order. Done when the old key is rejected on all nodes, the new key works everywhere, and the change record is closed.

Rotation moves in five phases, with two checkpoints that can stop it

The rotation starts with an inventory of every client, secret and JWT issuer that holds the current key. The operator then sets alt_api_key so nodes accept old and new keys during a dual-key window, and restarts nodes one at a time. A failed health check on any node sends the team to rollback before clients move. Once health checks pass, clients cut over to the new key. The old key is removed only after old-key traffic has stopped and JWTs signed with it have been reissued.

Phases and checkpoints for rotating the Qdrant API key on a running cluster.

What happens to JWTs signed with the old API key

Qdrant JWT access control, available since v1.9.0, verifies tokens against the API key the cluster holds. When that key changes, tokens minted under the old key stop working, so token issuance has to move in step with the key change. The risks below connect the key change to the tokens, caches and clients that depend on it.

Old-key tokens stop validating

JWTs that Qdrant accepts are signed with the API key configured on the cluster. After rotation, a token signed with the old key fails verification, and the caller sees authorization errors on requests it could make the day before. Only the identity layer that holds the signing secret can mint replacements. Before the change, list every service that presents a JWT, and confirm which team owns each signing secret.

Qdrant security docs

Reissuing tokens must come first

A token service cannot sign new tokens with a key it does not yet have. Plan the order so the identity layer adopts the new signing secret, issues replacement tokens with the claims each service needs, and only then retires the old key on Qdrant. Confirm that the team issuing tokens can also reach the cluster during the rolling restart, so reissuance does not stall while the key change is in progress.

Expiry and rollover windows

Tokens carry an expiry, and that expiry sets how long an old token survives after the switch. A long expiry extends exposure to the old key, while a short one forces frequent reissuance and more load on the token service. Choose a rollover window that matches your longest-lived token, and confirm with the team that owns the identity layer how expiry is set for each service account.

Clock skew at the boundary

Token validity depends on time checks, so clock drift between the token issuer and Qdrant nodes can reject tokens that look valid, or accept ones that should have expired. Rotation windows are when mismatches surface, because clients retry and failures look like key problems. Check that all issuers and Qdrant nodes sync to a trusted time source, and allow for a small skew tolerance if your environment supports it.

Cached tokens in client services

Services often cache a token for performance and reuse it until expiry. A cached token signed with the old key keeps failing even after a new one is issued, so the failure persists across requests. Find every cache, including SDK wrappers, sidecars and batch jobs with long-running sessions, and confirm each one refreshes on a 403 or on a fixed schedule before the old key is removed.

Revocation is a separate control

Rotating the API key invalidates tokens signed with the old key as a group, but it does not revoke one compromised token. Revoking individual tokens without changing the key is a separate control covered elsewhere on this page set. Use key rotation for a shared signing secret that may have leaked, and use per-token revocation when one token alone is suspect.

Updating clients and secrets stores for each audience

Application teams own the code that reads the key from configuration and sends it with each request. A key change is safe only when every service accepts the new value before the old one stops working, so teams should time their deployments around the rotation window and avoid switching values on a single host.

  • Find every consumer first. List the services, notebooks, batch jobs and CI pipelines that call Qdrant, along with the SDK version each one uses and where it reads its key.
  • Load the key from configuration. Read it from an environment variable or secret reference so the value can change without a rebuild of the application.
  • Confirm the SDK parameter. Check how your SDK version passes the key over REST and gRPC, since the parameter name and client setup can differ between clients.
  • Restart in waves. Restart a small group of instances, watch error rates, then continue. Keep the old key valid until the last instance is running the new value.
  • Remove the old key last. Delete it from configuration only after every consumer is confirmed on the new value.

After each restart, check logs for authentication errors (confirm the status codes your Qdrant version returns) and confirm that a test query from an updated instance succeeds before you remove the old key from any configuration.

Security and operational considerations during rotation

A key rotation is only as safe as the places the old and new keys live along the way. The cards below cover where keys must not appear, who can read them, how traffic carries them, and how you prove afterward which key was used.

Keep keys out of images and logs

Do not bake the API key into container images, Helm values committed to Git, or startup command lines, because those end up in image layers, repositories and process listings. Pass the key through your secrets store at runtime, and make sure your client and proxy logs do not record request headers. Before cutover, search your deployment manifests and CI output for the old and new key values. Any copy you find in a log counts as an exposed key, so plan to rotate again if one turns up.

Qdrant security docs

Restrict who can read the admin key

The admin key can create, change and delete collections and read all data, so it should reach only the few processes and people that perform maintenance. Give query-only services the read-only key instead, and keep the admin key out of application namespaces. During rotation, list every principal that held the old admin key, confirm each one has its new value, and remove access from anyone who no longer needs it.

Send keys only over TLS

Qdrant supports TLS for REST and gRPC since v1.2.0, and the API key travels in request headers, so an unencrypted listener exposes the key on every call. Confirm that clients connect to the TLS endpoint during the rotation window, and that no internal proxy downgrades the connection to plain HTTP. Check that the certificate chain your clients trust is still valid, because an expired certificate can push teams toward disabling verification.

Record each rotation event

Keep a dated record of every rotation: which key changed, the reason, the clusters and services touched, the rolling restart order, and the person who approved it. Store the record with your change tickets so auditors and incident responders can reconstruct the timeline. Include the secrets store version or revision identifier for each service, so you can show exactly which secret each client read at each point.

Confirm the key used with audit logs

JSON audit logging of authenticated API operations has been available since v1.17.0. Use it after cutover to confirm that requests arrive with the new key and that no traffic still authenticates with the old one. Ask your platform team to confirm the audit log path, retention and how forwarded headers behave behind a proxy, since those details decide whether the log shows the true client. Ship the logs to your SIEM so the check is repeatable.

Qdrant security docs

Questions teams ask before rotating Qdrant keys

Can we rotate Qdrant API keys without a vendor?

Yes. The Qdrant engine is open source under the Apache-2.0 license and is free to self-host, so your own team can plan and run a key rotation without buying a license. What you need is an operator who understands the cluster topology, the client list and your secrets store. The rotation itself is a configuration change followed by rolling restarts, so the main requirement is a clear runbook and a test environment that mirrors production. Confirm the exact settings for your version in the Qdrant security docs before you change anything.

What drives the cost of an outside partner for key rotation?

The fee follows the written scope, so the main cost drivers are the number of clients and services that hold a key, the number of clusters and environments, how many secrets stores are involved, and whether JWT-based access is in use. Each of these adds inventory, testing and coordination work. Recurring costs appear only if you buy a retainer for later rotations or monitoring. Ask any quote to list which clusters, clients and stores are covered, who performs the client-side changes, and what evidence is delivered at the end.

How long does a Qdrant key rotation take?

Duration depends mainly on how many clients use the key, how many nodes the cluster has and how many environments must be changed in order. A single-node instance with one client is a short change, while a distributed cluster with many services needs staged restarts and verification after each node. Qdrant recommends at least three nodes for production clusters so quorum survives a node failure, which means a rolling restart should be planned one node at a time. Ask for a schedule that lists each cluster, the restart order and the checks that gate each step.

What must our team provide before a rotation starts?

The team must provide an inventory of every client, service, job and pipeline that sends the current API key, along with the secrets stores and deployment tools that hold it. You also need access to the cluster configuration, a maintenance window agreed with application owners, and a non-production cluster for rehearsal. Someone with authority to approve restarts and to roll back must be named. Finally, confirm how JWTs are issued and whether they were signed with the old key, since those tokens behave differently during rotation.

What happens to JWTs signed with the old key?

JWTs signed with the old key stop being accepted once the key changes, so every service that uses a token must receive a new one signed with the new key. This is the step most often missed. Before rotation, list which services use JWT-based access, where the tokens are generated and how long they live. Plan for token reissue in the same window as the key change, and test that each service can obtain and use a new token on the rehearsal cluster.

Should we rotate Qdrant API keys on a schedule?

A schedule is a sound default because it limits the time a leaked key stays useful and makes rotation a routine task instead of an emergency. The interval should follow your own policy and your compliance obligations, not a number taken from a vendor. A rotation after staff changes, a suspected leak or a change in who holds access is a reasonable trigger regardless of the calendar. Record each rotation, the date, and the clients updated so the next rotation starts from an accurate inventory.

How do we avoid downtime when clients hold the old key?

Downtime is avoided by sequencing the change so that both the old and new values are accepted during the transition, then retiring the old one after every client has moved. Qdrant's alternate key setting supports this pattern, but the exact behavior and restart requirements must be confirmed for your version. Clients should read keys from the secrets store at startup or on a reload, so updating the store is the single source of truth. Verify each client with a read and a write request before the old key is removed.

How DeployOpen scopes and delivers Qdrant key rotation

DeployOpen plans and carries out API key rotation for self-hosted Qdrant inside your own infrastructure, starting from your client inventory and secrets stores. The work is fixed-scope, with the rotation sequence, client changes and verification agreed in writing before any cluster is touched.

How we scope

  • Inventory every service, SDK and script that sends the current Qdrant API key to the cluster.
  • Confirm which Qdrant version and topology your cluster runs before choosing the rotation sequence.
  • Agree in writing whether JWTs signed with the old key must be reissued and who issues them.

How we build

  • Write the rotation sequence using alt_api_key and rolling restarts, tested on a non-production cluster first.
  • Test client behavior during the overlap window, including REST and gRPC calls and failed-request handling.
  • Document the changes to the secrets store entries, deployment manifests and client configuration for each system.

How we hand over

  • Deliver a runbook covering pre-checks, cutover steps, rollback and post-rotation verification.
  • Record a rotation log template so your team can show when each key changed and who approved it.
  • Walk your platform and security engineers through a dry run and the steps that remain yours.

How we support

  • Support rotations on a retainer schedule, including reruns after Qdrant upgrades or topology changes.
  • Retest rotation procedures when your identity layer, JWT issuer or secrets tooling changes.
  • Ask for a quote based on the written scope, since DeployOpen does not publish a price list.

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.