Skip to content

thirdshift console install #828

Closed
Closed

Description

@JacobStephens2

Parent

#776

What to build

thirdshift console install sees whether Caddy or Apache is running and prints one script to run with sudo. The script:

  1. writes a system service that runs thirdshift console as the owner, restarting it if it stops;
  2. writes the proxy's site file for the configured address:
    • Caddy: a file in its sites folder that reverse-proxies with flushing turned off;
    • Apache: a port-80 virtual host that proxies with flushpackets=on and gzip off on the stream paths, preserving the host and setting the forwarded protocol;
  3. for Apache, runs certbot --apache -d <address>;
  4. enables the service, then restarts the proxy. For Caddy that's a restart, not a reload, which would break HTTP/3 on Android.

With neither proxy, it prints the service and how to reach the Console over an SSH tunnel. The README gains a section for nginx. thirdshift itself never runs as root, and nothing outside this command assumes systemd.

Acceptance criteria

  • With a fake caddy on PATH, the Caddy script is printed; with a fake apache2ctl, the Apache script with certbot; with neither, the tunnel instructions.
  • The service runs as the owner, and the site file uses the [console] address and port.
  • The README has the nginx section.
  • Tested through the binary.
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

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions