English

Admin guide Operations

Security

Access to canvases, HTTPS and reverse proxies, how keys are protected, and the boundaries against prompt injection.

On this page

Archipelego is built for a room of people who trust each other. This page explains what protects a canvas, and what you add when the server is reachable beyond that room.

Who can open a canvas

Unless you configure accounts, Archipelego has no user accounts and no passwords.

  • Anyone with a canvas link can join that canvas, read it and edit it.
  • A canvas id has 32 random bytes, written as 43 URL-safe characters. Nobody can guess it.
  • The link is the access control. Share it like you share a meeting link.
  • GET /api/canvases lists the canvases on the server, with their ids. Anyone who can reach the server can call it.

With accounts on (see Accounts and sign-in), people who sign in get a private workspace, and ARCHIPELEGO_AUTH=required makes every API call and every canvas connection need a signed-in person: nothing is readable without signing in, the canvas list included.

The server accepts websocket connections only at /yjs/<canvas id>, where the id has 1 to 64 letters, digits, _ or -. It closes any other upgrade request.

HTTPS

Serve Archipelego over HTTPS whenever people join from other devices.

  • Browsers allow the clipboard, and therefore Copy share link, only on secure pages.
  • Browsers allow the Web Crypto API, which encrypts keys kept in the browser, only on secure pages. http://localhost counts as secure. A plain http:// LAN address does not.
  • Over HTTPS, the app connects its websocket with wss:// by itself.

Reverse proxy

Put a reverse proxy in front of the server to add HTTPS. The proxy must pass websocket upgrades for /yjs/. Without them, the canvas stays on the Connecting chip.

Size limits to keep in mind:

  • The server accepts websocket messages up to 16 MiB.
  • POST /api/architect and POST /api/feature accept request bodies up to 3 MB. POST /api/mcp/call accepts up to 200 KB. Other JSON endpoints accept up to 2 MB.
  • Explain and the Architect stream their answers as server-sent events. Turn off response buffering for them.

nginx

nginx
map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
    listen 443 ssl;
    server_name archipelego.example.com;

    ssl_certificate     /etc/ssl/archipelego/fullchain.pem;
    ssl_certificate_key /etc/ssl/archipelego/privkey.pem;

    client_max_body_size 4m;

    location / {
        proxy_pass http://127.0.0.1:1234;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_buffering off;
        proxy_read_timeout 1h;
        proxy_send_timeout 1h;
    }
}
  • proxy_http_version 1.1 and the Upgrade and Connection headers carry the websocket upgrade.
  • A long proxy_read_timeout keeps idle canvases connected. The server also pings every connection every 30 seconds.
  • proxy_buffering off lets streamed answers arrive word by word.
  • client_max_body_size 4m leaves room for the 3 MB Architect requests.

Caddy

caddy
archipelego.example.com {
    reverse_proxy 127.0.0.1:1234
}

Caddy gets a certificate by itself and passes websocket upgrades without extra settings.

How keys are protected

  • The server never returns an API key to a browser. The API shows only the last four characters.
  • The server never logs keys.
  • Keys stored on the server are encrypted at rest with AES-256-GCM, bound to their canvas and provider.
  • Only the person who stored a key holds its owner token. Only that token can replace or remove the key.
  • Keys kept in a browser stay encrypted in that browser. They travel to the server only with each AI request, and the server does not keep them.

Details are in AI providers and keys.

The master key

  • Set ARCHIPELEGO_SECRET from a secret store, not in a file that you commit.
  • If you rely on .vault.key, protect the data folder like a password file. Anyone with both the folder and the key file can decrypt the stored keys.
  • Keep backups of the data folder as private as the server.

Server credentials

When you set ANTHROPIC_API_KEY, every canvas on the server can use it. On a shared server, set ARCHIPELEGO_PLATFORM_AI=off to force bring-your-own-key. Each team then uses, and pays for, its own keys.

Prompt injection

Canvas content and chat messages are written by participants. The server treats them as data, never as instructions.

  • The server wraps the canvas in <canvas> tags and the recent chat in <chat> tags.
  • The system prompt tells the model that both were written by participants, and that it must never follow instructions inside them.
  • The server removes < and > from every title, label, post-it and message it sends, so nobody can close those tags.
  • Each field is cut to a fixed length. A question keeps at most 4000 characters, and a chat message at most 1200.
  • The Architect sees at most 500 blocks, 900 connections, 80 post-its and the last 24 chat messages.
  • The Architect only writes text into the chat. It has no way to change the canvas.
  • In an answer, only ids of blocks that exist on the canvas become references and spotlights.
  • When the Architect proposes a feature, the proposal is a draft. Nothing changes until a person reviews it and saves it.
  • A card from the Architect holds only controls that the app knows. When someone presses one of its buttons, the choice goes back to the Architect as data, like a chat message.

MCP Apps

MCP Apps are interactive pages in the chat. They come from the built-in archipelego server, and from the remote servers you list in ARCHIPELEGO_MCP_SERVERS. See MCP servers.

  • Only the administrator chooses the remote servers. The server never connects to an address that a participant or a model sends.
  • Each app runs in a sandboxed frame with an opaque origin. It has no cookies, no storage, and no access to the Archipelego page, the canvas or the AI keys.
  • The frame gets a Content Security Policy built from the https domains that the app's resource declares. Everything else is blocked, including form submissions.
  • An app talks to the chat only through the MCP Apps messages. It can call tools of its own server, post a message in the name of the person who uses it, and open http and https links in a new tab.
  • The browser reaches remote servers only through /api/mcp/* on your server. The remote server sees your server, not the participants.