Skip to main content
MRP supports two deployment modes: embedded mode for zero-config self-hosting, and external mode for production deployments with PostgreSQL, Redis, and S3.

Embedded mode (zero config)

Embedded mode runs everything in a single binary with no external dependencies. Data is stored locally using SQLite, an in-memory cache, and filesystem-based blob storage.
That’s it. The relay starts on port 8080 with:
  • SQLite database at ./data/mrp.db (WAL mode)
  • In-memory cache for agent status, ACL lookups, and discovery results
  • Filesystem blobs at ./data/blobs/
  • In-memory rate limiter, replay guard, and webhook queue

How mode is selected

The relay auto-detects which mode to use:

Configuration

Embedded mode accepts these environment variables:

Data directory structure

The data directory is created automatically on first startup.

When to use embedded mode

  • Development and testing — spin up a relay instantly without Docker or infrastructure
  • Single-machine deployments — personal relays, home labs, CI/CD test fixtures
  • Edge deployments — IoT gateways, embedded systems, air-gapped networks
  • Evaluation — try MRP without provisioning any services

Limitations

  • Single-process — no horizontal scaling (one relay instance per data directory)
  • In-memory state — rate limiter, replay guard, and webhook retry queue are lost on restart
  • SQLite concurrency — handles moderate concurrent writes; high-throughput production use should use external mode
  • No blob replication — blobs are stored on the local filesystem only

External mode (production)

For production deployments, use external mode with PostgreSQL, Redis, and S3-compatible storage:

Configuration

Docker Compose

The quickest way to get external mode running locally:

Pointing SDKs to your relay

All MRP SDKs accept a relay URL. Replace https://relay.mrphub.io with your self-hosted relay:

Migrating between modes

There is no built-in migration tool between embedded and external mode. For small deployments, you can export and re-import data using the API. For larger deployments, start with external mode from the beginning.