Skip to content

Headless background operation on Linux (systemd user service) #300

Description

@gambtho

What I ran into

I run Vekil on a headless WSL/SSH box — no desktop session — with a few shells plus Claude Code and Codex all sharing one proxy that should come back after a reboot. There's no obvious supported way to do that today:

  • vekil launch <agent> is ephemeral and per-session; the proxy dies with the agent.
  • The tray app needs a graphical session and DBus StatusNotifierItem. docs/menubar.md mentions XDG autostart, which assumes a desktop.
  • The container image and k8s/vekil.yaml are great for deployments, but I want the native binary using the host's own ~/.config/vekil.

Bare vekil is a foreground server, and there's no serve/daemon subcommand (main.go handles login, logout, launch, config, then falls through to server mode). So a long-lived local proxy needs an outside supervisor, and nothing in the docs points at one.

Why it's more than convenience

When the proxy isn't up, clients don't fail — they just talk to the provider directly. Same silent-bypass class as #299. A supervised unit turns "quietly unproxied" into "service failed," which is a much better place to be.

What I had in mind

A contrib/systemd/vekil.service template plus a short docs page. Type=exec, WantedBy=default.target, and a note about loginctl enable-linger so the user manager survives logout. Readiness can key off /readyz exactly the way k8s/vekil.yaml already does with its startup/liveness/readiness probes — same supervision model, just not expressed anywhere for a local Linux session.

I'm running this already (unit, lifecycle helper) and would happily send the unit and docs page as a PR.

Worth having in-tree, or is the tray app's XDG autostart the answer you'd rather point Linux users at? Happy to drop it if it's outside the scope you want to carry.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions