Skip to content

A neat helper that manages the standby state of unix hosts with Wake-On-Lan configured, with Web-GUI.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

9SMTM6/shuthost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

ShutHost ShutHost

License: MIT OR Apache-2.0 Status GitHub Actions Workflow Status GitHub Actions Workflow Status

A neat helper that manages the standby state of unix hosts with Wake-On-Lan (WOL) configured, with Web-GUI.

Note: LARGE parts of this project were LLM generated. None were blindly committed, but it is what it is.

Live demo: PWA controlling NAS aka old PC (2x speed)

played at 2x speed, using the WebUI installed as PWA

⚠️ Note: the short demo clip shown above is slightly out of date with respect to theming and layout. Check the live demo or screenshots below for the current UI.

🌐 Live Demo

You can try a demo of the ShutHost WebUI (no backend, simulated data) via GitHub Pages:

This demo runs entirely in your browser and does not control any real hosts. It is useful for previewing the UI and features without installing anything. Note that the theme (light/dark) is selected based on your system preference.


✨ Features

  • Manage standby state of Unix hosts with Wake-On-Lan (WOL) and lightweight agents
  • Web-based GUI for easy management
    • Light/Dark theme are selected based on system preference (with CSS media queries)
    • installable as PWA
      • this allows behavior similar to an native app on e.g. Android
  • API for machine-to-machine control (e.g. backups)
  • Should support extension (e.g. Home Assistant)
  • Docker and simple binary deployment options (Docker has some strict requirements though)
  • Convenience scripts for simple agent/client installation
  • An attempt at extensive documentation

πŸ“š Documentation & Resources

Extended documentation, examples, and additional resources to help you get the most out of ShutHost:


πŸ’Ώ Installation

Choose either the binary (recommended for reliability and WOL support) or the container (Linux only) installation.

Binary (recommended)

  • Download the latest release from: https://github.com/9SMTM6/shuthost/releases/latest
    uname -m
    # Possible outputs: x86_64 => Intel/AMD, aarch64 => ARM/Apple Silicon
    # Linux on Intel/AMD
    curl -L -o shuthost_coordinator "https://github.com/9SMTM6/shuthost/releases/latest/download/shuthost_coordinator-x86_64-unknown-linux-musl"
    # There are also gnu binaries available, but the musl variants have wider compatibility for users that dont know which version of libc they have.
    # Linux on ARM
    curl -L -o shuthost_coordinator "https://github.com/9SMTM6/shuthost/releases/latest/download/shuthost_coordinator-aarch64-unknown-linux-musl"
    # macOS on Apple Silicon
    curl -L -o shuthost_coordinator "https://github.com/9SMTM6/shuthost/releases/latest/download/shuthost_coordinator-aarch64-apple-darwin"
    # macOS on Intel
    curl -L -o shuthost_coordinator "https://github.com/9SMTM6/shuthost/releases/latest/download/shuthost_coordinator-x86_64-apple-darwin"
    # Make the binary executable
    chmod +x shuthost_coordinator
    # Optionally verify the checksum with the one provided on the releases page
    shasum -a 256 shuthost_coordinator
  • Install as a system service (binary supports systemd/openrc/launchd)
    # Run the installer (installs binary, creates a config with restrictive permissions and enables start-on-boot)
    sudo ./shuthost_coordinator install #<optional user>
    # Remove the binary (it'll have been copied to the appropriate location by the installer)
    rm shuthost_coordinator
    # Access the WebUI at http://localhost:8080
  • Notes:
    • The installer infers the target user from SUDO_USER if you run under sudo, otherwise the user is required to be specified.
    • The installer will create service units for systemd or openrc where appropriate and set config file ownership/permissions.

Docker (Linux only)

  • Download the example_config.toml and docker-compose.yml from Github and run the service:
    # Create config directory and download the example config from GitHub
    mkdir -p coordinator_config data
    curl -L -o coordinator_config/coordinator_config.toml \
      https://raw.githubusercontent.com/9SMTM6/shuthost/main/docs/examples/example_config.toml
    
    # Set restrictive permissions (readable/writable by owner only)
    chmod 600 coordinator_config/coordinator_config.toml
    # Download the docker-compose file
    curl -L -o docker-compose.yml \
      https://raw.githubusercontent.com/9SMTM6/shuthost/main/docs/examples/docker-compose.yml
    
    # Run the service in the background
    docker-compose up -d shuthost
    
    # Access the WebUI at http://localhost:8080
  • Notes:
    • Uses network_mode: host to reach the hosts with the Wake-on-LAN packet. This setting is Linux-only and will not work properly on Docker Desktop for Mac/Windows. Use the binary on Mac or run on a Linux VM with bridged networking on Mac or Windows.

Agent / Client installation

  • To install a host-agent (controls the hosts): open the web UI, open "Install Host Agent" and follow the instructions shown.
  • To install a client (M2M, e.g., backup scripts): switch to the Clients tab, open "Install Client" and follow the instructions shown.

πŸ“· UI screenshots

More screenshots can be found in the frontend/tests/visual-regression.spec.ts-snapshots and the frontend/tests/mobile-navigation.spec.ts-snapshots folders. These are generated or validated automatically as part of the test suite, and thus are guaranteed to be up-to-date (if the tests pass).

Hosts β€” desktop dark Hosts β€” mobile dark
Hosts expanded β€” desktop light Hosts expanded β€” mobile dark

πŸš€ Potential Future Features

🎯 Core Features

  • πŸ”Œ Custom Wakers: Support for alternative wake mechanisms beyond WOL, such as smart plugs or custom scripts (e.g., via API integrations). This would allow hosts without WOL support to be managed through external devices or services.
  • πŸ”” Notifications about host state changes through the PWA
  • πŸ“Š Host state tracking for statistics

πŸ–₯️ Platform Support

  • 🐑 BSD support might happen
    • ⚠️ Requires using more advanced cross compilation
    • I have no ability to test these practically myself.

πŸ”§ Management Features

  • πŸ—‘οΈ Uninstalls
  • πŸ“ Self-registration endpoint for host agents
    • ❓ Unclear how to deal with authorization:
      • Server secret?