> ## Documentation Index
> Fetch the complete documentation index at: https://docs.magpiedb.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Magpie is a trace store for AI agents, used as a library (crate `magpiedb`, npm `magpiedb`, PyPI `magpiedb`) or as `magpie-server`, which takes OpenTelemetry (OTLP over HTTP on 127.0.0.1:4318 and gRPC on 127.0.0.1:4317 by default).
> Use only the commands, flags, routes and JSON shapes that these pages show. Do not guess a flag or a query field: if a page does not show it, say that the docs do not show it.
> Packages and server binaries are not published yet: build from source, as the quick start shows. Check the status note on the introduction page before you suggest `cargo add`, `npm install` or `pip install`.
> Only one process may write to a store folder at a time. For many apps, send traces to one `magpie-server`.

# Run Magpie for a company

> How to turn on keys, TLS, tenants, retention, deletes, masking, backup, S3 and more in magpie-server.

This section is for the person who runs `magpie-server` for a team or for many customers. It shows how to turn on each part, with commands that were run on 2026-12-04 (macOS, the code of `main`). Every flag, with its default: [Server reference, "Run it"](https://docs.magpiedb.com/reference/server.md).

You need `magpie-server` on your `PATH` ([Quickstart](https://docs.magpiedb.com/quickstart.md)), and `curl`. The commands in these pages run in an empty folder.

## The basics

* **One store is one folder.** It holds every span, index and log. Back up the folder, and you back up the store ([Backup](https://docs.magpiedb.com/operations/backup-import.md#backup)).
* **One writer per folder.** Only one process may write to a store at a time. A second one is refused. With many app instances, they all send to one server: that server is the writer.
* **A write is searchable after the next commit.** The server commits every 0.5 s, and a commit takes some time too: 1.1 to 1.2 s in all on the test machine while other builds ran. The commands in these pages wait 2 s after a send.
* **Stop it with SIGINT or SIGTERM** (Ctrl-C, `kill`, `docker stop`). The server waits for the requests in progress and closes the store. With the default `--durability disk`, a `kill -9` loses no accepted write either ([Durability](https://docs.magpiedb.com/operations/durability-upgrades.md#durability)).
* **Health check:** `GET /healthz` answers `ok`. It needs no key.
* **Containers:** from release 0.1.0 on, the image is `ghcr.io/intojhanurag/magpie-server` (amd64 and arm64; not published yet); the `Dockerfile` in the repo root builds it from the sources. The image runs as a user without rights and has a health check (`GET /healthz`). The Compose and Kubernetes files were not run here: [Server reference, "Docker"](https://docs.magpiedb.com/reference/server.md).

## In this section

> [card] [API keys and TLS](https://docs.magpiedb.com/operations/keys-tls.md)
>
> Turn on keys. Turn on TLS. Use a proxy.

> [card] [Tenants](https://docs.magpiedb.com/operations/tenants.md)
>
> One store per customer, from the API key.

> [card] [Retention and deletes](https://docs.magpiedb.com/operations/data-lifecycle.md)
>
> Drop old spans. Delete a user's data and purge.

> [card] [Masking private data](https://docs.magpiedb.com/operations/masking.md)
>
> Replace private data before it is stored.

> [card] [Import and backup](https://docs.magpiedb.com/operations/backup-import.md)
>
> Load old traces. Back up and restore a store.

> [card] [S3](https://docs.magpiedb.com/operations/s3.md)
>
> Keep the store in a bucket too. Read-only servers.

> [card] [Durability and upgrades](https://docs.magpiedb.com/operations/durability-upgrades.md)
>
> What a write survives. The store version.

> [card] [Errors, memory and threads](https://docs.magpiedb.com/operations/errors-memory.md)
>
> What each error means. How much memory and how many threads.

Also read [Security](https://docs.magpiedb.com/security.md) and [Limits](https://docs.magpiedb.com/limits.md) before you open the server to other machines.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.