Running a server
Security model
What protects what on a GenHTTP Lambda installation - keys instead of accounts, apps in one process, the shared origin by path, connectivity, the build agent's reach, secrets, and a checklist for installations open to strangers.
GenHTTP Lambda is built to host many small apps cheaply, which shapes how it is secured. Know the model before you decide who may build on your installation.
Who may do what#
| Credential | Grants | Where it lives |
|---|---|---|
| an app’s editor key | everything about that one app: change, deploy, download, delete | the editor link, the git address; handed to whoever created the app |
| the admin token | everything about the installation, every app’s code included | LAMBDA_ADMIN_TOKEN; entered in the panel, or in the configuration of your own agent |
| nothing | creating apps, using them, reading published sources and demos | - |
There are no accounts. Anybody who can reach the installation can create apps, within the limits of the tier new apps start in. To restrict that to your team, put the platform’s pages behind a login - in your reverse proxy, for every path but /lambda/ and /features/, or in a custom host.
The admin token belongs to a person, not to a browser others use: the panel links every app’s editor, which is the whole of its key. An agent you give it to keeps it in its client’s configuration, which is then as private as the token.
Apps share the server’s process#
Every app runs inside the server’s process. That is what makes hundreds of them cheap - and it is not a sandbox. Before code is compiled, a guard refuses what would reach beyond an app: the file system outside its own folders, processes, the environment, reflection, dynamic, connections of its own to a database, waiting on tasks, and - unless allowed - connecting to other servers. This raises the cost of misbehaving; it does not make it impossible.
The platform’s origin#
Below /lambda/, every app answers on the platform’s own host - the same origin as the editor, the panel and the /build workspace. A script of one app can read what the others keep in that browser: the editor links /build remembers, the admin token while the panel is unlocked in the same tab.
The platform limits what it can: the editor sends no referrer, so its key never leaves in a link; the panel keeps its token for the tab only; apps may not register a service worker for the whole host. Set LAMBDA_HOSTING_URL (apps at subdomains) before strangers build apps here: every app then answers at a host of its own.
Drafts’ previews stay on the platform’s host, also with subdomains - and there the panel keeps its token in the browser until Lock again, while /build keeps editor links in every case. Anybody can create an app and a draft. So on an installation others build on, keep the panel locked in any browser that opens previews of apps you do not trust, or use a separate browser profile for the panel.
Connecting to other servers#
Apps in the sandbox may not connect to other servers until you allow it, app by app, so nobody can turn your server into a proxy or a scanner with an app that fetches whatever it is asked to. Production apps may by default; you can decline that too. See Connecting to other servers.
The build agent’s jobs#
Every job of the build agent runs in a container of its own that reaches your server and Anthropic, and nothing else. Where a request names a site, the proxy beside it reads that site’s pages for the job - GET and HEAD, at public addresses only, never into your own network. So whoever may use the build agent can have your server fetch the pages of a site they name, and that site sees your server’s address. LAMBDA_AGENT_FETCH=false switches that off; see Reading web pages.
Where one agent builds for several installations, each is known to it by a token of its own, and a job is made at the MCP of the installation whose token asked - never at an address the request names. An installation is told of its own jobs only, and of the others how many there are. The installations share the Claude subscription or key and the machine’s room for jobs, and the jobs’ network: give the agent’s token of each installation to that installation alone.
Secrets#
The apps’ secrets are stored sealed with AES-256-GCM, under a key made from the installation’s key - secrets.key in the volume, or LAMBDA_SECRETS_KEY - and a salt of each app. The name is part of what is sealed, so a value copied to another name or app does not open.
- Written, never read back: neither the editor, nor the API, nor agents can show a value. Only the running app reads it.
- What it protects: copies of the database and its backups. It does not keep a secret from the app it belongs to, or from code running in the same process.
- Keep the key apart from database backups, and safe: without it, no secret can be read; everything else restores.
A secrets integration of your own can keep them in a vault instead.
Data at rest#
The apps’ databases and files are not encrypted by the platform. Protect the volume - disk encryption on the host, restricted access, encrypted backups - and, with PostgreSQL, the database server.
Logs and personal data#
The log records the address of every request, and where the address is registered. It is kept in memory, shown only behind the admin token, and gone with a restart; the container’s output keeps it longer. The database keeps, for 30 days, the addresses each app’s editor key was used from - so that the operator can block them with the app - and blocked addresses for two weeks. LAMBDA_LOG_CLIENT_ADDRESS=false records no addresses at all - and then counts no visitors. Visitor analytics never keep an address: they count a daily fingerprint held in memory.
Abuse#
Set LAMBDA_ABUSE_CONTACT, so the pages offer a way to report a harmful app. Block such an app on its page in the panel: it goes offline and is frozen, and the addresses it was changed from can be blocked with it.
Checklist for an installation open to strangers#
- Apps at subdomains (
LAMBDA_HOSTING_URL), and the hosting domain on the Public Suffix List - The panel locked, or kept in its own browser profile, where previews of strangers’ drafts are opened
- New apps start in the sandbox, with lifetimes and sizes under Limits that fit your server
- Sandbox apps do not connect by default; requests reviewed by a person
LAMBDA_CONTACTandLAMBDA_ABUSE_CONTACTset- The build agent’s daily allowance set and the models that cost most behind the password, or the agent off
- Backups of the volume, with
secrets.keykept apart - Somebody reads the dashboard