Portainer Templates logo

Portainer Templates

Upsnap Upsnap

Stack

Network

UpSnap is a simple wake on lan app written with SvelteKit, Go, PocketBase and nmap.

Image details

Architecture: amd64, arm64, arm/v7, arm/v6
Image size: 38 MB
User: seriousm4x

Source details

Stars: 6k
Forks: 245
Language: Go
License: MIT
Updated: 20 days ago

Configuration

Type
Compose
Platform
linux
Image
ghcr.io/seriousm4x/upsnap:3
Ports
8290:80
Volumes
/app/pb_data : /portainer/Files/AppData/Config/upsnap
Env vars
TZ=Europe/AthensUPSNAP_SCAN_RANGE=192.168.0.0/24UPSNAP_WEBSITE_TITLE=Custom name
Restart
always
Source

Template by xneo1·Source

Standalone Install

Select an install method, to see config/commands for deploying Upsnap

Installation method

Install on Portainer

Import all app templates into your Portainer instance, for easy 1-click deploys

  1. Ensure both Docker and Portainer are installed, and up-to-date
  2. Log into your Portainer web UI
  3. Under Settings → App Templates, paste the below URL
  4. Head to Home → App Templates, and the list of apps will show up
  5. Select Upsnap, fill in any config options, and hit Deploy

Template Import URL

https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me demo
Original stackfile

The compose file this template deploys, straight from its repo:

services:
  upsnap:
    image: ghcr.io/seriousm4x/upsnap:3
    network_mode: host
    restart: always
    ports:
      - 8290:80
    volumes:
      - /portainer/Files/AppData/Config/upsnap:/app/pb_data
    healthcheck:
      test: wget --no-verbose --tries=1 --spider http://localhost:8290/api/health || exit 1
      interval: 1m
      timeout: 10s
      retries: 3
    environment:
      - TZ=Europe/Athens # Set container timezone for cron schedules
    # - UPSNAP_INTERVAL=@every 10s # Sets the interval in which the devices are pinged
      - UPSNAP_SCAN_RANGE=192.168.0.0/24 # Scan range is used for device discovery on local network
      - UPSNAP_WEBSITE_TITLE=Custom name # Custom website title
    # # you can change the listen ip:port inside the container or install custom packages for shutdown via a custom entrypoint
    # entrypoint: /bin/sh -c "apk update && apk add --no-cache ipmitool && rm -rf /var/cache/apk/* && ./upsnap serve --http 0.0.0.0:8290"

Or deploy it directly from the source:

git clone https://github.com/xneo1/portainer_templates
cd portainer_templates
docker compose -f Template/Stack/upsnap.yml up -d

More install options in our documentation, or see seriousm4x/upsnap for app-specific guidance.

<img src="https://raw.githubusercontent.com/seriousm4x/upsnap/HEAD/frontend/static/gopher.svg" width="150" />

<h2>UpSnap</h2>
<p>A simple wake on lan web app written with SvelteKit, Go and PocketBase.</p>
<div>
    <a target="_blank" href="https://github.com/seriousm4x/upsnap"><img src="https://img.shields.io/github/stars/seriousm4x/UpSnap?style=flat&label=Stars" /></a>
    <a target="_blank" href="https://hub.docker.com/r/seriousm4x/upsnap"><img src="https://img.shields.io/docker/pulls/seriousm4x/upsnap?label=docker%20hub%20pulls" /></a>
    <a target="_blank" href="https://github.com/seriousm4x/UpSnap/releases"><img src="https://img.shields.io/github/downloads/seriousm4x/upsnap/total?label=binary%20downloads" /></a>
</div>
<div>
    <a target="_blank" href="https://github.com/seriousm4x/UpSnap/releases"><img src="https://img.shields.io/github/go-mod/go-version/seriousm4x/UpSnap?filename=backend/go.mod" /></a>
    <a target="_blank" href="https://github.com/seriousm4x/UpSnap/releases"><img src="https://img.shields.io/github/v/release/seriousm4x/upsnap?display_name=tag&label=Latest%20release" /></a>
    <a target="_blank" href="https://github.com/seriousm4x/UpSnap/actions"><img src="https://github.com/seriousm4x/upsnap/actions/workflows/release.yml/badge.svg?event=push" /></a>
    <a target="_blank" href="https://github.com/seriousm4x/UpSnap/commits/master"><img src="https://img.shields.io/github/last-commit/seriousm4x/upsnap" /></a>
</div>

!NOTE

UpSnap is, and always will be, free and open source software.

If someone is asking you to pay money for access to UpSnap binaries, source code, or licenses, you are being scammed.
The official and only trusted source for UpSnap is this repository (and its linked releases). Do not pay third parties for something that is provided here for free.

✨ Features

  • 🚀 One-Click Device Wake-Up Dashboard
  • ⏰ Timed Events via Cron for Automation
  • 🔌 Ping Any Port You Choose
  • 🔍 Discover Devices with Network Scanning (nmap required)
  • ❎️ Shutdown Devices with a Custom Command
  • 👤 Secured User Management
  • 🌐 i18n support for these languages
  • 🎨 35 Themes
  • 🐳 Docker images for amd64, arm64, arm/v7, arm/v6
  • 🏠 Self-Hostable

📸 Screenshots

SilkDim

🚀 Run the binary

Just download the latest binary from the release page and run it.
sudo ./upsnap serve --http=0.0.0.0:8090

To run as non-root (Linux only), refer to the Wiki: Use non-root user
For more options check ./upsnap --help or visit PocketBase documentation.

🐳 Run in Docker

Just pull and run the image: docker run --network=host seriousm4x/upsnap:latest or you can use the docker-compose example. See the comments in the file for customization.
To run as non-root, refer to the Wiki: Use non-root user

Change port (Docker)

If you want to change the port from 8090 to something else, change the following (5000 in this case):
environment:
  - UPSNAP_HTTP_LISTEN=0.0.0.0:5000

❎️ Shutting Down Devices

To shutdown devices, refer to the Wiki: How to use shutdowns

Reverse Proxy

Caddy example
upsnap.example.com {
    reverse_proxy localhost:8090
}

Run in sub path

You can run UpSnap on a different path than /, e.g. /upsnap-sub-path/. To do this in caddy, set the following:
http://localhost:8091 {
    handle /upsnap-sub-path/* {
        uri strip_prefix /upsnap-sub-path
        reverse_proxy localhost:8090
    }
}

Or nginx:
http {
    server {
        listen 8091;
        server_name localhost;
        location /upsnap-sub-path/ {
            proxy_pass http://localhost:8090/;
            proxy_redirect off;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
        }
    }
}

Paths must end with a trailing /.

🐧 Install from the AUR

yay -Sy upsnap-bin

🔒 User permissions

UpSnap offers unique access for each user, per device. While admins have all permissions, they can assign specific rights to users such as displaying/hiding a device, accessing device editing, deleting and powering devices on/off. See the last screenshot in the 📸 Screenshots section.

🌍 Exposing to the open web

Although UpSnap has user authorisation, it is not recommended to expose it to the open web and make it accessible by everyone!
Reason: The shutdown device command is basically a command piped to #sh (possibly as root user). If anyone gains unauthorized access and can abuse this API route in any way, the attacker has access to a (root) shell on your local network.
Recommended: If you need access from outside your network, please use a VPN. Wireguard or OpenVPN is your way to go.

🌐 Help translating

UpSnap is available in the following languages so far:
  • 🇸🇦 Arabic (Saudi Arabia) (ar-SA)
  • 🇧🇬 Bulgarian (Bulgaria) (bg-BG)
  • 🇨🇿 Czech (Czech republic) (cs-CZ)
  • 🇩🇪 German (Germany) (de-DE)
  • 🇬🇷 Greek (Greece) (el-GR)
  • 🇺🇸 English (United States) (en-US)
  • 🇪🇸 Spanish (Spain) (es-ES)
  • 🇫🇷 French (France) (fr-FR)
  • 🇮🇳 Hindi (India) (hi-IN)
  • 🇮🇩 Bahasa (Indonesia) (id-ID)
  • 🇮🇹 Italian (Italy) (it-IT)
  • 🇯🇵 Japanese (Japan) (ja-JP)
  • 🇰🇷 Korean (Republic of Korea) (ko-KR)
  • 🇳🇴 Norwegian (Norway) (nb-NO)
  • 🇳🇱 Dutch (Netherlands) (nl-NL)
  • 🇵🇱 Polish (Poland) (pl-PL)
  • 🇧🇷 Portuguese (Brazil) (pt-BR)
  • 🇵🇹 Portuguese (Portugal) (pt-PT)
  • 🇷🇺 Russian (Russia) (ru-RU)
  • 🇺🇦 Ukrainian (Ukrain) (uk-UA)
  • 🇻🇳 Vietnamese (Vietnam) (vi-VN)
  • 🇨🇳 Chinese (China) (zh-CN)
  • 🇹🇼 Chinese (Taiwan) (zh-TW)

If you want to contribute and help translating, check the wiki: How to add languages

🔧 Help developing

Fork this branch and clone it.
  1. Start backend

cd backend
go mod tidy
go run main.go serve

  1. Start frontend

cd frontend
pnpm i
pnpm run dev

Open up http://localhost:5173/
, create an admin user and add some devices.

🌟 Star History

Star History Chart

Serve Upsnap on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.

Proxying upsnap.example.com to http://upsnap:80

Add this to your Caddyfile

upsnap.example.com {
	reverse_proxy http://upsnap:80
}

Check the logs first

Nine times out of ten the logs tell you exactly what went wrong.

  • In Portainer, go to Containers, click the container, then Logs. Or run docker logs <container>
  • Exit codes help too: 137 means killed, usually out of memory. 126 or 127 means the command inside the image is broken.

Port already in use

If deployment fails with "Bind for 0.0.0.0:8290 failed: port is already allocated", something else on your server is using that port.

  • Find what's using it: sudo ss -tlnp | grep :8290
  • Stop the other service, or pick a different host port. In 8290:80 only the left number is yours to change, the right one belongs to the app.

Running but the page won't load

The container is up but nothing appears in your browser.

  • Use your server's real IP: http://your-server-ip:8290. The 0.0.0.0 link Portainer shows isn't a real address.
  • Give it a minute after first deploy, upsnap can take a while to initialise.
  • Make sure your firewall allows the port, e.g. sudo ufw allow 8290

Permission denied on volumes

If the logs show "permission denied", the app can't write to its data folder on the host.

  • Fix the ownership: sudo chown -R 1000:1000 /portainer/Files/AppData/Config/upsnap

Image won't pull

Test the pull directly on the host: docker pull ghcr.io/seriousm4x/upsnap:3

  • "manifest unknown" means the tag no longer exists.
  • "toomanyrequests" is the Docker Hub rate limit. Log in with docker login to raise it.
  • "no space left on device" means a full disk. Reclaim space with docker system prune

"exec format error"

This means the image was built for a different CPU architecture than your server.

  • This image supports: amd64, arm64, arm/v7, arm/v6
  • Check yours with uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.

Container keeps restarting

The always restart policy relaunches the app after every crash, so the real error can scroll past.

  • Check the logs right after a restart, the last few lines before it died are the useful ones.
  • Get the exit code with docker inspect <container> --format '{{.State.ExitCode}}'
  • Still stuck? Redeploy once with the restart policy set to no so the failure stays visible.

Stack won't deploy

Compose stacks fail fast on small mistakes, and Portainer shows the reason just above the editor.

  • YAML only accepts spaces for indentation, a single tab breaks the whole file.

Raise an issue

Found something which isn't working as it should? Here's how to report it.

A Compose stack

Upsnap is a Compose stack, a set of containers defined in one file and brought up together by Portainer, then started and stopped as a single app.

The app image

An image is the app packed up ready to go, everything Upsnap needs bundled into one download. This template pulls ghcr.io/seriousm4x/upsnap:3, which Docker fetches once (about 38 MB) and then starts your own copy from.

Where the image comes from

Docker pulls its images from registries, public libraries of ready-built apps. Upsnap's comes from the GitHub Container Registry, published by seriousm4x.

Version tags

The bit after the colon in the image name is the version tag. This one pins 3, so every redeploy gives you that exact build until you bump it yourself.

Which machines it runs on

Every image is built for particular CPU types. This one ships for amd64, arm64, arm/v7, arm/v6, so it runs on both regular x86 servers and ARM boards like a Raspberry Pi.

Ports

A port is the door the app answers on. A mapping like 8290:80 means it's reachable on port 8290 of your server, where the left number is yours to change and the right one belongs to the app. Once it's running, open http://your-server-ip:8290 in a browser. It opens:

  • 8290:80, likely the web interface

Volumes

A volume is where Upsnap keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:

  • /app/pb_data from /portainer/Files/AppData/Config/upsnap on the host

Environment variables

Environment variables are the settings you hand over when you deploy, things like a password or a timezone. Upsnap takes 3 of them, all with defaults you can leave alone or tweak:

  • TZ, defaults to Europe/Athens
  • UPSNAP_SCAN_RANGE, defaults to 192.168.0.0/24
  • UPSNAP_WEBSITE_TITLE, defaults to Custom name

Restart policy

The restart policy here is always, so Docker brings Upsnap back up after a crash and again when the server reboots. Good for anything you want running around the clock. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).

Health check

A health check is how Docker tells whether Upsnap is really working, not just switched on. It runs wget --no-verbose --tries=1 --spider http://localhost:8290/api/health || exit 1 every 1m and flags the container as unhealthy if that keeps failing.

Networking

Nothing custom is set, so Upsnap sits on Docker's default bridge network: its own private space that reaches the outside world only through the ports it publishes.

Container name

Once it's deployed, Portainer names the container upsnap. That's what you'll spot in the containers list and use in commands like docker logs upsnap.

Platform

The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.

Open source license

Upsnap is open source, released under the MIT license. In plain terms the code is out in the open, so you're free to run it and change it to fit what you need.

Portainer app templates

Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set Upsnap up. Add the template list to Portainer once, then deploying Upsnap is a click rather than a wall of config.