Crates.io | powe_rs |
lib.rs | powe_rs |
version | 0.2.1 |
created_at | 2025-05-01 07:38:18.366425+00 |
updated_at | 2025-05-12 09:26:03.961638+00 |
description | A simple web server to power off or reboot the host machine |
homepage | https://github.com/omid/powe_rs |
repository | https://github.com/omid/powe_rs |
max_upload_size | |
id | 1655955 |
size | 1,579,143 |
A simple web UI to power off or reboot your Linux machine in 5-4-3-2-1 seconds, by default on port 54321 — because, obviously.
Security Warning:
Choose one of these ways
Go to https://github.com/omid/powe_rs/releases/latest and choose the amd64 or aarch64 version, based on your CPU architecture, and download the file.
Ensure you have Git and Cargo installed.
Then run the following command:
cargo build --release
Just run this:
sudo powe_rs install
It will install the service on the default port, 54321. Then you can open http://127.0.0.1:54321 or use your machine's IP address.
Or if you want to listen to a custom ip and/or port, you can pass them like below:
sudo powe_rs install -l 127.0.0.1:8080
sudo powe_rs install -l 8080
The command above will also install the binary on your system. After that, you can run the command manually as shown below:
powe_rs serve
Or
powe_rs serve -l 127.0.0.1:8080
powe_rs serve -l 8080
You can set the DRY=true
environment variable to test the script without actually running the commands.
DRY=true powe_rs serve
To remove the systemd service:
sudo powe_rs uninstall
To also remove the installed binary:
sudo powe_rs uninstall -a
You can always see the help message with:
powe_rs -h
Note:
This project was written about 80-90% by AI. The main motivation was my personal need to easily and remotely turn off my Raspberry Pi.
MIT