Visitar URL original
Daemon exits on runners without systemd when the client is preinstalled: /run/twingate is never created · Issue #101 · Twingate/github-action · GitHub
Skip to content

Daemon exits on runners without systemd when the client is preinstalled: /run/twingate is never created #101

Open

Description

@arthur-leclerc

On a runner without systemd, twingate setup --headless succeeds, then every twingate start prints Failed to start twingated. Status stays not-running, the retry loop runs out of attempts, and the step fails with Twingate service failed to connect. The daemon writes nothing to /var/log/twingated.log.

Environment

Item Value
Action twingate/github-action@v1 (358e205, v1.11)
Client 2026.239.6882 (amd64), preinstalled in the runner image
OS Ubuntu 24.04.5 LTS, x86_64, kernel 6.12
Runner Depot CI depot-ubuntu-24.04 (microVM, PID 1 is init, no systemd)
Capabilities /dev/net/tun present, full capabilities under sudo

Cause

Without systemd, twingate start runs twingate-classic service-start, which forks the daemon. The daemon tries to create its pid file, gets ENOENT because /run/twingate does not exist, and exits with code 1 before logging anything. strace -f on twingate start:

1734  openat(AT_FDCWD, "/run/twingate/twingated.pid", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = -1 ENOENT (No such file or directory)
1734  write(12, "\0\0\0\2NOEX", 8) = 8
1734  exit_group(1) = ?

On a systemd host, RuntimeDirectory=twingate in twingate.service creates /run/twingate. On this runner nothing else creates it: there is no tmpfiles.d entry, and the package postinst only creates /var/lib/twingate.

Why it started now

The runner image used to ship an older client (2026.160), which the action upgraded during the job, and the job connected. Since the image ships 2026.239.6882, the action finds the latest version already installed and installs nothing. We assume the in-job upgrade used to create /run/twingate as a side effect, but we have not checked the package contents.

Workaround

Creating the directory before the action brings the client online on the first attempt:

- run: sudo mkdir -p /run/twingate
- uses: twingate/github-action@v1
  with:
    service-key: ${{ secrets.TWINGATE_SERVICE_KEY }}

Suggested fix

When the daemon starts without systemd, the client could create its runtime directory (mode 0755, as RuntimeDirectoryMode does) before it forks. Until then, the action could run $SUDO mkdir -p /run/twingate before twingate start on Linux. It already has a separate path for runners without systemd when it reads logs.

Activity

  1. linear-code commented on Oct 22, 2026

    @linear-code
  2. self-assigned this
    on Oct 22, 2026
  3. alexprivalov commented on Oct 22, 2026

    @alexprivalov
    Contributor

    resolved internally, will be resolved new client release soon

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions