Skip to content

Set up a Collins server ​

Collins runs your sessions in a service, and that service doesn't have to be on the machine in front of you. Put it on a box that stays on (a home server, a workstation under the desk, a cloud VM) and every agent keeps working while your laptop sleeps, travels or reboots. Any Collins window that can ssh to the box picks the sessions up where they are.

This page is the walkthrough. The reference is A service on another machine; what the service is, and what quit, detach and restart mean, is The service.

What you end up with

A box running collins-service (no GTK, no desktop), your Claude Code login on that box, and a saved connection in your window. No port is opened and no token is minted: the window reaches the service over the ssh login you already have.

1. Pick the box ​

Anything Linux with systemd that you can ssh into works: Ubuntu 24.04 or 26.04, Debian, Fedora, RHEL 10 and its rebuilds, Arch through pipx. It needs no desktop. Size it for what your agents run (builds, tests, language servers), not for Collins: the service itself is a small Python process.

The box is where the work happens. Your sessions' checkouts, git, gh, the sandboxes and ~/.claude all live there; your laptop keeps only how the window looks.

2. Install the service on the box ​

Install collins-service, not collins: it is the service, its pty keeper and their systemd user units, with PyGObject, GLib and libsoup 3 as its only dependencies.

bash
sudo add-apt-repository ppa:episode6/stable
sudo apt install collins-service
bash
sudo dnf copr enable episode6/stable
sudo dnf install collins-service
bash
# from the releases page
sudo apt install ./collins-service_*_all.deb
bash
sudo dnf install ./collins-service-*.noarch.rpm
bash
# Debian/Ubuntu: sudo apt install python3-gi gir1.2-glib-2.0 gir1.2-soup-3.0
# Fedora:        sudo dnf install python3-gobject-base libsoup3
pipx install --system-site-packages collins
collins-service --install-server-units   # the systemd user units
bash
# needs pipx and the same PyGObject and libsoup 3 as the pipx tab
git clone https://github.com/episode6/collins && cd collins
./scripts/install-service.sh

For sandboxed sessions also install bubblewrap, and bindfs with fuse3 for directories allowed while a session runs (the packages recommend them). Install git and the GitHub CLI too: every git and PR action Collins takes runs on the box.

Nothing is enabled or started by the install. The first window that connects starts the service.

Where the systemd units come from. Each package (PPA, COPR, .deb, RPM) installs the service's and the keeper's units to /usr/lib/systemd/user/. A pipx install has none until collins-service --install-server-units writes them under ~/.local/share/systemd/user/, pointed at the install's own commands. It needs no GTK and enables nothing. Run it again if you reinstall somewhere else; collins-service --uninstall-server-units disables and removes them. ./scripts/install-service.sh installs whatever is checked out with pipx, writes the units the same way, and first stops every running collins-service of your user. The service runs without units, spawning itself and its keeper detached, but the systemctl and journalctl lines below need them.

A window's start (--print-socket over ssh, for a remote one) goes through the unit once it exists, and spawns the service detached only where there is none or its start fails. If a window started the service before the pipx units existed, that service keeps running outside systemd, and a unit started meanwhile exits at once; --install-server-units says so. Stop it (the window's Restart service does): the next start, a window's or systemctl --user start collins-service.service, goes through the unit.

3. Keep it running after you log out ​

bash
loginctl enable-linger "$USER"

Without lingering, your systemd user manager, $XDG_RUNTIME_DIR and the service with every session in it end when your last ssh login closes. Where polkit asks for an administrator, run it with sudo.

4. Install and log in to Claude Code on the box ​

Install Claude Code on the box as its setup guide says (the native installer puts the launcher at ~/.local/bin/claude). Then log in from an ordinary ssh login, so your login profile sets the PATH:

bash
ssh user@box
claude

Log in as the CLI asks (it prints a URL to open on any machine) and quit. The login is the box's own: nothing of your laptop's ~/.claude is copied, and everything Collins does that spends tokens runs on this login.

Make sure claude is on the PATH your login profile sets (~/.profile, ~/.bash_profile, ~/.zprofile) or your interactive rc. A PATH set only below an exec zsh or an auto-started tmux in ~/.bashrc is not seen; move it above that line.

5. Sign in to GitHub on the box ​

bash
gh auth login
gh auth setup-git   # git over https uses gh's login

PR status, the PR page and its actions are gh calls on the box. For git push over ssh, the sessions use the ssh agent of your logged-in session on the box when there is one (the systemd user manager's, or a socket under $XDG_RUNTIME_DIR such as openssh_agent); on a headless box there usually is none, so https remotes with gh auth setup-git, or a key with no passphrase, are the simple routes. Don't count on your laptop's agent: the window's ssh connection forwards one only if your ~/.ssh/config says ForwardAgent yes for the host, and the service may have been started by an earlier connection anyway.

6. Check the box ​

bash
collins-service --check

What it prints, by how you installed it in step 2:

text
service:      0.2.0, app id com.episode6.Collins
lingering:    on
runtime dir:  /run/user/1000
socket:       /run/user/1000/collins/com.episode6.Collins/api.sock (none)
shell:        /bin/bash (login profile and interactive rc read)
claude:       /home/you/.local/bin/claude
ssh agent:    none found (sessions start with no SSH_AUTH_SOCK)
bwrap:        /usr/bin/bwrap
units:        /usr/lib/systemd/user/collins-service.service
text
service:      0.2.0, app id com.episode6.Collins
lingering:    on
runtime dir:  /run/user/1000
socket:       /run/user/1000/collins/com.episode6.Collins/api.sock (none)
shell:        /bin/bash (login profile and interactive rc read)
claude:       /home/you/.local/bin/claude
ssh agent:    none found (sessions start with no SSH_AUTH_SOCK)
bwrap:        /usr/bin/bwrap
units:        /usr/lib/systemd/user/collins-service.service
text
service:      0.2.0, app id com.episode6.Collins
lingering:    on
runtime dir:  /run/user/1000
socket:       /run/user/1000/collins/com.episode6.Collins/api.sock (none)
shell:        /bin/bash (login profile and interactive rc read)
claude:       /home/you/.local/bin/claude
ssh agent:    none found (sessions start with no SSH_AUTH_SOCK)
bwrap:        /usr/bin/bwrap
units:        /usr/lib/systemd/user/collins-service.service
text
service:      0.2.0, app id com.episode6.Collins
lingering:    on
runtime dir:  /run/user/1000
socket:       /run/user/1000/collins/com.episode6.Collins/api.sock (none)
shell:        /bin/bash (login profile and interactive rc read)
claude:       /home/you/.local/bin/claude
ssh agent:    none found (sessions start with no SSH_AUTH_SOCK)
bwrap:        /usr/bin/bwrap
units:        /usr/lib/systemd/user/collins-service.service
text
service:      0.2.0, app id com.episode6.Collins
lingering:    on
runtime dir:  /run/user/1000
socket:       /run/user/1000/collins/com.episode6.Collins/api.sock (none)
shell:        /bin/bash (login profile and interactive rc read)
claude:       /home/you/.local/bin/claude
ssh agent:    none found (sessions start with no SSH_AUTH_SOCK)
bwrap:        /usr/bin/bwrap
units:        /home/you/.local/share/systemd/user/collins-service.service
text
service:      0.2.0, app id com.episode6.Collins
lingering:    on
runtime dir:  /run/user/1000
socket:       /run/user/1000/collins/com.episode6.Collins/api.sock (none)
shell:        /bin/bash (login profile and interactive rc read)
claude:       /home/you/.local/bin/claude
ssh agent:    none found (sessions start with no SSH_AUTH_SOCK)
bwrap:        /usr/bin/bwrap
units:        /home/you/.local/share/systemd/user/collins-service.service

It exits 1 when something required is missing (no runtime directory, claude not on the login shell's PATH). socket: … (none) is expected: the service is not running yet. units: names the unit file the user manager loads: a package's under /usr/lib/systemd/user/, or the one --install-server-units (or install-service.sh) wrote under ~/.local/share/systemd/user/. A pipx install that skipped that command reads units: none installed (…), which is a note, not a failure. After installing a checkout over a package, the line reads …, loaded ahead of /usr/lib/systemd/user/collins-service.service. Each line is explained in collins-service --check.

7. Make ssh work without a prompt, from your laptop ​

Collins runs ssh with BatchMode=yes, so ssh must never need to ask:

bash
ssh-copy-id user@box     # once, if the box doesn't have your key yet
ssh-add                  # your key in the agent (or a key with no passphrase)
ssh user@box true        # accepts the host key into known_hosts; must not prompt

Your ~/.ssh/config applies: a Host alias, User, Port, IdentityFile, ProxyJump through a bastion, a Tailscale name. Collins sets aside only RemoteCommand, RequestTTY and connection sharing.

8. Connect ​

In the window: the app menu → Connect to… → Add ssh connection.

  • Name: what the banner and the list call it.
  • user@host[:port]: user@box, user@box:2222, or a Host alias from your ssh config.

Test runs collins-service --print-socket on the box over ssh, which starts the service, and shows the socket's path, or ssh's own last line when it fails. Add saves it on this computer (nothing is written on the box), and Connect switches the window over: the tabs open here detach (their sessions keep running here), and the sidebar fills with the box's sessions.

The Connections dialog: This computer, a saved ssh connection, and the Add ssh connection form

From a terminal, collins --connect NAME does the same. The window reconnects to the connection you used last at its next launch.

9. Start working on the box ​

The box has no projects yet. Bring one in from the sidebar:

  • Add project → Clone repository… clones it on the box.
  • Open folder… (same menu) picks a folder that already exists there, in Collins' own path picker over the box's filesystem (~ is the box's home, Tab completes, New folder makes one there).

Start sessions as you would locally. Close the laptop, and they keep working; open it, and the window reconnects behind a Reconnecting to <name> banner and redraws every tab from the service's screen.

10. Get told when you are away ​

With no window attached there is nobody to show a card to, so finishes and notify_user calls wait in the bell. To hear about them anyway, put a small script on the box:

bash
#!/bin/sh
# ~/bin/collins-notify: one push per notification, via ntfy.
# --data-raw, not -d: the body is the agent's text, and -d reads a file
# when it starts with @.
curl -s -H "Title: $COLLINS_NOTIFY_TITLE" --data-raw "$COLLINS_NOTIFY_BODY" \
    https://ntfy.sh/your-topic >/dev/null

Make it executable (chmod +x ~/bin/collins-notify) and enter its full path, /home/you/bin/collins-notify, as Notification command (Preferences → Service, while connected to the box): the command runs with no shell, so ~ is not expanded. Send test runs it once. The variables and limits are in Notifications while you are away.

Keeping it up to date ​

Upgrade the package on the box as usual (apt upgrade, dnf upgrade, pipx upgrade collins). A running service keeps its old code until you choose Restart service in the window's main menu while connected to the box. A restart ends no session: the keeper holds every terminal and the new service takes them over. A window and a service a protocol apart still talk; further apart, the window names the side to upgrade.

To start the service at boot rather than at the first connect:

bash
systemctl --user enable collins-service.service

To end every session on the box for good, stop the keeper: systemctl --user stop collins-keeper.service.

Several windows, one server ​

Any number of windows can connect to the same box: your laptop, your desktop, a window on the box's own desktop if it has one. They share the sidebar, the drafts and the notifications. Two windows can show the same session; its terminal takes the size of the one that last typed into it, and the other shows a Sized for <device> banner with Use this size.

When something goes wrong ​

What you seeWhat to do
Test says Permission denied (publickey)Your key is not in the agent (ssh-add) or not on the box (ssh-copy-id).
Test says Host key verification failedssh user@box once by hand and accept the key.
Test says collins-service was not foundIt is not on the login shell's PATH: a pipx install puts it in ~/.local/bin, which pipx ensurepath adds to an rc. Make sure that line is not below an exec or tmux.
The window says Collins needs the Claude Code CLIThe service can't find claude on the box. Run collins-service --check there, fix the claude: line (or point the window at the CLI's path), then Restart service.
Everything is gone after you log out of the boxLingering is off: step 3.
git push fails with Permission denied (publickey) in a sessionThe box has no ssh agent with your key: step 5.
The window says to upgrade one sideWindow and service are more than one protocol apart. Upgrade the side it names. If that was the box, the old service is still running and the window can't ask it to restart, so stop it there (systemctl --user stop collins-service.service; the sessions run on under the keeper) and connect again.

The service's own log is journalctl --user -u collins-service on the box; set COLLINS_LOG=INFO in the unit's environment for more.

Unofficial community tool — not affiliated with or endorsed by Anthropic. Released under GPL-3.0. Forked from agent-session-manager by Máté Molnár.