Network requirements
What a self-hosted installation needs from the network: the names that point at it, the ports it listens on, and what it reaches, each only when its feature is turned on.
Each record points at the host, or at the load balancer in front of it:
| Name | Serves |
|---|---|
API_HOST |
The API, the MCP endpoint and the realtime hub |
UI_HOST |
The app |
DOCS_HOST |
This documentation |
GATEWAY_HOST and *.GATEWAY_HOST |
The mocks: every project on its own subdomain, the apex too |
| Each custom domain a project uses | That project’s mocks. In the files TLS mode, your certificate must cover it |
Inside the stack, containers resolve names through Docker’s DNS, which asks the host’s resolvers, so every destination below must resolve on the host.
Inbound
Section titled “Inbound”Only the edge listens on the host: 80/tcp, 443/tcp and 443/udp for HTTP/3, on EDGE_BIND_ADDRESS. In the acme_http TLS mode, 80 and 443 must be reachable from the internet for the certificate authority’s checks.
The edge listens on IPv4 only. EDGE_BIND_ADDRESS is either 0.0.0.0, every IPv4 address of the host and the default, or one IPv4 address that an interface of the host holds; install refuses any other value, IPv6 addresses included. The mockhub command checks the edge from the host itself: at 127.0.0.1 when the edge listens on every address, and at the bound address otherwise. It sends your hostnames with each check, so the checks need no DNS on the host.
Outbound, by feature
Section titled “Outbound, by feature”Nothing leaves the host in the default configuration. Open each destination only for a feature you use:
| Feature | Destination | Turned on by |
|---|---|---|
| Mail: password resets, invitations, verification, alerts | The relay in MAILER_DSN, its host and port |
The operator. Needed in practice |
Certificates in the acme_http TLS mode |
acme-v02.api.letsencrypt.org on port 443, and acme.zerossl.com if the edge falls back to it |
The operator. files and internal issue nothing |
| Images from a registry | The registry release.env names |
The operator, for a release bundle without images |
| Sign-in with GitHub | github.com, api.github.com |
The operator, with the GitHub settings |
| Sign-in with Google | accounts.google.com from the browser, oauth2.googleapis.com, openidconnect.googleapis.com |
The operator, with the Google settings |
| AI generation and the assistant | openrouter.ai on port 443 |
The operator: AI_GENERATION_POLICY=enabled and an OpenRouter key |
| Checking new passwords against known breaches | api.pwnedpasswords.com on port 443, each time someone sets a password |
The operator: PASSWORD_BREACH_CHECK=enabled |
| Geolocation of request logs | updates.maxmind.com and the download host it redirects to, weekly |
The operator: the geoip profile and MaxMind credentials |
| Forwarding to an upstream, and record and replay | The upstream address each project sets | Members, on a plan that includes it |
| Webhooks and webhook alerts | Each webhook’s target hosts | Members |
| MCP sign-in for AI assistants | Each assistant’s metadata document address | The operator: MCP_OAUTH_ENABLED=true |
The breached-password check sends only the first five hexadecimal characters of the password’s SHA-1 hash, never the password. See Configuration reference.
Error reporting and tracing are off and cannot be turned on. Backups stay on the host, and the support bundle is a file you send yourself.
Internal destinations
Section titled “Internal destinations”The last three destinations are addresses members type. MockHub refuses one that resolves to a private, loopback or link-local address, follows no redirect, and connects only to the address it checked. To let projects reach your internal services, list their names in EGRESS_ALLOWED_HOSTS, comma-separated, and open those hosts and ports in the firewall:
EGRESS_ALLOWED_HOSTS=.internal.example.com,orders.example.net,.mock.example.com- A leading dot covers every subdomain of a name, but not the name itself. Each entry needs a dot.
- List
.GATEWAY_HOST, such as.mock.example.com, when the gateway host resolves to a private address and projects send webhooks to their own webhook inbox. - Never list a name that resolves into
INTERNAL_SUBNETorEDGE_SUBNET: members could then reach the installation’s own services.
Run ./mockhub install to apply it.
Limits
Section titled “Limits”- An internal destination’s certificate must come from a CA the app trusts. The app does not trust your organisation’s own CA, so HTTPS to a service with such a certificate fails.
- Entries are lowercase hostnames.
installrefuses an IP address, a port, or a name without a dot, naming the entry, before anything changes.