Skip to content

CodeShellDev/wol-ve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WoL VE

🖥️ Start VMs and LXCs · HTTP & WebSocket API · Multi-Platform


WoL VE is a lightweight Go program exposing an HTTP and WebSocket API for starting virtual environments such as virtual machines and LXC containers.

Use standalone or together with
WoL-Redirect for a web-based UI.

Installation

Download the latest binary from the Releases page, mark it executable, and run:

chmod +x wol-ve
./wol-ve

Important

If you get this error: Error pinging HOST: socket: permission denied then you might need to run the binary with privileges.

Usage

Start a VM or LXC instance by sending a POST request to /wake.
Example: start an instance with ID 100:

curl -X POST "http://wol-ve:9999/wake" \
     -H "Content-Type: application/json" \
     -d '{
           "id": "100",
           "ip": "192.168.1.1",
           "startupTime": 5
         }'

Note

  • startupTime is optional.
  • If startupTime is supplied, it acts as a maximum wait time while still allowing the ping-based readiness check.
  • If startupTime is omitted, readiness depends entirely on the ping logic using PING_INTERVAL and PING_RETRIES.
  • ip is optional and is only needed if ping-based readiness should be used.

WebSocket Updates

The /wake endpoint returns a client_id.
Use it to open a WebSocket connection:

ws://wol-ve:9999/ws

The WebSocket sends structured updates during the startup sequence:

  • success: true when the process completes
  • error: true if startup fails
  • message: descriptive status or error details

Configuration

PING_INTERVAL

Interval in seconds for pinging when startupTime is not provided.

PING_RETRIES

Number of retries for pinging when startupTime is not provided before timing out.

Contributing

Have suggestions or improvements? Feel free to open an issue or submit a Pull Request.

License

This project is licensed under the MIT License.

About

WoL HTTP / Websocket Programm for waking virtual hosts

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages