---
title: "Self-host Anlyon"
description: "Run Anlyon on your own server: the server, the console, Postgres, Redis and Caddy, installed with one command. Source-available under the Elastic License 2.0, with a free Community edition and licensed Team and Enterprise editions."
sidebar:
  label: Overview
---

Anlyon runs on your own server as well as at [anlyon.com](https://anlyon.com). It is the same product: shared limits, approvals bound to the exact request, and a graded receipt for every call your agents make. The source is public at [github.com/AnlyonHQ/anlyon](https://github.com/AnlyonHQ/anlyon) under the Elastic License 2.0. Anlyon is source-available: you can read, run and change it, within the terms below.

One command installs it on a Linux server:

```bash
curl -fsSL https://anlyon.com/install | sudo sh
```

Everything after that, from email to licence keys, is set in the console. [Install](/self-hosting/install) walks through it.

## Know why you would self-host

- **Credentials stay on your server.** Connected accounts, stored secrets, approvals and receipts live in your own Postgres, encrypted under a root key that only your server holds.
- **You can read what guards your agents.** The code that holds your credentials and decides what an agent may do is public.
- **Nothing to call home for.** No third-party account is needed. A licence key is checked on your server, offline. The only report the server sends is an anonymous daily count, and you can [turn it off](/self-hosting/configure#telemetry).

## What you run

One machine with Docker Compose runs five containers. Each restarts on its own after a crash or a reboot.

| Container | What it does |
| --- | --- |
| `server` | The Anlyon API, its workers and the MCP endpoint. |
| `dashboard` | The console. |
| `postgres` | The database: workspaces, actions, policies, approvals, receipts, and the encrypted secrets and connected accounts. Postgres 16 with pgvector. |
| `redis` | Short-lived state: limit reservations in flight and queues. Redis 7. |
| `caddy` | The front door. It gets the HTTPS certificate for your domain, sends `/api`, `/mcp` and `/health` to the server and everything else to the console. |

The console and the API share one address. With the domain `anlyon.example.com`:

| What | Address |
| --- | --- |
| The console | `https://anlyon.example.com` |
| The API | `https://anlyon.example.com/api/v2` |
| The MCP server | `https://anlyon.example.com/mcp` |

## Choose an edition

The `EDITION` setting in the install's `.env` file picks one of three editions. Community is the default and needs no key. Team and Enterprise run the same software as Community, plus the features a licence key turns on.

| | Community | Team | Enterprise |
| --- | --- | --- | --- |
| Price | Free | Licence key | Licence key |
| Actions, impact limits, bound approvals and graded receipts | Yes | Yes | Yes |
| Connected accounts, end-user connections and governed MCP servers | Yes | Yes | Yes |
| The console, the API, the MCP server, the SDKs and the CLI | Yes | Yes | Yes |
| [Single sign-on](/account/sso-scim) over OIDC or SAML | No | Yes | Yes |
| [Audit streaming](/trust-control/audit#stream-records-to-your-own-systems) to a webhook, S3, Datadog or Splunk | No | Yes | Yes |
| [Evidence export](/trust-control/compliance#collect-the-evidence-for-a-period) of audit records | No | Yes | Yes |
| [Roles per environment](/account/workspaces#give-someone-a-different-role-in-one-environment) | No | Yes | Yes |
| [SCIM directory sync](/account/sso-scim) | No | No | Yes |
| [Your own secret store](/execution/secrets#read-secrets-from-your-own-secret-store): AWS Secrets Manager or HashiCorp Vault | No | No | Yes |

The table shows what each tier includes as standard. Each licence key lists the features it turns on, and that list is what your server follows. [Licences](/self-hosting/licences) explains how to get and activate a key.

Other pages in these docs say which plan on anlyon.com includes a feature. On your own server there are no plans and nothing is billed: the edition and the licence key decide.

## Read the licence in plain words

The server, the console, the packs and the installer are under the [Elastic License 2.0](https://github.com/AnlyonHQ/anlyon/blob/main/LICENSE) (ELv2).

- **You may** use, copy, modify and run Anlyon, in production and inside your company, for free.
- **You may not** offer Anlyon to third parties as a hosted or managed service.
- **You may not** remove or work around the licence-key checks.

Code in `ee/` directories is under the same licence. It stays switched off unless a valid licence key is set, and the Community edition never needs it.

The SDKs, the CLI and the MCP server are under the MIT licence, so you can use them in any project, open or closed:

| Language | Packages |
| --- | --- |
| TypeScript | `@anlyonhq/sdk`, `@anlyonhq/cli`, `@anlyonhq/mcp-server`, `@anlyonhq/ai-sdk`, `@anlyonhq/react` |
| Python | `anlyon`, `anlyon-langchain`, `anlyon-llamaindex` |

The name "Anlyon" and the Anlyon logo are trademarks and are not licensed for use by forks. This section is a summary; the `LICENSE` file in the repository is what applies.

## Choose hosted or self-hosted

| | anlyon.com | Your server |
| --- | --- | --- |
| Who runs it | Anlyon | You, with the `anlyon-selfhost` command |
| Upgrades, backups and certificates | Done for you | One command each; see [Operate](/self-hosting/operate) |
| Where credentials and records live | Anlyon's infrastructure | Your own Postgres |
| What it costs | A plan; see [pricing](https://anlyon.com/pricing) | Community is free; Team and Enterprise need a licence key |
| Usage limits | Your plan's | None from Anlyon |
| OAuth apps for signing in to services | Anlyon's shared app, or your own for an environment | Your own, registered once for the install; see [Configure](/self-hosting/configure#connected-accounts) |
| [Hosted functions](/execution/hosted-functions) | Yes | Not available |

If you would rather not run servers, start at [anlyon.com](https://anlyon.com).

## Point your agents at your server

Everything else in these docs applies to your server unchanged. Replace `https://api.anlyon.com` with your own address.

```typescript TypeScript
import { Client } from '@anlyonhq/sdk';

const anlyon = new Client({
  apiKey: process.env.ANLYON_API_KEY!,
  baseUrl: 'https://anlyon.example.com',
});
```

```python Python
import os
from anlyon import Client

# Or set ANLYON_BASE_URL=https://anlyon.example.com and leave base_url out
anlyon = Client(
    api_key=os.environ["ANLYON_API_KEY"],
    base_url="https://anlyon.example.com",
)
```

```bash CLI
export ANLYON_API_URL=https://anlyon.example.com
anlyon auth login
```

MCP clients connect to `https://anlyon.example.com/mcp`.

## Next

**[Install](/self-hosting/install)**

Requirements, the one command, and creating the owner.

**[Configure](/self-hosting/configure)**

Email, file storage, sign-up, OAuth apps and telemetry.

**[Operate](/self-hosting/operate)**

Status, logs, upgrades, backups and getting back in.

**[Licences](/self-hosting/licences)**

Get a Team or Enterprise key, activate it, and what happens when it expires.

**[Security](/self-hosting/security)**

Where credentials live, the root key, and reporting a vulnerability.
