UpSnap (WOL)
Link to GitHub or Website
A simple wake on lan web app written with SvelteKit, Go and PocketBase.
WOL Script
I think this is a niche tool but I thought I would share it. ChatGPT wrote the script a year or 2 ago for me and I've been running it as a CRON job on the machine hosting UpSnap. I've moved it to a docker container so its easier to replicate in the future This script will wait x minutes, then send WOL packets to everything in UpSnap.
This app is hosted on Linguine as a docker container. Refer to CyberPower PowerPanel & UPS for more info
This stack is made up of 3 containers,
UpSnap
UpSnap-WOLScript
https://github.com/trentnbauer/agg/blob/main/docker-compose/upsnap-wol.yml
version: "3"
services:
app:
image: ghcr.io/seriousm4x/upsnap:5.2.4@sha256:cbeafcff280d9db36aba467abc2b6110cd8de1e83e7a9d2d6a8e864511ba36e1
network_mode: host
restart: unless-stopped
volumes:
- app:/app/pb_data
environment:
- TZ=${TZ:-Australia/Melbourne}
- UPSNAP_INTERVAL=@every 10s # Sets the interval in which the devices are pinged
- UPSNAP_SCAN_RANGE=${RANGE:-192.168.0.1/24} # Scan range is used for device discovery on local network
- UPSNAP_WEBSITE_TITLE=${WEBSITE_TITLE:-Up Snap} # Custom website title
- UPSNAP_PING_PRIVILEGED=${PING_PRIVILEGED:-true}
logging:
driver: "json-file"
options:
max-size: "15m"
max-file: "3"
labels:
- dockflare.enable=${CFTUNNEL:-true}
- dockflare.0.hostname=${CFSUBDOMAIN}${CFDOMAIN}
- dockflare.0.service=http://${HOSTNAME:-localhost}:8090
- dockflare.0.access.policy=${CFPOLICY:-default_tld}
- dockflare.0.zonename=${CFDOMAIN}
- dockflare.0.path=${CFURLPATH:-}
- autoheal=true
autowol:
image: ghcr.io/trentnbauer/upsnap-autowol:0.1.10
restart: always
network_mode: host
environment:
- UPSNAP_URL=${UPSNAPURL:-http://localhost:8090}
- UPSNAP_USERNAME=${USERNAME}
- UPSNAP_PASSWORD=${PASSWORD}
- UPSNAP_DELAY=${DELAY:-15} # Time in minutes to wait before sending WOL packets
healthcheck:
# Tries to reach UPSNAP_URL. If variable is unset, defaults to localhost:8090.
test: ["CMD-SHELL", "curl -f ${UPSNAP_URL:-http://localhost:8090} || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
app:
Port
Purpose
8090
WebUI
Host Volume
Container Volume
Purpose
wol-upsnap_app
/app/pb_data
Data
Last updated
Was this helpful?