Wake on LAN (WOL) for Ubuntu 20
dito Proxmox but with orhter path for ethtool:

nano /etc/systemd/system/wol.service

[Unit]
Description=Wake-on-LAN for <interface id>
Requires=network.target
After=network.target
[Service]
ExecStart=/sbin/ethtool -s <interface id> wol g
ExecStop=/sbin/ethtool -s <interface id> wol g
[Install]
WantedBy=multi-user.target

systemctl start wol.service
systemctl enable wol.service
systemctl is-enabled wol.service
systemctl daemon-reload

Wake on LAN (WOL) for Ubuntu 18 (Bionic)

On a server without GUI = with “Netplan” and without “Network-manager”
https://askubuntu.com/questions/1053302/wake-on-lan-not-working-if-i-turn-of-with-ubuntu

Send a Magic Packet at startup for Ubuntu 20
Useful to wakeup a server when the client starts.

$ sudo nano /etc/systemd/system/wol-omv.service
[Unit]
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/local/bin/wol-omv.sh
[Install]
WantedBy=default.target

sudo nano /usr/local/bin/wol-omv.sh
#!/bin/bash
/usr/sbin/etherwake -i enp34s0 69:70:BC:AD:4B:A2 ///// use your correct interface name and the correct mac address!!

sudo chmod 744 /usr/local/bin/wol-omv.sh
sudo chmod 664 /etc/systemd/system/wol-omv.service

systemctl start wol-omv.service
systemctl enable wol-omv.service
systemctl daemon-reload