# Remote access

> Reaching Silos from another device: the localhost default, a tunnel in front of it, the access token, optional Google sign-in, and installing it as an app.

Source: https://silosplatform.com/docs/remote-access/

Silos runs on the machine where your agents work and listens only on `127.0.0.1:3210`. Nothing on your network can reach it until you put something in front of it. This page covers reaching it from your laptop or your phone without changing that.

## The access token

The first start writes a random token to `~/.silos/token` (mode `0600`). The server prints the address with it:

```
Silos at http://127.0.0.1:3210/?token=<token>
```

Opening that address pairs the browser. The page stores the token and removes it from the address bar. The token is the key to the whole instance, so keep it like a password. To fix it from the environment instead, set `SILOS_TOKEN`. Setting a new value rotates it.

## Authentication is decided per request

Silos does not trust a request because of the port it arrived on. It looks at each request:

- **A truly local request** has a loopback `Host` (`127.0.0.1` or `localhost`) and none of the forwarding headers a proxy adds (`X-Forwarded-For`, `X-Forwarded-Host`, `X-Forwarded-Proto`, `Forwarded`, `CF-Connecting-IP`, `CF-Ray`, `X-Real-IP`, `True-Client-IP`). If a browser sends an `Origin`, it must be a loopback one too, so another website open in your browser cannot pass as local. Without a credential such a request may only read.
- **Every write**, local or not, needs an identity: your token or a sign-in session, or an agent's own bearer token. **Every WebSocket** needs yours; an agent's token never opens one.
- **Everything else**, meaning a public host name or any forwarding header, needs authentication for every request, reads included.

The live console and the chat stream run over WebSockets, so even on the machine itself you need the paired browser to work.

## Reaching it through a tunnel

The intended way in from outside is a tunnel or reverse proxy on the same machine that forwards to `127.0.0.1:3210`, such as cloudflared, or Caddy with a domain or inside a VPN like Tailscale. Silos keeps listening on loopback. The proxy is the only thing exposed.

This works because a tunnel always adds its forwarding headers, and a remote client cannot remove them: the proxy adds them after it receives the request. Two configuration rules follow, and both matter:

1. **Never configure the proxy to strip the forwarding headers.**
2. **Never make it pass `Host: 127.0.0.1` through unchanged.**

Either one would make internet traffic look local and open the instance. Both cloudflared and Caddy add the headers by default.

Through the tunnel, open `https://<your-domain>/?token=<token>` once on each device. The token stays stored in that browser.

Webhook automations are the one exception to the token: `POST /api/hooks/<id>` is authenticated by the automation's own secret header. See [Automations](https://silosplatform.com/docs/automations/).

To run Silos on a server rather than on your own machine, there are two ways: the Railway template, or Docker Compose on a VPS with a proxy such as Caddy in front. The repository's README describes both, and [`/install.md`](https://silosplatform.com/install.md) has the steps and the checks in a form an AI agent can follow.

## Optional: Google sign-in

If you would rather sign in with a Google account than carry the token to each device, create `~/.silos/firebase.json` with the web configuration of a Firebase project of your own and the emails allowed in:

```json
{
  "apiKey": "…",
  "authDomain": "your-project.firebaseapp.com",
  "projectId": "your-project",
  "allowedEmails": ["you@example.com"]
}
```

Give it mode `0600`, like the token, and restart Silos: the file is read at start. Without the file nothing changes.

With it, a remote visitor sees «Continue with Google». The server verifies Google's ID token itself (signature against Google's public keys, audience, issuer, expiry, a verified email) and checks the email against `allowedEmails`, without regard to case. It then issues a session of its own that lasts a fixed 7 days. The static token is never handed out this way.

- **Sign out** in Settings revokes the session on the server.
- Removing an email from `allowedEmails` cuts that person's sessions within about 5 seconds, with no restart.
- The `?token=` address keeps working. It is the way in if Google or the network fails.
- Sign-in is rate-limited to 10 attempts a minute. Behind a proxy every visitor shares that limit, because the server sees the proxy as the client. The `?token=` route does not go through it.

Sessions are kept in `~/.silos/sessions.json` (`0600`).

## Installing it as an app

Silos can be installed as its own app window. In Chrome use «Install page as app». On iPhone and iPad use Share, then «Add to Home Screen». You can then switch to it like any other app instead of hunting through browser tabs. It is the same browser underneath: reload works, and so does the banner that says a new version is ready.

On a phone, Home is the first screen. Browser back returns to it, and the list of agents and conversations is one tap away. On a narrow screen the Map's Graph says it is better on a wide screen and offers «Open Lanes», or «Show the graph anyway».

## Notifications on your phone

Settings › Notifications turns on push notifications for each device that should ring. Silos rings when something new needs you, such as a question, an approval or a failed run, and once each morning with the digest. A notification says only how many things and what kind, never an agent's name or what a row says. Tapping it opens Home.

Browsers deliver notifications only over HTTPS (or on the machine itself at localhost), so set this up through your tunnel's `https` address. On iPhone and iPad, notifications work only after Silos is on the Home Screen and opened from there.
