Daemon on a server

Run Kettu without a desktop on a server or development machine, installed with one command and started with the system, then pair your devices and update it with kettu update.

The daemon is Kettu without its window: the same hosts that run your agents and sessions, for a server or a development machine you reach over SSH. Your other devices connect to it as they connect to the desktop app, straight over your own network, end-to-end encrypted, and the daemon serves the web client itself.

It runs on Linux, x64 or Arm with glibc 2.28 or later, such as Ubuntu 20.04, Debian 10, RHEL 8 and newer, and on Macs with Apple silicon. Alpine and other systems built on musl, and Windows, are not supported yet.

Install

curl -fsSL https://kettu.sh/install | sh

You can open the script and read it first. It:

  • downloads the package for your system from the latest release, and installs nothing if it does not match the release’s checksum;
  • unpacks it into ~/.local/share/kettu/versions/<version>, with its own Node.js, so the machine needs none;
  • links ~/.local/bin/kettu to it, without root. When ~/.local/bin is not on your PATH, it prints the line to add to your shell’s profile and leaves your files alone;
  • sets up the daemon as a service that starts with the system: a systemd user service on Linux, with linger turned on so it keeps running after you log out, and a LaunchAgent on macOS.

Options go after sh -s --:

curl -fsSL https://kettu.sh/install | sh -s -- --version 0.1.0 --no-service
OptionWhat it does
--version <version>Installs that release instead of the latest
--no-serviceSets up no service, as in a container; start the daemon with kettu run

On macOS

launchd runs the service only while you are logged in at the Mac’s desktop. If you reach the Mac over SSH alone, log in at its desktop once, or turn on automatic login, then run kettu service install.

Connect your devices

kettu pair shows a code to scan with a phone and a link for a browser, then asks you to confirm the device that answers. Over SSH, it also prints the port forward to run on your own computer and the link to open there. The code expires after five minutes. Paired devices connect to the port and addresses kettu direct shows, on the same network or over a VPN such as Tailscale; see Remote access for the ways in.

Commands

CommandWhat it does
kettu statusWhether the daemon runs, with its hosts, connected devices and port
kettu pairAdds a device
kettu devicesLists the paired devices; kettu devices remove <id> removes one
kettu directShows the port and addresses; direct port, direct add and direct remove change them
kettu terminal on, kettu terminal offLets devices use this machine’s terminal, or stops them
kettu service install, kettu service uninstallSets up the service, or stops and removes it
kettu updateMoves to the latest release
kettu runRuns the daemon in the foreground instead of the service

kettu --help lists them with every option.

Update

kettu update looks up the latest release and, when it is newer, installs it as the install command does: checked against its checksum, linked from ~/.local/bin/kettu, with the service pointed at it and restarted. The version before stays in ~/.local/share/kettu/versions so you can go back to it; older ones are removed.

Uninstall

kettu service uninstall
rm -rf ~/.local/share/kettu/versions ~/.local/bin/kettu

The daemon’s data, its identity, paired devices and sessions, stays behind: in ~/.local/share/kettu on Linux and ~/Library/Application Support/Kettu Daemon on macOS. Remove that folder too to forget them.