Serve several People
Let your other machines and other People reach a Local Installation through Remote Access, at a public name of your Tailscale Funnel.
A local installation can also serve your phone and your laptop away from
home, and other People: a household, or a small team, with SQLite. Remote
Access does this. Your Tailscale Funnel gives the installation a public
https:// name, such as https://owner-mac.tail1234.ts.net, and forwards
each request to Pagis on this computer. The other machines need no
Tailscale. Another machine signs in with a Sign-In Link and never with a
password (ADR-0028).
What you need
- A Tailscale account, and Tailscale on this computer, signed in and connected. On macOS, install the standalone build from pkgs.tailscale.com. It serves Funnel, and Tailscale's own documents disagree on whether the Mac App Store build does.
- On Linux, permission to change Tailscale.
tailscale funnelneeds root or the operator of Tailscale. Runsudo tailscale set --operator=$USERonce, as the user that runs Pagis. - HTTPS and Funnel for your tailnet. Where they are off, the switch shows the page of Tailscale that turns them on.
Turn on Remote Access
- In the Administration Interface, open Settings, and find Remote Access under Network. A Client App set up for "Several people" opens this switch after the installation.
- Read what the switch says about Tailscale on this computer. Where Tailscale is not installed, or does not run, or is signed out, the switch says what to do, and Check again reads it again.
- Turn on Remote Access, read the note, and select Turn on and restart.
- Where your tailnet has HTTPS or Funnel off, the switch shows a page of
login.tailscale.com. Open it and approve. Pagis goes on when you approve. Cancel stops the wait. - Pagis turns on Funnel, writes the Public Origin and the Trusted Proxy to
config.toml, and starts again. The switch then shows the public name.
Pagis runs these two commands as you, on this computer:
tailscale funnel --bg --yes --https=443 http://127.0.0.1:4400
tailscale funnel --bg --yes --tls-terminated-tcp=8443 tcp://127.0.0.1:4402The first port is the product port of the installation. The second is the
TURN server that carries the live screen to other machines,
[screen] remote_access_turn_port in config.toml. Where port 443 or port
8443 of your Funnel already serves something else, the switch names it and
replaces nothing. Remove it first with tailscale funnel --https=443 off
or tailscale funnel --tls-terminated-tcp=8443 off.
The Public Origin is https:// and the name of this computer on your
tailnet. The Trusted Proxy is 127.0.0.1, where tailscaled reaches Pagis.
Pagis believes its X-Forwarded-Proto, so the Session cookie carries
Secure, and its X-Forwarded-For, so the sign-in rate limit counts each
browser apart. The Bind Address stays on loopback, so nobody reaches the
plain-HTTP port of Pagis around the TLS of the Funnel.
The installation keeps its Client Credential, so the Client App on this computer stays signed in. The Administration Interface stays on loopback and is never on the Funnel.
Sign in from another machine
Pagis takes no password from another machine in Remote Access. A browser there opens the sign-in page with one field, Paste a sign-in link. A Sign-In Link comes from three places:
- An invite. The Administrator creates each other Person under People in the Administration Interface, and the answer shows the invite of that Person. It is good for seven days.
- Another browser or app of the same Person. Under Settings → Sessions, select Sign in another browser or app. To sign in your own phone, do this in the Client App on this computer. The link is good for five minutes.
pagis pairon this computer, the command of Back up and restore. It is the way back in for a Person who has no Session left.
Open the link on the other machine, or paste it into the field of the sign-in page. A browser on this computer keeps the sign-in with an address and a password.
The name of your computer and your tailnet is in the public Certificate Transparency logs, so bots find it. Each route of the product port that answers without a Session holds no content of a Workspace.
Turn off Remote Access
Turn off the same switch and select Turn off and restart. Pagis removes
the Funnel of Pagis with tailscale funnel --https=443 off and
tailscale funnel --tls-terminated-tcp=8443 off, clears Remote Access, the
Public Origin and the Trusted Proxy, binds loopback, and starts again.
With Remote Access off, Pagis answers only a request from a program on this
computer. It refuses every request that carries a proxy header, such as
X-Forwarded-For, or a Host that is not a loopback name, also when a
Funnel still runs. A browser that opens a page gets a short page that says
so, with status 403. A request under /api/, and every request that does
not ask for HTML, gets the JSON error. The People who signed in from other
machines keep their accounts and their Sessions, and they reach nothing
until Remote Access is on again.
A server is not switched here: its deployment sets Remote Access, and its Settings view shows Remote Access with no switch. A server behind its own proxy is not in Remote Access (Put a proxy in front). A server at home is in it through the Tailscale service of its deployment (Remote Access at home).
The live screen for other people
In Remote Access, a browser on another machine sees the live screen of a
Computer through the Funnel. The Media Relay sends the screen over UDP,
and the Funnel carries TCP alone, so Pagis runs a TURN server on this
computer, and Funnel publishes it on port 8443 of your public name. Pagis
gives each browser on another machine this TURN server with a credential of
its own, and the browser sends its screen session through it. The TURN
server listens on loopback at [screen] remote_access_turn_port (4402 by
default), and it relays to the Media Relay of Pagis and to nothing else on
this computer. A browser on this computer gets no TURN server and reaches
the Media Relay directly.
The Funnel limits how many people watch at once. Tailscale does not publish the bandwidth of Funnel. Through its public relays, one computer carried about 15 Mbit/s in total, and the live screen takes about 2 Mbit/s for each viewer, so a few people watch at once. A round trip through a Funnel relay took 120 to 265 ms, so a takeover from another machine answers more slowly than one on this computer.
Where you change remote_access_turn_port, Pagis reads the Funnel of the
old port as something else, and the switch names it. Remove it with
tailscale funnel --tls-terminated-tcp=8443 off, then turn on Remote Access
again, so the Funnel publishes the new port.
A machine that reaches this computer over UDP can take a direct path to
the Media Relay, which carries more and answers faster, and the browser
takes it first. The Media Relay sends and receives the screen at
[screen] advertise_ip in config.toml, on one port of media_port_first
to media_port_last (50000 to 50099 by default). A local installation
advertises 127.0.0.1. The relay listens on every interface of this
computer, so one setting and one firewall rule carry the screen directly:
- A machine on your tailnet. Set
advertise_ipto the tailnet address of this computer, whichtailscale ip -4prints, such as100.101.102.103. The tailnet carries UDP, so no port opens to the internet. That machine needs Tailscale. - A machine on your LAN. Set
advertise_ipto the LAN address of this computer, such as192.168.1.20, and allow the UDP range in the firewall of this computer.
For example, with Tailscale:
[screen]
advertise_ip = "100.101.102.103"Restart Pagis after the change. PAGIS_SCREEN_ADVERTISE_IP sets the same
address for one run. In Settings, Remote Access says how another
machine sees the live screen with the address that the running daemon
advertises.
What a Computer reaches here
A Local Installation has no egress rules. A daemon that runs as the owner cannot write the firewall of this computer or of the Docker Desktop or Colima VM, so Pagis does not install them. The Computer of each Agent, also of an Agent of another Person, therefore reaches the public internet, the LAN, and each service of this computer that listens on a network address. Under Docker Desktop or Colima it can possibly also reach the services that listen on this computer's loopback, through the host gateway. An HTTP or SSE Plugin server sends its requests from the daemon, so it also reaches the HTTP services on this computer's loopback (Reach). The Pagis product port still asks for a Session or the Client Credential, and the control port of each other Computer still asks for its secret. A server installs the rules (What a Computer reaches).