Docs ยท Get started

Hosted and self-hosted

bastn runs two ways. On Hosted we run the gateway and you install only the connector; on Enterprise the whole of bastn runs in your network.

Docs menu
On this page
  1. Two ways to run bastn
  2. Hosted
  3. Enterprise (self-hosted)

Two ways to run bastn#

HostedEnterprise (self-hosted)
Gateway and dashboardWe run them at app.bastn.ai and mcp.bastn.ai.You run them in your network.
DatabaseOurs.Your Postgres.
What you installThe bastn connector on the hosts next to your private services.The gateway, the dashboard, Postgres and your connectors.
Where connectors dialhub.bastn.ai:18093Your gateway's connector hub.
Audit chain keyHeld by bastn.Yours (BASTN_SECRET_KEY).
Verifying the audit chainbastn runs the check. You export your teams' rows.You verify the whole chain offline.

The product is the same in both: identity, policy, approvals, connectors and the audit log work the same way, and the rest of these docs apply to both. Where a step differs, these docs describe Hosted.

Hosted#

You sign up by invitation (see the Quickstart), manage everything in the dashboard at https://app.bastn.ai, and point your agents at https://mcp.bastn.ai/mcp.

The only thing you run is the connector, and only when bastn has to reach something private: an MCP server or REST API on your network. It dials out to hub.bastn.ai:18093 over mutual TLS, so no inbound port opens on your side. The Connectors page has the install commands.

Upstream credentials for services behind a connector stay on the connector's host. Credentials for servers bastn reaches directly over HTTP are stored encrypted by bastn and never shown to agents. See the Security model.

Enterprise (self-hosted)#

On Enterprise, all of bastn runs in your network:

  • the gateway, one Go binary: the MCP endpoint, the admin API and the connector hub;
  • the dashboard;
  • Postgres, which holds accounts, policy, connectors and the audit chain.

It installs on Kubernetes with the bastn Helm chart. Your connectors enroll against your own gateway's connector hub, with the same connector binary and image as on Hosted.

Running it yourself adds a few things that bastn handles for you on Hosted:

  • The secret key. BASTN_SECRET_KEY seals stored secrets and keys the audit chain. The gateway refuses to start without it. Back it up with the database: a database restored without it loses them.
  • Operator accounts. The operator runs the installation: sign-up and access requests, the connector hub, gateway-wide servers and policy, the whole audit chain. It reads no org's data. An operator is a named account. Make the first one after the install with bastn operator init -email you@example.com, run where the gateway runs: it prints a new account's password once, to be changed at first sign-in. That account turns on two-step verification, then opens Operator mode from the account menu with its password and a code. Operator mode has its own navigation: Home, Registration, Servers, Policies, Audit and Settings. A strip under the top bar shows the account and when the session ends, with Leave operator mode. Access requests and sign-up invites are under Registration. Org pages are not shown in operator mode. Operators grant more operators under Settings, Operators. An operator who lost their password or app is reset with bastn operator reset; operators have no email reset. There is no shared admin token: tokens in the gateway config must have scopes, for CI.
  • **Policy files and the bastn command line.** You can keep policy in files, validate them and apply them with bastn policy. Sign the command line in with bastn login -email you@example.com (-operator for operator mode), or give it a scoped token in $BASTN_TOKEN.
  • Gateway settings. Some behaviour that is fixed on Hosted is yours to set in the gateway's config:
    • mcp_auth.require_agent decides what happens to keys and OAuth logins that act as no agent: off serves them and lets new keys be minted without an agent, warn serves them and reports each one, and enforce (the default) refuses them. Under warn and enforce, new keys must be minted for an agent.
    • new_tools on a server in the gateway config defaults to deny, as everywhere else: set new_tools: allow to list every tool it has. At startup the gateway names the servers that leave it unset.
    • result_scan on a server in the gateway config defaults to redact, as everywhere else: set result_scan: off to pass its results as they are. At startup the gateway names the servers that leave it unset.
    • limits.max_body_mb (8, at most 64) is the largest request an agent may send, in MiB. A bigger one gets HTTP 413. Tool results stay capped at 8 MiB.
    • tool_calls.default_timeout (5 minutes) and tool_calls.max_timeout (1 hour, at most 24 hours) set the default time a tool call gets and the most any org may allow.
    • connectors.max_streams_per_relay (2000) caps the connectors one relay may carry.
  • Upgrades. A release can bring database migrations. They run when the new gateway starts. Take a database backup before every upgrade that brings them; the release notes say when one does.
  • Audit verification. You hold the key, so you can verify the whole chain yourself, including offline from an export:
sh
bastn audit export -config config.yaml > audit.jsonl
BASTN_SECRET_KEY=... bastn audit verify --file audit.jsonl

To discuss an Enterprise install, write to support@bastn.ai.

Something missing or wrong on this page? Write to support@bastn.ai.