Sessions on a server

Run agents on another machine (a build box, a cloud VM, a beefy desktop) and work with them right beside your local sessions. They run on the server, in its folders, and keep running when LlamaTree closes or the connection drops.

What you need

Session tiles with build-box and gpu-rig server badges, one showing Can't reach gpu-rig
payments-refactor runs on build-box; gpu-rig is offline, so its session says it can't be reached.

Adding a session on a server

In New Session, Computer picks where the session runs: this computer, or a server, entered as any of:

The New session dialog with Computer set to dev@build-box and a folder on the server

The server's sessions show with your local ones, in your projects, with the server's name on their tile and a link mark on their tab. Typing, Git, diffs, Browse…, opening files and pasting pictures all work as for a local session, on that server. Once LlamaTree has connected to a server, every session that server's LlamaTree has shows here too.

While the server is connected, its sessions' panels show here, and they can message your local sessions and be messaged by them, with the same permissions.

Installing LlamaTree on the server

When a server doesn't have LlamaTree, its sessions' badge and menu say so, as does adding a session there, each with Install LlamaTree on <server>…. Once you say yes, the server runs the install script from the latest release over SSH: the package, with sudo, when that needs no password; otherwise a copy for your account that updates itself. Then LlamaTree connects again.

If the server's sudo wants a password, LlamaTree shows you the command to run there yourself. It checks the package's SHA-256 before installing. Or install it by hand, as on any Linux machine:

curl -fsSL https://github.com/LlamachantTechnology/LlamaTree/releases/latest/download/install.sh | sh

It keeps running

The sessions belong to a LlamaTree session host on the server, not to your window. Close LlamaTree, put your laptop to sleep or lose Wi-Fi, and they carry on. Meanwhile the tile says Can't reach the server and LlamaTree keeps trying; click the server's name to try again now.

If the server ends your processes when you log out (systemd's KillUserProcesses), run loginctl enable-linger there once, or the sessions end with the connection.

The server's files

A server in a window of its own

To keep a server's sessions apart from yours, open a window for just that server from a terminal:

llamatree --remote user@server

That opens a window for just that server's sessions. It reconnects by itself when the connection comes back.

How it works

LlamaTree runs ssh -T -o BatchMode=yes <server> llamatree --attach and talks to the server's session host over that connection, the same way your window talks to your own. Nothing listens on a network port, so there's nothing to open in a firewall. When SSH drops, only that connection ends; the sessions don't.

A server can't take over this computer: files it sends are accepted only when you asked to open something, its plugins get ids of their own, and there are limits on how much it can send. To use a different ssh program, set LLAMATREE_SSH; to run something other than llamatree --attach on the server, set LLAMATREE_REMOTE_COMMAND.