# Self-hosting

> Run the open-source gateway yourself, with your own OpenRouter key, AWS account or a model on your own machine.

Applies to: the Sypnia engine (open source, self-hosted).  
Source: https://ai.docs.sypnia.com/self-hosting/

For agents: Self-hosting the gateway: one container (ghcr.io/sespinosav/sypnia-ai) + Postgres 16; optional S3-compatible storage (kept bodies, response cache); providers via your OpenRouter key, AWS credentials for Bedrock, or OpenAI-compatible endpoints (local model servers). No credits: usage counted in provider currency from a price table. No default models. Spans to any OTLP endpoint. What you lose vs Cloud: console, Sypnia's provider accounts, credits, organization spending limits.

The gateway is one container and a Postgres database. You bring the providers:

| Provider                       | What you need                                                                                    |
| ------------------------------ | ------------------------------------------------------------------------------------------------ |
| OpenRouter                     | your OpenRouter key                                                                              |
| Amazon Bedrock                 | AWS credentials or a role with `bedrock:InvokeModel` and `bedrock:InvokeModelWithResponseStream` |
| Any OpenAI-compatible endpoint | its address and key, if it has one: a model server on your own machine, or another gateway       |

What changes from Sypnia Cloud: there are no credits (usage is counted in your providers' currency from a price table you can edit), no default models (you choose each one), and no console (the API, the CLI and MCP). Spans go to any OpenTelemetry endpoint you set.

- [Docker](/self-hosting/docker/): Run the gateway with Docker Compose, with Postgres, object storage and a local model.
- [Configuration](/self-hosting/configuration/): Every setting of the gateway, its environment variable and its default.
- [Upgrades](/self-hosting/upgrades/): How versions are numbered, how to upgrade, and what each upgrade may change.
