UpSnap Documentation

A simple wake on lan web app written with SvelteKit, Go and PocketBase.

5,790 stars Go Go 1 file ยท ~1,724 tokens #golang#pocketbase#sveltekit#wakeonlan#wol
RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy UpSnap on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name upsnap --restart always seriousm4x/upsnap:latest
Configured Services & Ports
โš™๏ธ upsnap
image: build locally
docker-compose.yml
yaml (docker-compose.yml)
services:
  upsnap:
    cap_add:
      - NET_RAW # Required for privileged ping, network device scan, and IP address tracking (nmap)
    cap_drop:
      - ALL
    container_name: upsnap
    build:
      dockerfile: Dockerfile.dev
    network_mode: host
    restart: unless-stopped
    volumes:
      - ./data:/app/pb_data
    # # If you want to use FQDN instead of an IP and it is a ".local" domain, avahi and dbus must be installed on 
    # # the host, and the host dbus must be mounted in the container.
    # # Before uncommmenting, ensure you are familiar with potential security implications of mounting dbus
    #   - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
    # # To use a non-root user, create the mountpoint first before starting
    # # the container (mkdir data) so that it has the right permissions.
    # user: 1000:1000
    # environment:
    #   - TZ=Europe/Berlin # Set container timezone for cron schedules
    #   - UPSNAP_HTTP_LISTEN=127.0.0.1:8090
    #   - UPSNAP_INTERVAL=*/10 * * * * * # Sets the interval in which the devices are pinged
    #   - UPSNAP_LOG_LEVEL=INFO # Console level for UpSnap logs: DEBUG, INFO, WARN, ERROR, or OFF
    #   - UPSNAP_SCAN_RANGE=192.168.1.0/24 # Scan range is used for device discovery on local network
    #   - UPSNAP_WEBSITE_TITLE=Custom name # Custom website title
    # # dns is used for name resolution during network scan
    # dns:
    #   - 192.18.0.1
    #   - 192.18.0.2
    # # you can change the listen ip:port inside the container like this:
    # entrypoint: /bin/sh -c "./upsnap serve --http 0.0.0.0:5000"
    # healthcheck:
    #   test: curl -fs "http://localhost:5000/api/health" || exit 1
    #   interval: 10s
    # # or install custom packages for shutdown
    # entrypoint: /bin/sh -c "apk update && apk add --no-cache  && rm -rf /var/cache/apk/* && ./upsnap serve"

File: README.md




[!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

Silk Dim

๐Ÿš€ Run the binary

Just download the latest binary from the release page and run it.

bash
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):

yml
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

text
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:

text
http://localhost:8091 {
    handle /upsnap-sub-path/* {
        uri strip_prefix /upsnap-sub-path
        reverse_proxy localhost:8090
    }
}

Or nginx:

text
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](https://aur.archlinux.org/packages/upsnap-bin)

bash
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
bash
cd backend
go mod tidy
go run main.go serve
  1. Start frontend
bash
cd frontend
pnpm i
pnpm run dev

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

๐ŸŒŸ Star History


File: frontend/README.md

create-svelte

Everything you need to build a Svelte project, powered by create-svelte.

Creating a project

If you're seeing this, you've probably already done this step. Congrats!

bash
# create a new project in the current directory
npm create svelte@latest

# create a new project in my-app
npm create svelte@latest my-app

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Building

To create a production version of your app:

bash
npm run build

You can preview the production build with npm run preview.

To deploy your app, you may need to install an adapter for your target environment.