Skip to content

junex/gptwol

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

114 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPTWOL a simple Wake/Sleep On Lan docker GUI


Docker Pulls GitHub Release GitHub last commit MIT Licensed

GPTWOL is a simple and lightweight Wake/Sleep on Lan gui made with python to wake up and shutdown your computers on your LAN.

Screenshot

Light Web Dark Web
Light Mobile Dark Mobile

Features

  • Docker Image to deploy
  • Send Wake On Lan packets to wake up computers
  • Send Sleep On Lan packets to shutdown computers
  • Add or Delete Computer
  • Computers status check with ping, arp or tcp request (timeout settings available)
  • ARP-SCAN to add computers
  • Very low power usage (20 mb RAM)
  • Check if IP and MAC provided are valid
  • cron job to wake up device
  • Check if Cron provided is valid
  • Search on computer Name, MAC or IP
  • Dark mode
  • Authentication (disable by default)

Special configuration you can change

  • Ping Refresh to check Status availability
  • Disable Delete or Add Computers
  • Change the port of the Web UI
  • Enable authentication

Docker Configuration

Note

It's recommended to use docker compose to run this application. Install documentation

Caution

  • The app container needs to run in host network mode to send the wakeonlan command on your local network.
  • Make sure that the PORT you are using is free on your host computer
  • Make sure that BIOS settings and remote OS is configure to allow Wake On Lan
  • Don't expose gptwol directly on internet without proper authentication

With docker compose

Create docker-compose.yml file:

services:
  gptwol:
    container_name: gptwol
    image: misterbabou/gptwol:latest
    network_mode: host
    restart: unless-stopped
    environment:
      - PORT=5000 #Free Port on Your host; default is 5000
      - TZ=Europe/Paris #Set your timezone for Cron; default is UTC
      #- ENABLE_LOGIN=false # Enable or disable login; You would be able to access with USERNAME and PASSWORD; default is false
      #- USERNAME=admin # Set a username; default is admin
      #- PASSWORD=admin # Set a password; default is admin
      #- SCRIPT_NAME=/my-app # Uncomment this line to run the app under a prefix; default is not set
      #- ENABLE_ADD_DEL=true # Enable or disable ADD computer and Delete computer buttons; default is true
      #- ENABLE_REFRESH=true # Enable or disable automatic status refresh; default is true
      #- REFRESH_INTERVAL=30 # Uncomment to change status check for icmp, arp or tcp, can be 15, 30 or 60 (seconds); default value is 30 seconds
      #- PING_TIMEOUT=300 #Uncomment to change the time to wait for a ping answer in (in ms); default value is 300 milliseconds
      #- ARP_INTERFACE=eth0 #Uncomment this line to set an arp interface manually for scan and test; default is not set
      #- ARP_TIMEOUT=300 #Uncomment to change the time to wait for a arp answer in (in ms); default value is 300 milliseconds
      #- TCP_TIMEOUT=1 #Uncomment to change the time to wait for a tcp check (in s);  default value 1 second
    volumes:
      - ./appdata/db:/app/db
      - ./appdata/cron:/etc/cron.d

Run the application

docker compose up -d

With docker

Run the application

docker run -d \
  --name=gptwol \
  --network="host" \
  --restart unless-stopped \
  -e PORT=5000 \
  -e TZ=Europe/Paris \
  -v ./appdata/db:/app/db \
  -v ./appdata/cron:/etc/cron.d \
  misterbabou/gptwol:latest

Configure Sleep on Lan

  • Check the Sleep on Lan Github repo to download and configure
  • GPTWOL send a reverse MAC wakeonlan packet on port 9 to shutdown your computer (you don't need to configure API)

Here is an example of a wol.json to shutdown a Debian based computer

{
    "Listeners": [
        "UDP:9"
    ],
    "LogLevel": "INFO",
    "Commands": [
        {
            "Operation": "shutdown",
            "Command": "poweroff",
            "Default": true
        }
    ]
}

Roadmap

✔️ Add ARM version (Added in 1.0.1)

✔️ Add feature to plan automatic Wake on Lan (Cron) (Added in 1.0.3)

✔️ Add Search feature (Added in 1.0.4)

✔️ Remove Cron on Computer deletion (Added in 1.0.4)

✔️ Improve load page performance due to ping timeout. (added in 1.0.5)

✔️ Add a TCP port option to check availability without using ICMP (added in 2.0.1)

✔️ Run app on subpath (added in 2.1.0)

✔️ Make app responsive for smaller screen (added in 2.1.0)

✔️ Add Dark Mode Switch (added in 2.1.3)

✔️ move computers.txt in an other directory not to mount a file but a directory to the docker container (added in 4.0.0)

✔️ Shutdown computers with Sleep on LAN (added in 4.1.0)

✔️ Add optional simple authentication (added in 4.2.0)

✔️ Add ARP SCAN to add you computer of for availability check (added in 5.0.0)

✔️ Add Sort button to sort computer by Name, IP or MAC (added in 5.2.0)

Questions

Will OIDC be implemented?

OIDC Authentication will not be implemented but you can add it for instance by using:

Is there a GUI to configure automatic wakeup and shutdown?

Automatic shutdown and wakeup are made in the GUI using cron syntax. As I want to keep the application simple, I will not implement a GUI with a calendar, month an days. You can check this link to help you build your cron.

About

Simple Wake/Sleep On LAN Docker GUI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • HTML 46.6%
  • Python 34.9%
  • JavaScript 16.6%
  • Other 1.9%