Skip to content

Network

AlphaBase is local-first. By default, runtime traffic stays on loopback.

Local-Only Default

  • --hostname defaults to 127.0.0.1
  • server/web ports default to random available ports

Use explicit static port when integrating external clients:

Terminal window
alphabase serve --hostname 127.0.0.1 --port 4096

Secure Remote Access

Keep the runtime on loopback and connect through an authenticated, encrypted, network-restricted gateway that you operate. Verify the gateway’s TLS certificate and access policy before connecting a remote client. Do not expose the runtime directly to the public internet.

Direct non-loopback binding is an operator deployment choice. It requires a server password of at least 16 bytes or the generated bearer credential, network restrictions, and a trusted TLS setup. The runtime’s --tls option generates a self-signed certificate; clients must explicitly trust its certificate authority. If TLS is required but cannot be started, the runtime now stops instead of serving HTTP. Configure an exact origin allowlist and rate limiting at the gateway where appropriate.

Proxy Settings

AlphaBase respects standard proxy env vars:

Terminal window
export HTTPS_PROXY=https://proxy.example.com:8080
export HTTP_PROXY=http://proxy.example.com:8080
export NO_PROXY=localhost,127.0.0.1

Enterprise Certificates

For custom CA roots:

Terminal window
export NODE_EXTRA_CA_CERTS=/path/to/ca-cert.pem

CORS

Allow additional frontend origins if needed:

Terminal window
alphabase serve --cors https://app.example.com

Browser origins must match the runtime origin or an explicitly configured CORS origin. A different localhost port is not implicitly trusted; add it with --cors when developing a separate local frontend. This allowlist also guards browser requests that change runtime state.

When a reverse proxy is unavoidable, list only its exact socket addresses in ALPHABASE_TRUSTED_PROXY_IPS (comma-separated). Forwarded client addresses are ignored unless the direct peer is on that list. Configure the proxy to replace, not preserve, client-supplied forwarding headers.