Skip to content

Wake PC is a tiny self-hosted Wake-On-Lan (WOL) app written in PHP for linux machines that you can use to wake up machines on your local network.

Notifications You must be signed in to change notification settings

TheHrdlicka/wake-pc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fork changes

  • Removed plaintext passwords
  • Ping is now using ping instead of port scan
  • Added form for adding more PCs. Note that it won't work if you don't have any PC in config, so you have to add the first one manually. I'm too lazy to sort that out.
  • Wakeup is done using https://community.chocolatey.org/packages/wakeonlan , since I was testing it on windows... Who knows, maybe it's also available on linux.

Wake PC

Wake PC is a super tiny password protected webapp for linux machines that sends WOL packets, written in PHP.

screenshot

How to set up

Quick setup

You can run this command to run to quickly set up and serve Wake PC on port 9010 using PHP's embedded webserver. This will load a default configuration, so you need to edit config.ini later. For Wake PC to work make sure to follow the instructions for configuring your target machine as well, otherwise it might not work!

sudo sh -c 'curl -s https://raw.githubusercontent.com/szabodanika/wake-pc/master/quicksetup.sh | bash'

Or you can do it manually:

  1. Create a folder in /var/www/ and navigate to it
mkdir /var/www/wake-pc
cd /var/www/wake-pc
  1. Download index.php and config template
wget https://raw.githubusercontent.com/szabodanika/wake-pc/master/index.php
wget https://raw.githubusercontent.com/szabodanika/wake-pc/master/config-template.ini
  1. Copy template
cp config-template.ini config.ini
  1. Edit template using any text editor
sudo vim config.ini
  1. Start embedded PHP webserver or host with your webserver of choice (NGINX, Apache etc.)
php -S 0.0.0.0:9010

Client configuration

For WOL to work it needs ot be enabled on the target PC, by default this is usually not the case. You will likely find this setting in your BIOS.

You also need to make sure that the machine will only be woken up by WOL packets and nothing else, otherwise the initial ping that checks whether the machine is online will also turn it on.

Go in Control Panel\All Control Panel Items\Network Connections, select your connection -> right click -> Properties -> Power Management, tick "Allow this device to wake the computer" and make sure to also tick "Only allow a magic packet to wake the computer".

Planned improvements

  • Remove plaintext passwords HAHA
  • GUI config
  • Scheduling
  • Shutdown and reboot maybe?
  • Toggling pinging on and off

About

Wake PC is a tiny self-hosted Wake-On-Lan (WOL) app written in PHP for linux machines that you can use to wake up machines on your local network.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 96.8%
  • Shell 3.2%