Self-hosting the relay
The relay is one static binary (also shipped as a container). It stores public keys, pairing tickets and push handles, forwards sealed messages, and nothing else. Put it anywhere all your devices can reach over HTTPS. Like the rest of AgentOrbit it is free: no license, no key, no account.
You may not need this page. The Mac app has a relay built in: choose Just this Mac when you set AgentOrbit up, and if Tailscale is installed it is shared on your tailnet for your iPhone and servers. That is enough when the Mac is awake; away from home, your phone reaches it through Tailscale. For phones and servers that need to reach you while the Mac sleeps, run the relay on a server and choose My relay. The rest of this page is about that.
Run the binary
The relay is the same orbit binary as the Linux connector. On the server, download both Linux builds
into one folder and check them:
mkdir -p dl && cd dl
for a in amd64 arm64; do
curl -fsSLO https://dl.agentorbit.app/dl/orbit-linux-$a
curl -fsSLO https://dl.agentorbit.app/dl/orbit-linux-$a.sha256
done
sha256sum -c *.sha256 && chmod +x orbit-linux-* && cd .. Then start the relay with the build for your server (orbit-linux-arm64 on ARM):
./dl/orbit-linux-amd64 relay --addr :8080 --data ./relay-data --downloads ./dl --addris the listen address (alsoORBIT_ADDR).--datais the state directory; back it up if you like, it is small (alsoORBIT_DATA).-
--downloadslets the relay hand the connector to new Linux servers (alsoORBIT_DOWNLOADS). See Adding Linux servers.
Run with Docker
A small image is all it takes: the same orbit binary, running as a relay, with both Linux builds
inside for new servers. It picks the right build for the host it is built on.
FROM debian:stable-slim
ARG TARGETARCH
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
ADD --chmod=755 https://dl.agentorbit.app/dl/orbit-linux-amd64 https://dl.agentorbit.app/dl/orbit-linux-arm64 /downloads/
RUN ln -s /downloads/orbit-linux-${TARGETARCH} /usr/local/bin/orbit
ENV ORBIT_ADDR=:8080 ORBIT_DATA=/data ORBIT_DOWNLOADS=/downloads
EXPOSE 8080
VOLUME /data
ENTRYPOINT ["orbit", "relay"] Build it and start the relay:
docker build -t orbit-relay .
docker run -d --name orbit-relay --restart unless-stopped \
-p 8080:8080 -v orbit-relay-data:/data orbit-relay ca-certificates is needed for the relay's outgoing HTTPS, such as iPhone push. Anything after the
image name is passed to orbit relay as flags, for example --registration-token.
Put it behind HTTPS (we recommend Tailscale)
Browsers and phones need HTTPS, and a tailnet keeps the relay off the public internet entirely. On the relay host:
tailscale serve --bg 8080
Your relay is now at https://<host>.<tailnet>.ts.net for every device on your tailnet,
including your iPhone with the Tailscale app. Caddy, nginx or a Kubernetes ingress work just as well if you prefer.
Point your devices at it
When you set up the Mac app, choose My relay and paste the relay URL and, if you set one, the registration token. Then add your iPhone and servers from Settings → Devices → Add iPhone or server; the pairing code carries the relay address, so they find it on their own.
Adding Linux servers
For a server, AgentOrbit gives you a one-line command that downloads the connector from your relay, checks it and
pairs the machine. That only works when the relay has the Linux builds to hand out, which is what
--downloads (or ORBIT_DOWNLOADS) is for. The Docker image above already includes them;
with the binary, point --downloads at the folder you downloaded. The folder needs files named
orbit-linux-amd64 and orbit-linux-arm64.
iPhone push for a self-hosted relay
Only AgentOrbit's Apple push key can reach the iPhone app, so your relay sends its sealed push envelopes through
our Push Gateway at push.agentorbit.app. That is on by default and free, with
nothing to set up: the relay signs each push with its own key, and the gateway applies a fair-use limit per relay
of 1,000 pushes a day and 60 a minute, far above what one person's agents produce.
Over the limit, the gateway answers with a plain message, the relay notes it once in its log and keeps running;
pushes resume when the window resets, and nothing else is affected.
To turn gateway push off entirely, start the relay with --push-gateway "" (or an empty
ORBIT_PUSH_GATEWAY). Your iPhone then gets no notifications, and nothing of yours touches our servers
at all.
Public relays: require a registration token
If the relay is reachable from the internet (not only your tailnet), set a registration token so strangers cannot create meshes on it. Your own devices need the token once, when the first Mac creates the mesh.
orbit relay --addr :8080 --data ./relay-data --registration-token $(openssl rand -hex 24) Also available as ORBIT_REGISTRATION_TOKEN.
Behind a proxy: set the public URL
When Caddy, nginx, Traefik or an ingress sits in front of the relay, tell it the address your devices use with
--public-url (or ORBIT_PUBLIC_URL). The one-line installers for Linux servers
(/install.sh and invite links) embed the relay's address. Without it they take it from each
request's Host header, which a proxy rewrites to its upstream, such as 127.0.0.1:8080,
so a new server would try to reach the relay at its own loopback address.
orbit relay --addr :8080 --data ./relay-data --public-url https://orbit.example
The relay warns at startup when it isn't set, and refuses (with this hint) to serve an installer whose address
would be a loopback or private one to a request that came through a proxy. Behind tailscale serve
the Host header is your tailnet name, so it works without.
Have a key from before?
Running a relay used to need a license key (ORBIT_SELF-…). It doesn't any more, and there is nothing
you have to do: a relay with an old license file starts as before, and every release runs on every relay.
Updates
To update the relay, download the new builds the same way and restart it. For Docker, rebuild the image so it fetches the latest release, then recreate the container:
docker build --pull --no-cache -t orbit-relay .
docker rm -f orbit-relay && docker run -d --name orbit-relay --restart unless-stopped \
-p 8080:8080 -v orbit-relay-data:/data orbit-relay orbit version prints the version you are running.
Flags at a glance
| Flag | Environment | What it does |
|---|---|---|
--addr | ORBIT_ADDR | Listen address, default :8080 |
--data | ORBIT_DATA | State directory, default ./relay-data |
--downloads | ORBIT_DOWNLOADS | Folder of orbit-linux-amd64 and orbit-linux-arm64, for adding Linux servers |
--push-gateway | ORBIT_PUSH_GATEWAY | Gateway URL, default https://push.agentorbit.app; empty turns iPhone push off |
--push-gateway-key | ORBIT_PUSH_GATEWAY_KEY | A Push Gateway key from before pushes were free. No longer needed; an existing one keeps working |
--registration-token | ORBIT_REGISTRATION_TOKEN | Required to create a mesh; set it on public relays |
--public-url | ORBIT_PUBLIC_URL | The address clients reach the relay at, e.g. https://orbit.example; set it behind a proxy (see above) |
--push-subject | ORBIT_PUSH_SUBJECT | Contact sent with browser (web client) push, a mailto: or https: URL |
--max-meshes | ORBIT_MAX_MESHES | Most meshes the relay holds, default 10000 |