Skip to content

Offline gym log for Android. No account, no ads, no internet.

Self-host on Proxmox, Unraid and NAS panels, installers ask who will use it

InlitXd555a727fb1e
diff --git a/SELFHOST.md b/SELFHOST.md
index 1cd3e70..d77701b 100644
--- a/SELFHOST.md
+++ b/SELFHOST.md
@@ -1,61 +1,148 @@
-# Self-hosting GymMane
+<div align="center">
-The whole GymMane app also runs in the browser, served from your own machine: a home server, a
-NAS, a Raspberry Pi or your laptop. Same design, same features, laid out for a big screen. Your data
-stays in one folder on that machine. No account, no cloud, nothing leaves your network.
+# GymMane on your own server
-The phone app does not change: it still has no internet permission at all. If you want the phone and
-the server to share data, they do it through a folder you sync with Syncthing (see below).
+The whole app in any browser at home, laid out for a big screen.<br/>
+Your data stays in one folder on your machine. No account, no cloud.
-## Install with the guided script
+<img src="docs/screenshots/devices.png" alt="GymMane on a computer, a phone and a watch" width="820">
-**Linux, a VPS or a Raspberry Pi** (also macOS):
+</div>
+
+## How it works
+
+1. **Install it** on a machine that stays on: a NAS, a home server, a Raspberry Pi or your PC.
+2. **Open the address** it gives you, like `http://192.168.1.20:8080`, from any browser at home.
+3. **Optional:** share data with the GymMane phone app through Syncthing ([how](#phone-app)).
+
+The phone app stays exactly as it is, with no internet permission at all.
+
+## Pick your setup
+
+| | You have | How | Time |
+|:-:|---|---|:-:|
+| <img src="docs/selfhost/linux.svg" width="26"> <img src="docs/selfhost/raspberrypi.svg" width="26"> <img src="docs/selfhost/apple.svg" width="26"> | Linux, Raspberry Pi 4/5, a VPS or a Mac | [One command](#linux-raspberry-pi-and-macos) | 1 min |
+| <img src="docs/selfhost/windows.svg" width="26"> | A Windows PC | [One command](#windows) | 1 min |
+| <img src="docs/selfhost/proxmox.svg" width="26"> | Proxmox VE | [One command](#proxmox-ve) | 2 min |
+| <img src="docs/selfhost/unraid.svg" width="26"> | Unraid | [Add a template](#unraid) | 2 min |
+| <img src="docs/selfhost/synology.svg" width="26"> <img src="docs/selfhost/qnap.svg" width="26"> <img src="docs/selfhost/truenas.svg" width="26"> <img src="docs/selfhost/nas.svg" width="26"> | Synology, QNAP, TrueNAS, CasaOS, ZimaOS | [Paste a file](#nas) | 3 min |
+| <img src="docs/selfhost/portainer.svg" width="26"> <img src="docs/selfhost/docker.svg" width="26"> | Docker, Portainer, Dockge | [Compose or `docker run`](#docker) | 1 min |
+
+---
+
+## Linux, Raspberry Pi and macOS
```sh
curl -fsSL https://raw.githubusercontent.com/InlitX/GymMane/main/selfhost/install.sh | sh
```
-The script shows what it found on the machine and asks a few questions, each with a default you can
-take by pressing Enter:
+It asks a few questions, each with a default, so you can press Enter all the way: Docker or not,
+the port, a password, who will use it and, with Docker, Syncthing for the phone. Then it prints the
+address and the password. GymMane starts again by itself after a reboot.
-- whether to use Docker, if Docker is running there (otherwise it uses the standalone server, no
- Docker needed);
-- the port (`8080`);
-- whether to ask for a password in the browser, and which one (press Enter and it makes one up);
-- whether to also run Syncthing for the phone app (Docker only);
-- whether to open the port in the firewall (only when run as root and `ufw` or `firewalld` is on).
+**Update or remove:** run the same command again.
-Then it shows a summary, asks to go ahead, installs, checks that GymMane answers and prints the
-address to open and the password.
+<details>
+<summary>More options</summary>
-GymMane starts again on its own after a reboot: with Docker, through Docker; on Linux, as a systemd
-service; on macOS, as a login item (a system service if you run the script as root). On a Linux
-without systemd the script tells you the command to start it.
+- No questions at all: `curl -fsSL …/install.sh | sh -s -- --yes`
+- Force a mode: `--docker` or `--binary`. Add Syncthing: `--sync`. Remove: `--uninstall`.
+- Without Docker it needs a 64-bit Linux (`x64` or `arm64`, so a Raspberry Pi 4/5 with a 64-bit
+ system) or an Apple silicon Mac. Anything else can use [Docker](#docker).
+- It opens the firewall port when run as root with `ufw` or `firewalld`.
+
+</details>
+
+## Windows
+
+In PowerShell:
+
+```powershell
+irm https://raw.githubusercontent.com/InlitX/GymMane/main/selfhost/install.ps1 | iex
+```
-Run the same command again to **update** or **remove** it: the script sees it is installed and asks.
-Updating keeps your settings and your data. Removing keeps your data.
+Same questions as on Linux. As administrator it starts with Windows and opens the firewall port;
+without admin it starts when you log in.
-No questions, take every default: add `-s -- --yes`. Other options: `--docker`, `--binary`,
-`--sync`, `--uninstall`.
+**Update or remove:** run the same command again.
+
+## Proxmox VE
+
+In the shell of your node (Datacenter › your node › Shell):
```sh
-curl -fsSL https://raw.githubusercontent.com/InlitX/GymMane/main/selfhost/install.sh | sh -s -- --yes
+curl -fsSL https://raw.githubusercontent.com/InlitX/GymMane/main/selfhost/proxmox.sh | sh
```
-The standalone server is built for 64-bit Linux (`x64` and `arm64`, so a Raspberry Pi 4 or 5 with a
-64-bit system) and Apple silicon Macs.
+It creates a small Debian container called `gymmane` (1 core, 512 MB, 2 GB), installs GymMane in it
+and prints the address and the password. The container starts with Proxmox, and its backups include
+your data.
-**Windows** (a PC or a server you reach over Remote Desktop), in PowerShell:
+**Update:** run the same command again. **Remove:** delete the container (back it up first: your
+data is inside).
-```powershell
-irm https://raw.githubusercontent.com/InlitX/GymMane/main/selfhost/install.ps1 | iex
+<details>
+<summary>Fixed IP, size and storage</summary>
+
+Set any of these before `sh`:
+
+| Variable | Default | |
+|---|---|---|
+| `GYMMANE_IP` | `dhcp` | A fixed address: `192.168.1.50/24,gw=192.168.1.1` |
+| `GYMMANE_BRIDGE` | `vmbr0` | Network bridge |
+| `GYMMANE_MEMORY` | `512` | MB of RAM |
+| `GYMMANE_DISK` | `2` | GB of disk |
+| `GYMMANE_STORAGE` | `local-lvm` | Where the disk goes |
+| `GYMMANE_CTID` | next free | Container ID |
+
+```sh
+curl -fsSL https://raw.githubusercontent.com/InlitX/GymMane/main/selfhost/proxmox.sh | GYMMANE_IP=192.168.1.50/24,gw=192.168.1.1 sh
```
-It asks the same questions. Run PowerShell as administrator to start GymMane with Windows and open
-the port in Windows Firewall; without admin it starts when you log in. Run the command again to
-update or remove it.
+</details>
+
+## Unraid
+
+1. Docker tab › **Add Container** › Template: paste
+ `https://raw.githubusercontent.com/InlitX/GymMane/main/selfhost/unraid/gymmane.xml` and press Enter.
+2. Set a password (8 or more characters) and, if you like, the names of the people who will use it.
+3. **Apply**, then open it from the GymMane icon › WebUI.
+
+Your data goes to `/mnt/user/appdata/gymmane`. **Update:** from the Docker tab, like any other app.
+
+## NAS
-## Docker by hand
+1. Open [`selfhost/nas/compose.yaml`](selfhost/nas/compose.yaml) and copy it all.
+2. Paste it where your NAS asks for a compose file:
+
+ | | NAS | Where |
+ |:-:|---|---|
+ | <img src="docs/selfhost/synology.svg" width="22"> | Synology DSM 7.2+ | Container Manager › Project › Create |
+ | <img src="docs/selfhost/qnap.svg" width="22"> | QNAP | Container Station › Applications › Create |
+ | <img src="docs/selfhost/truenas.svg" width="22"> | TrueNAS SCALE 24.10+ | Apps › Discover Apps › ⋮ › Install via YAML |
+ | <img src="docs/selfhost/nas.svg" width="22"> | CasaOS, ZimaOS | App Store › + › Install a customized app › Import |
+
+3. Write a password between the quotes of `GYMMANE_PASSWORD` (8 or more characters), start it and
+ open `http://<nas-ip>:8080`.
+
+**Update:** pull the image again and recreate it (Synology: Project › Action › Build; TrueNAS and
+CasaOS: their update button).
+
+<details>
+<summary>Port taken, or data in a folder of your choice</summary>
+
+- **Port 8080 taken:** change the first number in `ports`, for example `"8095:8080"`, and open that
+ port instead.
+- **Data in your own folder** (for example to sync it with the phone): the file keeps it in a Docker
+ volume, which works on any NAS. Replace `gymmane-data:/data` with your folder
+ (`/volume1/docker/gymmane:/data`) and add `user: "<uid>:<gid>"` with the owner of that folder
+ (`id` over SSH shows it). If the folder belongs to someone else, the log says how to fix it.
+
+</details>
+
+## Docker
+
+With Compose:
```sh
mkdir -p gymmane/gymmane-data/sync && cd gymmane
@@ -64,121 +151,143 @@ echo "GYMMANE_PASSWORD=pick-something-long" > .env
docker compose up -d gymmane
```
-GymMane runs as user `1000`, not root. If your user has another id (`id -u`), add `PUID=<id>` and
-`PGID=<group id>` to `.env`, and create `gymmane-data` yourself before the first start, as above,
-so it belongs to you.
-
-Open `http://localhost:8080` (or `http://<server-ip>:8080` from any device on your network).
-Everything you log is stored in `./gymmane-data`. Back up that folder and you have everything.
-
-Or with plain Docker:
+Or in one line:
```sh
docker run -d --name gymmane -p 8080:8080 -v gymmane-data:/data --restart unless-stopped ghcr.io/inlitx/gymmane
```
-Images are built for `amd64` and `arm64` (Raspberry Pi 4/5 with a 64-bit system, most NAS boxes).
+Portainer and Dockge: paste [`selfhost/nas/compose.yaml`](selfhost/nas/compose.yaml) as a new stack.
+Images for `amd64` and `arm64`.
-## By hand, without Docker or scripts
+**Update:** `docker compose pull && docker compose up -d`.
-Download the archive for your system from the
-[latest release](https://github.com/InlitX/GymMane/releases/latest), unpack it and run
-`gymmane-server` (on Windows, `start.bat`). The `web` folder must stay next to it. On macOS, if the
-system blocks the binary, run `xattr -d com.apple.quarantine gymmane-server` once.
+<details>
+<summary>User ID and running without Docker</summary>
-## Settings
+- GymMane runs as user `1000`. If yours is another (`id -u`), add `PUID=<id>` and `PGID=<group id>`
+ to `.env`, and create `gymmane-data` before the first start so it belongs to you.
+- **Without Docker or scripts:** download the archive for your system from the
+ [latest release](https://github.com/InlitX/GymMane/releases/latest), unpack it and run
+ `gymmane-server` (`start.bat` on Windows), with the `web` folder next to it. On macOS, if it is
+ blocked, run `xattr -d com.apple.quarantine gymmane-server` once.
-All settings are environment variables:
+</details>
-| Variable | Default | What it does |
-|---|---|---|
-| `GYMMANE_PORT` | `8080` | Port to listen on |
-| `GYMMANE_PASSWORD` | none | Ask for a password in the browser (any user name works) |
-| `GYMMANE_SYNC` | `<data>/sync` | Folder shared with your phone. `off` turns it off |
-| `GYMMANE_KEEP_DAYS` | `30` | Daily copies of your data kept in `<data>/history` |
-| `GYMMANE_HOST` | `0.0.0.0` | Address to bind. `127.0.0.1` keeps it to this machine. Not with Docker |
-| `GYMMANE_DATA` | `data` next to the server | Where your data lives. Not with Docker: there it is `./gymmane-data` |
+---
-Put them in the settings file of your install, one per line, and restart GymMane:
+## Everyday use
-| Installed with | Settings file | Restart |
-|---|---|---|
-| Docker Compose | `.env` next to `compose.yaml` | `docker compose up -d` |
-| Script, Linux or macOS | `~/gymmane/.env` (`/opt/gymmane/.env` as root) | run the script again and pick Update |
-| Script, Windows | `%LOCALAPPDATA%\GymMane\gymmane.env` | run the script again and pick Update |
+### Several devices
-Updating with the script keeps whatever you added. In the web app, Settings › Data & backup shows
-the folder the server shares with your phone.
+Open the same address on your laptop, tablet or phone: they all share the same data, and each tab
+picks up changes within 20 seconds. Browsers only offer "Install app" over HTTPS or on `localhost`;
+on a plain `http://<ip>` address it works as a normal page.
-The password uses plain HTTP authentication, so on your own network it travels unencrypted. If you
-open GymMane from outside your home, put it behind a reverse proxy with HTTPS (Caddy, Traefik, Nginx
-Proxy Manager…) or reach it through a VPN like Tailscale or WireGuard. Don't open the port to the
-internet as it is.
+### Several people
-## Using it on several devices
+Each person can have their own data on the same address. The installers ask for the names; otherwise
+add them to the [settings](#settings), separated by commas:
-Open the same address on your laptop, tablet or phone browser. They all read and write the same data
-on the server. Each open tab checks for changes every 20 seconds, and right away when you come back
-to it.
+```sh
+GYMMANE_PEOPLE="Ana María, Pablo"
+```
-Browsers only offer to install it as an app ("Install app", "Add to Home Screen") over HTTPS or on
-`localhost`. On a plain `http://<server-ip>` address it works as a normal web page.
+The address then asks who is training, and each person gets their own page (`/ana-maria/`,
+`/pablo/`) with their own workouts, photos and phone folder.
-## Sharing data with the phone app (Syncthing)
+<details>
+<summary>Passwords per person and where their data goes</summary>
-The phone app never connects to the server. They share a folder instead: each side leaves its copy
-there, and each side brings in what the other left, merging it with what it already has.
+- Own password after a colon: `GYMMANE_PEOPLE="Ana María:a-long-password, Pablo:another-one"`.
+ Whoever has none uses `GYMMANE_PASSWORD`. Keep the quotes and use passwords without commas.
+- The first person keeps the data the server already had. The others start empty, in
+ `people/<name>` inside the data folder. Removing a name hides that page but never deletes data.
+- Phone folder: the first person uses `gymmane-data/sync` (`/var/syncthing/GymMane` in Syncthing),
+ everyone else `gymmane-data/people/<name>/sync` (`/var/syncthing/data/people/<name>/sync`).
+- Prefer fully separate servers? Run one container per person, each with its own port and volume.
-1. **On the server**, choose Syncthing in the installer (or run
- `docker compose --profile sync up -d`). Open `http://<server-ip>:8384`, the Syncthing page, and
- set a password for it under Actions › Settings › GUI. Then Add Folder with the path
- `/var/syncthing/GymMane` (on disk it is `gymmane-data/sync`).
+</details>
-2. **On the phone**, install [Syncthing-Fork](https://f-droid.org/packages/com.github.catfriend1.syncthingandroid/)
- from F-Droid. Add the server as a device (on the server, Actions › Show ID), share the folder from
- the server with the phone and accept it into a folder on the phone. For a home server you can turn
- off Global Discovery, Relaying and NAT traversal on both: they find each other on your Wi-Fi.
+### Phone app
-3. **In GymMane on the phone**: Settings › Data & backup › Auto backup, and choose that same folder.
+The phone and the server never connect. They share a folder through Syncthing, and each side merges
+what the other leaves there.
-From then on:
+1. **Server:** choose Syncthing in the installer, or `docker compose --profile sync up -d`. Open
+ `http://<server-ip>:8384`, set a password (Actions › Settings › GUI) and add the folder
+ `/var/syncthing/GymMane`.
+2. **Phone:** install [Syncthing-Fork](https://f-droid.org/packages/com.github.catfriend1.syncthingandroid/),
+ add the server as a device (on the server, Actions › Show ID) and accept the shared folder.
+3. **GymMane on the phone:** Settings › Data & backup › Auto backup, and pick that folder.
-- Every automatic backup the phone makes lands in the folder, and the server merges it within about
- 15 seconds. Open browser tabs pick it up on their next check.
-- Whatever you log in the browser, the server leaves in the folder about half a minute later. The
- phone brings it in when the app starts, or right away with Auto backup › Sync now.
+The server merges each phone backup within 15 seconds; what you log in the browser reaches the phone
+when the app opens, or right away with Auto backup › Sync now.
-How merging works:
+<details>
+<summary>How merging works</summary>
-- **Nothing is lost.** A workout, note, food or routine that exists on either side ends up on both.
-- **The same item edited on both sides:** the most recent copy wins.
-- **Deleting doesn't travel.** Merging never removes anything, so delete it on both sides.
-- Settings follow the most recent copy.
+- **Nothing is lost:** anything that exists on either side ends up on both.
+- **Edited on both sides:** the most recent copy wins. Settings too.
+- **Deleting doesn't travel:** delete it on both sides.
+- The server also keeps a daily copy in `history`, just in case.
+- Without Docker, install Syncthing yourself and share the server's `data/sync` folder.
-The server also keeps a daily copy of its data in `history`, just in case.
+</details>
-Not using Docker? Install Syncthing yourself and point it at the server's `sync` folder, by default
-`data/sync` inside the install folder.
+### In the browser
-## What works differently in the browser
+Everything works except what browsers can't do: notifications while the tab is closed (the rest
+timer still beeps while it's open), home screen widgets, and Health Connect or Apple Health.
-Everything in the app works, with these exceptions, because browsers can't do them:
+### Updating
-- No notifications or reminders while the tab is closed (the rest timer still beeps while it's open).
-- No home screen widgets, Health Connect or Apple Health.
-- Photos and backups are uploaded and downloaded through the browser.
+| Installed with | Update |
+|---|---|
+| Script or Proxmox | Run the same command again |
+| Unraid | Docker tab › Check for updates |
+| NAS | Pull the image and recreate it |
+| Docker Compose | `docker compose pull && docker compose up -d` |
-## Updating
+An update never touches your data.
-Script: run it again and pick Update. Docker: `docker compose pull && docker compose up -d`.
-Without Docker or scripts: replace the files with the new release. Your data folder is never touched
-by an update.
+---
-## Building it yourself
+## Settings
+
+| Variable | Default | What it does |
+|---|---|---|
+| `GYMMANE_PASSWORD` | none | Password to open GymMane |
+| `GYMMANE_PEOPLE` | none | Several people, each with their own data |
+| `GYMMANE_PORT` | `8080` | Port |
+| `GYMMANE_KEEP_DAYS` | `30` | Daily copies kept in `<data>/history` |
+| `GYMMANE_SYNC` | `<data>/sync` | Folder shared with the phone. `off` turns it off |
+| `GYMMANE_HOST` | `0.0.0.0` | `127.0.0.1` keeps it to this machine. Not with Docker |
+| `GYMMANE_DATA` | `data` next to the server | Where data lives. In Docker it is `/data` |
+
+| Installed with | Where | Then |
+|---|---|---|
+| Script, Linux or macOS | `~/gymmane/.env` (`/opt/gymmane/.env` as root) | Run the script and pick Update |
+| Script, Windows | `%LOCALAPPDATA%\GymMane\gymmane.env` | Run the script and pick Update |
+| Proxmox | `/opt/gymmane/.env` in the container (`pct enter <id>`) | `systemctl restart gymmane` |
+| Unraid, NAS | The container variables or the compose file | Save and redeploy |
+| Docker Compose | `.env` next to `compose.yaml` | `docker compose up -d` |
+
+### Password and access from outside
+
+With a password, GymMane asks once per browser and remembers it for a year (Settings › Data &
+backup › Sign out forgets it). At home the password travels unencrypted, so to use it from outside,
+go through a VPN like Tailscale or WireGuard, or a reverse proxy with HTTPS (Caddy, Traefik, Nginx
+Proxy Manager). Never open the port to the internet as it is.
+
+<details>
+<summary>Building it yourself</summary>
```sh
docker build -t gymmane .
```
-Or by hand: `flutter build web --wasm --release --no-web-resources-cdn` for the app, and
-`dart compile exe server/bin/server.dart` for the server, then set `GYMMANE_WEB` to `build/web`.
+Or `flutter build web --wasm --release --no-web-resources-cdn` for the app and
+`dart compile exe server/bin/server.dart` for the server, with `GYMMANE_WEB` pointing to `build/web`.
+
+</details>
diff --git a/docs/selfhost/apple.svg b/docs/selfhost/apple.svg
new file mode 100644
index 0000000..d48a298
--- /dev/null
+++ b/docs/selfhost/apple.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><rect width="48" height="48" rx="11" fill="#2B2B2E"/><g transform="translate(10.0 10.0) scale(1.16667)" fill="#FFFFFF"><path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"/></g></svg>
\ No newline at end of file
diff --git a/docs/selfhost/docker.svg b/docs/selfhost/docker.svg
new file mode 100644
index 0000000..8a6ea62
--- /dev/null
+++ b/docs/selfhost/docker.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><rect width="48" height="48" rx="11" fill="#2496ED"/><g transform="translate(10.0 10.0) scale(1.16667)" fill="#FFFFFF"><path d="M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z"/></g></svg>
\ No newline at end of file
diff --git a/docs/selfhost/linux.svg b/docs/selfhost/linux.svg
new file mode 100644
index 0000000..ae487ab
--- /dev/null
+++ b/docs/selfhost/linux.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><rect width="48" height="48" rx="11" fill="#2B2B2E"/><g transform="translate(10.0 10.0) scale(1.16667)" fill="#FCC624"><path d="M12.504 0c-.155 0-.315.008-.48.021-4.226.333-3.105 4.807-3.17 6.298-.076 1.092-.3 1.953-1.05 3.02-.885 1.051-2.127 2.75-2.716 4.521-.278.832-.41 1.684-.287 2.489a.424.424 0 00-.11.135c-.26.268-.45.6-.663.839-.199.199-.485.267-.797.4-.313.136-.658.269-.864.68-.09.189-.136.394-.132.602 0 .199.027.4.055.536.058.399.116.728.04.97-.249.68-.28 1.145-.106 1.484.174.334.535.47.94.601.81.2 1.91.135 2.774.6.926.466 1.866.67 2.616.47.526-.116.97-.464 1.208-.946.587-.003 1.23-.269 2.26-.334.699-.058 1.574.267 2.577.2.025.134.063.198.114.333l.003.003c.391.778 1.113 1.132 1.884 1.071.771-.06 1.592-.536 2.257-1.306.631-.765 1.683-1.084 2.378-1.503.348-.199.629-.469.649-.853.023-.4-.2-.811-.714-1.376v-.097l-.003-.003c-.17-.2-.25-.535-.338-.926-.085-.401-.182-.786-.492-1.046h-.003c-.059-.054-.123-.067-.188-.135a.357.357 0 00-.19-.064c.431-1.278.264-2.55-.173-3.694-.533-1.41-1.465-2.638-2.175-3.483-.796-1.005-1.576-1.957-1.56-3.368.026-2.152.236-6.133-3.544-6.139zm.529 3.405h.013c.213 0 .396.062.584.198.19.135.33.332.438.533.105.259.158.459.166.724 0-.02.006-.04.006-.06v.105a.086.086 0 01-.004-.021l-.004-.024a1.807 1.807 0 01-.15.706.953.953 0 01-.213.335.71.71 0 00-.088-.042c-.104-.045-.198-.064-.284-.133a1.312 1.312 0 00-.22-.066c.05-.06.146-.133.183-.198.053-.128.082-.264.088-.402v-.02a1.21 1.21 0 00-.061-.4c-.045-.134-.101-.2-.183-.333-.084-.066-.167-.132-.267-.132h-.016c-.093 0-.176.03-.262.132a.8.8 0 00-.205.334 1.18 1.18 0 00-.09.4v.019c.002.089.008.179.02.267-.193-.067-.438-.135-.607-.202a1.635 1.635 0 01-.018-.2v-.02a1.772 1.772 0 01.15-.768c.082-.22.232-.406.43-.533a.985.985 0 01.594-.2zm-2.962.059h.036c.142 0 .27.048.399.135.146.129.264.288.344.465.09.199.14.4.153.667v.004c.007.134.006.2-.002.266v.08c-.03.007-.056.018-.083.024-.152.055-.274.135-.393.2.012-.09.013-.18.003-.267v-.015c-.012-.133-.04-.2-.082-.333a.613.613 0 00-.166-.267.248.248 0 00-.183-.064h-.021c-.071.006-.13.04-.186.132a.552.552 0 00-.12.27.944.944 0 00-.023.33v.015c.012.135.037.2.08.334.046.134.098.2.166.268.01.009.02.018.034.024-.07.057-.117.07-.176.136a.304.304 0 01-.131.068 2.62 2.62 0 01-.275-.402 1.772 1.772 0 01-.155-.667 1.759 1.759 0 01.08-.668 1.43 1.43 0 01.283-.535c.128-.133.26-.2.418-.2zm1.37 1.706c.332 0 .733.065 1.216.399.293.2.523.269 1.052.468h.003c.255.136.405.266.478.399v-.131a.571.571 0 01.016.47c-.123.31-.516.643-1.063.842v.002c-.268.135-.501.333-.775.465-.276.135-.588.292-1.012.267a1.139 1.139 0 01-.448-.067 3.566 3.566 0 01-.322-.198c-.195-.135-.363-.332-.612-.465v-.005h-.005c-.4-.246-.616-.512-.686-.71-.07-.268-.005-.47.193-.6.224-.135.38-.271.483-.336.104-.074.143-.102.176-.131h.002v-.003c.169-.202.436-.47.839-.601.139-.036.294-.065.466-.065zm2.8 2.142c.358 1.417 1.196 3.475 1.735 4.473.286.534.855 1.659 1.102 3.024.156-.005.33.018.513.064.646-1.671-.546-3.467-1.089-3.966-.22-.2-.232-.335-.123-.335.59.534 1.365 1.572 1.646 2.757.13.535.16 1.104.021 1.67.067.028.135.06.205.067 1.032.534 1.413.938 1.23 1.537v-.043c-.06-.003-.12 0-.18 0h-.016c.151-.467-.182-.825-1.065-1.224-.915-.4-1.646-.336-1.77.465-.008.043-.013.066-.018.135-.068.023-.139.053-.209.064-.43.268-.662.669-.793 1.187-.13.533-.17 1.156-.205 1.869v.003c-.02.334-.17.838-.319 1.35-1.5 1.072-3.58 1.538-5.348.334a2.645 2.645 0 00-.402-.533 1.45 1.45 0 00-.275-.333c.182 0 .338-.03.465-.067a.615.615 0 00.314-.334c.108-.267 0-.697-.345-1.163-.345-.467-.931-.995-1.788-1.521-.63-.4-.986-.87-1.15-1.396-.165-.534-.143-1.085-.015-1.645.245-1.07.873-2.11 1.274-2.763.107-.065.037.135-.408.974-.396.751-1.14 2.497-.122 3.854a8.123 8.123 0 01.647-2.876c.564-1.278 1.743-3.504 1.836-5.268.048.036.217.135.289.202.218.133.38.333.59.465.21.201.477.335.876.335.039.003.075.006.11.006.412 0 .73-.134.997-.268.29-.134.52-.334.74-.4h.005c.467-.135.835-.402 1.044-.7zm2.185 8.958c.037.6.343 1.245.882 1.377.588.134 1.434-.333 1.791-.765l.211-.01c.315-.007.577.01.847.268l.003.003c.208.199.305.53.391.876.085.4.154.78.409 1.066.486.527.645.906.636 1.14l.003-.007v.018l-.003-.012c-.015.262-.185.396-.498.595-.63.401-1.746.712-2.457 1.57-.618.737-1.37 1.14-2.036 1.191-.664.053-1.237-.2-1.574-.898l-.005-.003c-.21-.4-.12-1.025.056-1.69.176-.668.428-1.344.463-1.897.037-.714.076-1.335.195-1.814.12-.465.308-.797.641-.984l.045-.022zm-10.814.049h.01c.053 0 .105.005.157.014.376.055.706.333 1.023.752l.91 1.664.003.003c.243.533.754 1.064 1.189 1.637.434.598.77 1.131.729 1.57v.006c-.057.744-.48 1.148-1.125 1.294-.645.135-1.52.002-2.395-.464-.968-.536-2.118-.469-2.857-.602-.369-.066-.61-.2-.723-.4-.11-.2-.113-.602.123-1.23v-.004l.002-.003c.117-.334.03-.752-.027-1.118-.055-.401-.083-.71.043-.94.16-.334.396-.4.69-.533.294-.135.64-.202.915-.47h.002v-.002c.256-.268.445-.601.668-.838.19-.201.38-.336.663-.336zm7.159-9.074c-.435.201-.945.535-1.488.535-.542 0-.97-.267-1.28-.466-.154-.134-.28-.268-.373-.335-.164-.134-.144-.333-.074-.333.109.016.129.134.199.2.096.066.215.2.36.333.292.2.68.467 1.167.467.485 0 1.053-.267 1.398-.466.195-.135.445-.334.648-.467.156-.136.149-.267.279-.267.128.016.034.134-.147.332a8.097 8.097 0 01-.69.468zm-1.082-1.583V5.64c-.006-.02.013-.042.029-.05.074-.043.18-.027.26.004.063 0 .16.067.15.135-.006.049-.085.066-.135.066-.055 0-.092-.043-.141-.068-.052-.018-.146-.008-.163-.065zm-.551 0c-.02.058-.113.049-.166.066-.047.025-.086.068-.14.068-.05 0-.13-.02-.136-.068-.01-.066.088-.133.15-.133.08-.031.184-.047.259-.005.019.009.036.03.03.05v.02h.003z"/></g></svg>
\ No newline at end of file
diff --git a/docs/selfhost/nas.svg b/docs/selfhost/nas.svg
new file mode 100644
index 0000000..d13c309
--- /dev/null
+++ b/docs/selfhost/nas.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><rect width="48" height="48" rx="11" fill="#D9A184"/><g transform="translate(10.0 10.0) scale(0.10938)" fill="#1A1410"><path d="M208,136H48a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,64H48V152H208v48Zm0-160H48A16,16,0,0,0,32,56v48a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V56A16,16,0,0,0,208,40Zm0,64H48V56H208v48ZM192,80a12,12,0,1,1-12-12A12,12,0,0,1,192,80Zm0,96a12,12,0,1,1-12-12A12,12,0,0,1,192,176Z"/></g></svg>
\ No newline at end of file
diff --git a/docs/selfhost/portainer.svg b/docs/selfhost/portainer.svg
new file mode 100644
index 0000000..d7bc3d8
--- /dev/null
+++ b/docs/selfhost/portainer.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><rect width="48" height="48" rx="11" fill="#13BEF9"/><g transform="translate(10.0 10.0) scale(1.16667)" fill="#FFFFFF"><path d="M12.504 0v1.023l-.01-.015-6.106 3.526H3.417v.751h5.359v3.638h1.942V5.284h1.786v10.416c.027 0 .54-.01.751.091V5.285h.531v10.608c.293.147.55.312.751.54V5.286h6.046v-.75h-1.267l-6.061-3.5V0zm0 1.87v2.664H7.889zm.751.031l4.56 2.633h-4.56zM9.142 5.285h1.21v1.686h-1.21zm-4.736 2.73v1.951h1.942v-1.95zm2.19 0v1.951h1.941v-1.95zm-2.19 2.171v1.951h1.942v-1.95zm2.19 0v1.951h1.941v-1.95zm2.18 0v1.951h1.942v-1.95zM4.36 12.43a3.73 3.73 0 00-.494 1.851c0 1.227.604 2.308 1.52 2.986.239-.064.477-.1.724-.11.1 0 .165.01.266.019.284-1.191 1.383-1.988 2.665-1.988.724 0 1.438.201 1.924.668.229-.476.302-1.007.302-1.575 0-.65-.165-1.292-.494-1.85zm4.828 3.16c-1.21 0-2.226.844-2.492 1.97a.922.922 0 00-.275-.009 2.559 2.559 0 00-2.564 2.556 2.565 2.565 0 003.096 2.5A2.579 2.579 0 009.233 24c.862 0 1.622-.43 2.09-1.081a2.557 2.557 0 004.186-1.97c0-.567-.193-1.099-.504-1.52a2.557 2.557 0 00-3.866-2.94 2.574 2.574 0 00-1.951-.898z"/></g></svg>
\ No newline at end of file
diff --git a/docs/selfhost/proxmox.svg b/docs/selfhost/proxmox.svg
new file mode 100644
index 0000000..9ecdfd7
--- /dev/null
+++ b/docs/selfhost/proxmox.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><rect width="48" height="48" rx="11" fill="#E57000"/><g transform="translate(10.0 10.0) scale(1.16667)" fill="#FFFFFF"><path d="M4.928 1.825c-1.09.553-1.09.64-.07 1.78 5.655 6.295 7.004 7.782 7.107 7.782.139.017 7.971-8.542 8.058-8.801.034-.07-.208-.312-.519-.536-.415-.312-.864-.433-1.712-.467-1.59-.104-2.144.242-4.115 2.455-.899 1.003-1.66 1.833-1.66 1.833-.017 0-.76-.813-1.642-1.798S8.473 2.1 8.127 1.91c-.796-.45-2.421-.484-3.2-.086zM1.297 4.367C.45 4.695 0 5.007 0 5.248c0 .121 1.331 1.678 2.94 3.459 1.625 1.78 2.939 3.268 2.939 3.302 0 .035-1.331 1.522-2.94 3.303C1.314 17.11.017 18.683.035 18.822c.086.467 1.504 1.055 2.541 1.055 1.678-.018 2.058-.312 5.603-4.202 1.78-1.954 3.233-3.614 3.233-3.666 0-.069-1.435-1.694-3.199-3.63-2.3-2.508-3.423-3.632-3.96-3.874-.812-.398-2.126-.467-2.956-.138zm18.467.12c-.502.26-1.764 1.505-3.943 3.891-1.763 1.937-3.199 3.562-3.199 3.631 0 .07 1.453 1.712 3.234 3.666 3.544 3.89 3.925 4.184 5.602 4.202 1.038 0 2.455-.588 2.542-1.055.017-.156-1.28-1.712-2.905-3.493-1.608-1.78-2.94-3.285-2.94-3.32 0-.034 1.332-1.539 2.94-3.32C22.72 6.91 24.017 5.352 24 5.214c-.087-.45-1.366-.968-2.473-1.038-.795-.034-1.21.035-1.763.312zM7.954 16.973c-2.144 2.369-3.908 4.374-3.943 4.46-.034.07.208.312.52.537.414.311.864.432 1.711.467 1.574.103 2.161-.26 4.15-2.508.864-.968 1.608-1.78 1.625-1.78s.761.812 1.643 1.798c2.023 2.248 2.559 2.576 4.132 2.49.848-.035 1.297-.156 1.712-.467.311-.225.553-.467.519-.536-.087-.26-7.92-8.819-8.058-8.801-.069 0-1.867 1.954-4.011 4.34z"/></g></svg>
\ No newline at end of file
diff --git a/docs/selfhost/qnap.svg b/docs/selfhost/qnap.svg
new file mode 100644
index 0000000..d856f91
--- /dev/null
+++ b/docs/selfhost/qnap.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><rect width="48" height="48" rx="11" fill="#0C2E82"/><g transform="translate(10.0 10.0) scale(1.16667)" fill="#FFFFFF"><path d="M1.3164 9.955C.438 9.955 0 10.3094 0 11.0177v1.9512c0 .704.438 1.0566 1.3164 1.0566h2.5703c0-.0061.1487.0049.377-.0293-.2145-.3087-.6112-.6434-.9825-.9121l-.0683-.0488H1.6133v-2.1133H3.744v1.793c.6399.1993 1.0793.4554 1.379.6992.0507-.1283.0761-.2763.0761-.4454v-1.9511c0-.6699-.3928-1.0238-1.1758-1.0606v-.002zm4.9649.0528c-.1551 0-.274.044-.3575.1309-.1468.1535-.1164.3461-.1308.3535v3.5176h1.4453s-.0081-1.8582-.0117-2.4063c.0062-.036.0323-.088.1425-.0742 0 0 .0426.0012.0606.0332.2786.445 2.1035 2.4473 2.1035 2.4473h1.5v-4.002H9.5703v2.3281c-.022.0535-.095.044-.1308.006-.258-.399-1.2508-1.7643-1.5684-2.1993-.0202-.0243-.1248-.1348-.3555-.1348Zm6.584 0c-.3665 0-.6468.0763-.8438.2305-.202.1592-.3027.371-.3027.6387v3.1328h1.5273v-1.0664h2.1406v1.0664h1.5293V10.877c0-.2711-.0993-.4848-.2969-.6387-.197-.1542-.4793-.2305-.8457-.2305zm5.9179 0c-.366 0-.6481.0778-.8457.2324-.197.1533-.2976.361-.3027.6192v3.1504h1.5293v-1.045h2.4707c.6714 0 1.0078-.268 1.0078-.8085V10.873c0-.3081-.0845-.529-.248-.664-.2801-.2223-.743-.1877-.7032-.2012zm4.7246.0723c-.248.0126-.4473.2195-.4473.4707 0 .259.2116.4687.4707.4687A.4684.4684 0 0 0 24 10.5508c0-.2593-.2096-.4707-.4688-.4707-.008 0-.0154-.0004-.0234 0zm.002.0683c.0068-.0003.0146 0 .0215 0 .2213.0007.3998.1813.4004.4024a.3996.3996 0 0 1-.4004.3984c-.221-.0005-.4001-.1777-.4004-.3984.0003-.2142.1675-.391.379-.4024zm-.1894.1407v.5332h.0722v-.2364c.0404-.0023.081.0013.1211.002.0326.0073.0642.0456.0684.0508.0452.0579.0807.1224.121.1836h.088l-.0918-.1445a.3512.3512 0 0 0-.0586-.0703.1786.1786 0 0 0-.043-.0274c.0514-.007.0887-.023.1133-.0488.0434-.0465.05-.1157.0137-.1758-.0217-.036-.0561-.0664-.166-.0664zm.0722.0586h.168c.1513 0 .134.1407.0586.168-.0737.0188-.1513.0064-.2266.0097zm-10.1465.7011h2.1407v1.1582H13.246zm5.8965 0h1.9434v1.0371h-1.9434zm-16.3574 1.539c.4791.3043 1.3518.9071 1.6406 1.4571h1.0879c-.1858-.3314-.814-1.1293-2.7285-1.457Z"/></g></svg>
\ No newline at end of file
diff --git a/docs/selfhost/raspberrypi.svg b/docs/selfhost/raspberrypi.svg
new file mode 100644
index 0000000..fcb4845
--- /dev/null
+++ b/docs/selfhost/raspberrypi.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><rect width="48" height="48" rx="11" fill="#A22846"/><g transform="translate(10.0 10.0) scale(1.16667)" fill="#FFFFFF"><path d="m19.8955 10.8961-.1726-.3028c.0068-2.1746-1.0022-3.061-2.1788-3.7348.356-.0938.7237-.1711.8245-.6182.6118-.1566.7397-.4398.8011-.7398.16-.1066.6955-.4061.6394-.9211.2998-.2069.4669-.4725.3819-.8487.3222-.3515.407-.6419.2702-.9096.3868-.4805.2152-.7295.05-.9817.2897-.5254.0341-1.0887-.7758-.9944-.3221-.4733-1.0244-.3659-1.133-.3637-.1215-.1519-.2819-.2821-.7755-.219-.3197-.2851-.6771-.2364-1.0458-.0964-.4378-.3403-.7275-.0675-1.0584.0356-.53-.1706-.6513.0631-.9117.1583-.5781-.1203-.7538.1416-1.0309.4182l-.3224-.0063c-.8719.5061-1.305 1.5366-1.4585 2.0664-.1536-.5299-.5858-1.5604-1.4575-2.0664l-.3223.0063C9.942.5014 9.7663.2394 9.1883.3597 8.9279.2646 8.807.0309 8.2766.2015c-.2172-.0677-.417-.2084-.6522-.2012l.0004.0002C7.5017.0041 7.369.049 7.2185.166c-.3688-.1401-.7262-.1887-1.0459.0964-.4936-.0631-.654.0671-.7756.219C5.2887.4791 4.5862.3717 4.264.845c-.8096-.0943-1.0655.4691-.7756.9944-.1653.2521-.3366.5013.05.9819-.1367.2677-.0519.5581.2703.9096-.085.3763.0822.6418.3819.8487-.0561.515.4795.8144.6394.9211.0614.3001.1894.5832.8011.7398.1008.4472.4685.5244.8245.6183-1.1766.6737-2.1856 1.56-2.1788 3.7348l-.1724.3028c-1.3491.8082-2.5629 3.4056-.6648 5.5167.124.6609.3319 1.1355.5171 1.6609.2769 2.117 2.0841 3.1082 2.5608 3.2255.6984.524 1.4423 1.0212 2.449 1.3696.949.964 1.977 1.3314 3.0107 1.3308.0152 0 .0306.0002.0457 0 1.0337.0006 2.0618-.3668 3.0107-1.3308 1.0067-.3483 1.7506-.8456 2.4491-1.3696.4766-.1173 2.2838-1.1085 2.5607-3.2255.1851-.5253.3931-1 .517-1.6609 1.8981-2.1113.6843-4.7089-.6649-5.517zm-1.0386-.3715c-.0704.8759-4.6354-3.0504-3.8472-3.1808 2.1391-.3558 3.9191.896 3.8472 3.1808zm-2.0155 4.3649c-1.1481.7409-2.8025.2626-3.6953-1.0681-.8928-1.3306-.6858-3.0101.4623-3.7509 1.1481-.7409 2.8025-.2627 3.6953 1.068.8927 1.3307.6858 3.0101-.4623 3.751zM13.6591 1.3721c.0396.1967.0843.321.1354.3577.2537-.272.4611-.5506.7878-.8123.0011.1537-.0776.3205.1169.4425.1752-.2356.4119-.4459.7263-.6244-.1514.2611-.026.3404.0554.4486.24-.2059.4681-.4144.9109-.5759-.121.1474-.2902.2914-.1108.4607.2473-.1544.496-.3086 1.0833-.4183-.1323.1475-.4059.295-.2401.4426.3104-.1186.6539-.2047 1.034-.2546-.182.1496-.3337.2963-.1846.4122.3323-.1022.7899-.2398 1.2372-.1212l-.2832.2849c-.0314.0382.6623.0297 1.1202.0364-.167.2321-.3375.4562-.437.8548.0454.0459.2723.0204.4862 0-.2194.4618-.6004.5783-.6893.776.134.1015.32.075.5232.006-.158.3254-.4892.5484-.7509.8123.0662.047.1818.075.4555.0425-.2418.257-.5339.492-.8802.7032.0614.0708.2722.0681.4678.0727-.3136.3069-.7173.466-1.0955.6668.1885.1288.3234.0988.4678.097-.2676.2198-.7225.3342-1.1448.4668.0803.1249.1607.1589.3324.194-.447.2473-1.0873.1343-1.2679.2607.0435.1243.1665.2053.3139.2728-.7197.0418-2.6879-.0262-3.0652-1.5156.7367-.8094 2.0813-1.7593 4.394-2.934-1.7994.6022-3.4229 1.405-4.7817 2.5096-1.5978-.7436-.4965-2.6197.283-3.3645zm-1.6126 5.3718c1.1329-.0123 2.5356.8325 2.53 1.6286-.005.7027-.9851 1.2715-2.5213 1.2607-1.5043-.0177-2.5172-.7148-2.5137-1.3957.003-.5603 1.2282-1.5263 2.505-1.4936zm-5.7646-.6006c.1717-.0351.252-.0692.3323-.194-.4223-.1327-.8772-.247-1.1448-.4668.1444.0018.2792.0318.4678-.097-.3783-.2008-.782-.3599-1.0956-.6668.1955-.0048.4064-.002.4677-.0728-.3462-.2113-.6383-.4463-.8801-.7033.2738.0325.3893.0045.4555-.0425-.2617-.264-.593-.487-.7509-.8123.2032.069.3892.0954.5232-.006-.089-.1977-.47-.3142-.6894-.776.214.0204.4409.0459.4863 0-.0994-.3985-.2698-.6226-.4369-.8547.4579-.0067 1.1516.0018 1.1202-.0364l-.2831-.2849c.4472-.1186.9049.019 1.2371.1213.1492-.1159-.0026-.2626-.1847-.4123.3801.05.7236.1361 1.034.2547.1659-.1476-.1076-.2951-.24-.4426.5872.1097.8361.2639 1.0833.4183.1794-.1694.0103-.3133-.1108-.4607.4428.1615.6709.37.911.5759.0814-.1082.2068-.1875.0554-.4486.3143.1785.5511.3888.7263.6244.1945-.122.1159-.2888.1169-.4426.3267.2618.534.5404.7879.8124.0511-.0366.0959-.161.1354-.3577.7794.7448 1.8807 2.6208.2831 3.3646-1.3589-1.1039-2.9817-1.9064-4.78-2.5086 2.3115 1.174 3.6556 2.1239 4.392 2.9328-.3773 1.4895-2.3455 1.5575-3.0651 1.5157.1473-.0676.2703-.1485.3139-.2728-.1806-.1264-.8209-.0134-1.2679-.2607zm2.8175 1.1334c.7881.1304-3.7769 4.0567-3.8472 3.1809-.0719-2.2846 1.7079-3.5367 3.8472-3.1809zm-4.847 8.7567c-1.1094-.8789-1.4668-3.4529.5901-4.6097 1.2394-.3273.4184 5.051-.5901 4.6097zm4.2656 4.5989c-.6257.3719-2.1452.2187-3.2252-1.3095-.7283-1.2823-.6345-2.5872-.123-2.9705.7648-.4589 1.9464.1609 2.8559 1.2003.7923.9405 1.1536 2.5927.4923 3.0797zm-1.2415-5.6086c-1.1481-.7409-1.3551-2.4203-.4623-3.7511.8928-1.3307 2.5472-1.8089 3.6952-1.068 1.1481.7409 1.3551 2.4203.4623 3.7509-.8926 1.3308-2.5471 1.809-3.6952 1.0682zm4.7948 8.2279c-1.3763.0584-2.7258-1.1105-2.7081-1.5157-.0206-.594 1.6758-1.0578 2.782-1.0306 1.1131-.0479 2.6068.3531 2.6097.8851.0184.5166-1.3547 1.6838-2.6836 1.6612zm2.7584-5.8578c.0081 1.3899-1.226 2.5225-2.7562 2.5299-1.5302.0073-2.7773-1.1135-2.7854-2.5033v-.0265c-.008-1.3899 1.2259-2.5226 2.7562-2.5299 1.5302-.0073 2.7773 1.1134 2.7853 2.5033a.7794.7794 0 0 1 .0001.0265zm3.855 2.0029c-1.186 1.6208-2.7916 1.684-3.3896 1.2325-.6255-.5811-.148-2.3854.7094-3.3747v-.0003c.9812-1.0912 2.0302-1.8037 2.7609-1.2469.4919.4828.7805 2.3008-.0807 3.3894zm1.0724-3.4301c-1.0086.4413-1.8298-4.9372-.5901-4.61 2.0568 1.1569 1.6994 3.731.5901 4.61zm-.0256-8.3279h.2985v-.5304h.2986c.1502 0 .2053.0624.2262.2052.0152.1088.0113.2395.0477.3253h.2984c-.0533-.0763-.0515-.2358-.0571-.3213-.0097-.1373-.0513-.2796-.1977-.3176v-.0037c.1502-.061.2149-.1807.2149-.341 0-.2048-.1539-.3738-.3974-.3738h-.732v1.3573zm.2985-1.1255h.3269c.1333 0 .2054.0573.2054.188 0 .1369-.0721.1942-.2054.1942H20.03v-.3822zm-1.0337.4633c0 .7009.5682 1.2694 1.2695 1.2694s1.2695-.5684 1.2695-1.2694c0-.7013-.5683-1.2697-1.2695-1.2697-.7013 0-1.2695.5684-1.2695 1.2697zm2.3275 0c0 .5845-.4737 1.058-1.058 1.058s-1.058-.4735-1.058-1.058c0-.5849.4737-1.058 1.058-1.058s1.058.4731 1.058 1.058z"/></g></svg>
\ No newline at end of file
diff --git a/docs/selfhost/synology.svg b/docs/selfhost/synology.svg
new file mode 100644
index 0000000..bd400dd
--- /dev/null
+++ b/docs/selfhost/synology.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><rect width="48" height="48" rx="11" fill="#2B2B2E"/><g transform="translate(10.0 10.0) scale(1.16667)" fill="#FFFFFF"><path d="M13.44 8.927l-.889.37.056.117a.623.623 0 0 1 .212-.054c.05 0 .093.017.126.046.033.028.058.081.072.16.015.08.022.29.022.634v2.736c0 .189-.013.316-.042.381a.295.295 0 0 1-.118.142c-.053.031-.147.045-.286.045v.12h1.481v-.12c-.154 0-.261-.017-.32-.048a.29.29 0 0 1-.126-.142c-.026-.06-.04-.187-.04-.378V8.927zm-11.722.34c-.33 0-.608.05-.84.147-.233.1-.411.246-.534.436a1.083 1.083 0 0 0-.185.612c0 .338.131.627.393.864.184.167.507.309.968.422.358.091.587.153.688.191a.7.7 0 0 1 .31.183c.058.07.088.158.088.259 0 .155-.07.291-.21.41-.142.116-.35.176-.628.176-.262 0-.47-.066-.625-.197-.154-.132-.255-.339-.307-.619L0 12.23c.056.48.228.845.517 1.096.289.252.704.378 1.244.378.371 0 .68-.054.93-.156a1.263 1.263 0 0 0 .781-1.169 1.29 1.29 0 0 0-.171-.684 1.203 1.203 0 0 0-.472-.437c-.2-.107-.508-.21-.927-.31-.418-.098-.683-.193-.79-.286a.326.326 0 0 1 .009-.524c.14-.105.336-.156.586-.156.24 0 .422.049.542.145.122.097.199.256.237.471l.864-.028c-.013-.395-.154-.71-.425-.949-.271-.235-.674-.353-1.208-.353zm21.808.33a.475.475 0 1 0-.002.95.475.475 0 0 0 .002-.95zm0 .072a.4.4 0 0 1 .401.403c0 .116-.05.22-.128.294l-.086-.135a.396.396 0 0 0-.065-.078.212.212 0 0 0-.048-.03.2.2 0 0 0 .127-.057.144.144 0 0 0 .043-.109.178.178 0 0 0-.025-.091.125.125 0 0 0-.067-.055.309.309 0 0 0-.123-.02h-.266v.606h.08v-.268h.091c.02 0 .036.001.045.003.013.004.025.007.036.014.013.01.024.023.04.043.015.019.035.049.059.083l.08.125h.043a.396.396 0 0 1-.237.08.405.405 0 0 1-.404-.405c0-.224.18-.403.404-.403zm-.157.191h.191c.044 0 .077.01.097.027a.089.089 0 0 1 .03.07.09.09 0 0 1-.016.055.076.076 0 0 1-.047.035.196.196 0 0 1-.085.013h-.17zm-15.037.6c-.41 0-.752.17-1.023.514v-.455h-.754v3.105h.814v-1.401c0-.348.022-.583.063-.713a.583.583 0 0 1 .234-.306.666.666 0 0 1 .385-.118c.11 0 .208.028.287.082.08.054.135.13.17.229.037.099.054.314.054.646v1.581h.816V11.7a2.54 2.54 0 0 0-.046-.55.925.925 0 0 0-.16-.343.83.83 0 0 0-.341-.25 1.285 1.285 0 0 0-.499-.097zm2.65 0a1.7 1.7 0 0 0-.826.2 1.39 1.39 0 0 0-.571.586 1.684 1.684 0 0 0-.202.793c0 .356.068.657.202.904.134.25.33.438.588.566.259.129.53.194.814.194.46 0 .841-.156 1.144-.463.303-.31.455-.698.455-1.167 0-.465-.15-.85-.451-1.156-.3-.305-.683-.457-1.154-.457zm7.315.05c-.351 0-.64.108-.865.323a1.02 1.02 0 0 0-.336.77c0 .194.05.371.147.534.1.162.24.285.423.379-.223.187-.366.335-.429.44a.55.55 0 0 0-.092.271c0 .068.024.13.071.184.046.056.127.116.24.187a9.626 9.626 0 0 0-.329.355c-.113.145-.19.253-.226.336a.41.41 0 0 0-.034.157c0 .12.081.232.246.343.291.19.649.284 1.071.284.55 0 .996-.16 1.337-.477.232-.216.35-.45.35-.694a.613.613 0 0 0-.183-.45.838.838 0 0 0-.49-.227 8.478 8.478 0 0 0-.878-.053 4.257 4.257 0 0 1-.46-.027c-.105-.015-.177-.04-.212-.075-.038-.037-.056-.072-.056-.112a.37.37 0 0 1 .05-.159.868.868 0 0 1 .186-.221c.156.049.309.07.459.07.36 0 .648-.1.864-.301a.956.956 0 0 0 .323-.722c0-.247-.062-.45-.187-.61h.394c.097 0 .15-.002.167-.01a.056.056 0 0 0 .035-.025.289.289 0 0 0 .018-.12.214.214 0 0 0-.02-.105.083.083 0 0 0-.033-.028.83.83 0 0 0-.166-.008h-.639a1.307 1.307 0 0 0-.746-.21zm-2.752 0c-.252 0-.49.065-.714.194a1.437 1.437 0 0 0-.546.61 1.816 1.816 0 0 0-.205.825c0 .381.114.724.34 1.03a1.29 1.29 0 0 0 1.09.543c.28 0 .532-.07.76-.211.23-.14.409-.35.54-.627.13-.276.194-.55.194-.821 0-.385-.118-.725-.354-1.022a1.344 1.344 0 0 0-1.105-.522zm-12.182.009l1.174 3.113a1.193 1.193 0 0 1-.21.431c-.09.112-.23.167-.419.167-.102 0-.218-.013-.344-.04l.067.645c.152.033.307.052.464.052.155 0 .294-.019.418-.052a1.04 1.04 0 0 0 .31-.138.862.862 0 0 0 .224-.234 2.2 2.2 0 0 0 .205-.414l.199-.545 1.085-2.985h-.844l-.722 2.204-.74-2.204zm16.631.078v.122a.84.84 0 0 1 .245.091c.035.029.08.08.136.157.072.102.125.186.158.255l1.088 2.275-.213.526c-.079.194-.158.326-.236.393-.08.068-.15.104-.217.104a.878.878 0 0 1-.167-.05.924.924 0 0 0-.3-.07c-.105 0-.19.025-.25.084a.286.286 0 0 0-.092.22c0 .098.042.183.126.257a.457.457 0 0 0 .322.112c.18 0 .366-.072.56-.223.193-.15.35-.37.469-.664l1.226-3.014a1.6 1.6 0 0 1 .113-.254.55.55 0 0 1 .145-.146.473.473 0 0 1 .188-.053v-.122h-.978v.122c.093 0 .16.008.197.023a.172.172 0 0 1 .083.057.146.146 0 0 1 .023.087c0 .091-.019.18-.056.271l-.675 1.671-.737-1.53c-.074-.15-.11-.268-.11-.356a.21.21 0 0 1 .074-.16.346.346 0 0 1 .224-.063h.068v-.122zm-1.753.08c.175 0 .316.074.43.217.15.196.224.466.224.815 0 .265-.053.46-.16.584a.516.516 0 0 1-.41.188.528.528 0 0 1-.43-.216c-.149-.19-.223-.458-.223-.802 0-.268.054-.461.163-.59a.515.515 0 0 1 .406-.197zm-2.798.054c.242 0 .44.102.598.312.23.308.346.727.346 1.263 0 .429-.07.73-.209.905a.646.646 0 0 1-.528.264c-.286 0-.516-.161-.691-.477-.174-.32-.263-.695-.263-1.135 0-.272.037-.493.11-.669a.731.731 0 0 1 .285-.361.667.667 0 0 1 .352-.102zm-4.463.395c.216 0 .396.084.543.247.144.162.216.397.216.703 0 .311-.072.55-.216.712a.695.695 0 0 1-.543.248.695.695 0 0 1-.542-.248c-.147-.161-.22-.398-.22-.708 0-.308.073-.545.22-.707a.704.704 0 0 1 .542-.247zm6.66 2.498c.265.036.647.065 1.142.08.34.007.566.034.68.083.113.048.17.13.17.241 0 .157-.094.304-.282.442-.19.138-.48.208-.874.208-.414 0-.732-.07-.951-.204-.128-.078-.19-.168-.19-.277 0-.078.024-.169.076-.26a1.51 1.51 0 0 1 .228-.313z"/></g></svg>
\ No newline at end of file
diff --git a/docs/selfhost/truenas.svg b/docs/selfhost/truenas.svg
new file mode 100644
index 0000000..e4ce242
--- /dev/null
+++ b/docs/selfhost/truenas.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><rect width="48" height="48" rx="11" fill="#0095D5"/><g transform="translate(10.0 10.0) scale(1.16667)" fill="#FFFFFF"><path d="M24 10.049v5.114l-10.949 6.324v-5.114L24 10.049zm-24 0v5.114l10.956 6.324v-5.114L0 10.049zm12.004-.605l-4.433 2.559 4.433 2.559 4.429-2.559-4.429-2.559zm10.952-1.207l-9.905-5.723v5.118l5.473 3.164 4.432-2.559zm-12-.605V2.513L1.044 8.236l4.432 2.555 5.48-3.159z"/></g></svg>
\ No newline at end of file
diff --git a/docs/selfhost/unraid.svg b/docs/selfhost/unraid.svg
new file mode 100644
index 0000000..0ba523a
--- /dev/null
+++ b/docs/selfhost/unraid.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><rect width="48" height="48" rx="11" fill="#F15A2C"/><g transform="translate(10.0 10.0) scale(1.16667)" fill="#FFFFFF"><path d="M11.406 8.528h1.17v6.926h-1.17zM1.17 15.454H0V8.528h1.17zm4.534.828h1.17v2.645h-1.17zm-2.86-2.969h1.169v4.282h-1.17zm5.703 0h1.17v4.282h-1.17zM22.83 8.528H24v6.926h-1.17zm-4.534-.81h-1.17V5.073h1.17zm2.86 2.95h-1.169V6.406h1.17zm-5.72 0h-1.17V6.406h1.17z"/></g></svg>
\ No newline at end of file
diff --git a/docs/selfhost/windows.svg b/docs/selfhost/windows.svg
new file mode 100644
index 0000000..6c26f0c
--- /dev/null
+++ b/docs/selfhost/windows.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><rect width="48" height="48" rx="11" fill="#0078D4"/><g transform="translate(10.0 10.0) scale(0.10938)" fill="#FFFFFF"><path d="M208,136H128a8,8,0,0,0-8,8v57.45a8,8,0,0,0,6.57,7.88l80,14.54A7.61,7.61,0,0,0,208,224a8,8,0,0,0,8-8V144A8,8,0,0,0,208,136Zm-8,70.41-64-11.63V152h64ZM96,136H32a8,8,0,0,0-8,8v40a8,8,0,0,0,6.57,7.87l64,11.64a8.54,8.54,0,0,0,1.43.13,8,8,0,0,0,8-8V144A8,8,0,0,0,96,136Zm-8,50.05-48-8.73V152H88ZM213.13,33.86a8,8,0,0,0-6.56-1.73l-80,14.55A8,8,0,0,0,120,54.55V112a8,8,0,0,0,8,8h80a8,8,0,0,0,8-8V40A8,8,0,0,0,213.13,33.86ZM200,104H136V61.22l64-11.63ZM101.13,54.22a8,8,0,0,0-6.56-1.73l-64,11.64A8,8,0,0,0,24,72v40a8,8,0,0,0,8,8H96a8,8,0,0,0,8-8V60.36A8,8,0,0,0,101.13,54.22ZM88,104H40V78.68L88,70Z"/></g></svg>
\ No newline at end of file
diff --git a/selfhost/install.ps1 b/selfhost/install.ps1
index 7d362b4..a72ad5b 100644
--- a/selfhost/install.ps1
+++ b/selfhost/install.ps1
@@ -89,11 +89,13 @@ function Install-GymMane {
function EnvValue($key) {
if (-not (Test-Path $envFile)) { return $null }
- $line = Get-Content $envFile | Where-Object { $_ -like "$key=*" } | Select-Object -First 1
+ $line = Get-Content $envFile -Encoding UTF8 | Where-Object { $_ -like "$key=*" } | Select-Object -First 1
if ($null -eq $line) { return $null }
- return $line.Substring($key.Length + 1)
+ return $line.Substring($key.Length + 1).Trim('"')
}
+ function NamesOnly($text) { return (($text -replace ':[^,]*', '') -split ',' | ForEach-Object { $_.Trim() } | Where-Object { $_ }) -join ', ' }
+
function ValidPassword($p) { return $p.Length -ge 8 -and $p -match '^[A-Za-z0-9._@%+=!?~^:,/-]+$' }
function Healthy($port, $pass) {
@@ -218,11 +220,29 @@ function Install-GymMane {
$pass = ''
}
+ if ($null -ne $env:GYMMANE_PEOPLE) {
+ $people = $env:GYMMANE_PEOPLE.Trim()
+ } elseif ($update) {
+ $people = "$(EnvValue 'GYMMANE_PEOPLE')"
+ } elseif (-not $quiet -and (YesNo 'Will more than one person use it, each with their own data?' $false)) {
+ $people = ''
+ while (-not $people) {
+ $n = Ask 'Their names, separated by commas (Ana, Pablo)' ''
+ if ($n -match '["\\]') { Note 'Names without quotes or backslashes.' }
+ elseif ($n -match '[\p{L}\p{N}]') { $people = $n }
+ else { Note 'Type at least one name.' }
+ }
+ } else {
+ $people = ''
+ }
+ if ($people -match '"') { throw 'GYMMANE_PEOPLE cannot have quotes in it.' }
+ $who = NamesOnly $people
+
$openPort = $false
if ($admin) { $openPort = YesNo "Open port $port in Windows Firewall so other devices can reach it?" $true }
$starts = if ($admin) { 'starts with Windows' } else { 'starts when you log in' }
- BoxFit @($home_, $starts)
+ BoxFit @($home_, $starts, $who)
Line ''
BoxTop
if ($update) { BoxRow 'Ready to update' "${B}Ready to update$R" } else { BoxRow 'Ready to install' "${B}Ready to install$R" }
@@ -231,13 +251,14 @@ function Install-GymMane {
BoxPair 'Runs with' $starts
BoxPair 'Port' $port
BoxPair 'Password' $(if ($pass) { 'yes' } else { 'no, open to your network' })
+ BoxPair 'People' $(if ($who) { $who } else { 'just you' })
BoxBottom
Line ''
if (-not (YesNo 'Go ahead?' $true)) { Line ''; return }
$extra = @()
if (Test-Path $envFile) {
- $extra = @(Get-Content $envFile | Where-Object { $_ -match '^GYMMANE_' -and $_ -notmatch '^GYMMANE_(PASSWORD|PORT|DATA|WEB)=' })
+ $extra = @(Get-Content $envFile -Encoding UTF8 | Where-Object { $_ -match '^GYMMANE_' -and $_ -notmatch '^GYMMANE_(PASSWORD|PORT|DATA|WEB|PEOPLE)=' })
}
Step 'Installing GymMane'
@@ -268,11 +289,12 @@ function Install-GymMane {
Remove-Item -Recurse -Force $tmp -ErrorAction SilentlyContinue
}
- Set-Content -Path $envFile -Value (@("GYMMANE_PASSWORD=$pass", "GYMMANE_PORT=$port") + $extra) -Encoding ascii
+ [IO.File]::WriteAllLines($envFile, [string[]](@("GYMMANE_PASSWORD=$pass", "GYMMANE_PORT=$port") + $(if ($people) { @("GYMMANE_PEOPLE=$people") } else { @() }) + $extra), (New-Object Text.UTF8Encoding $false))
Ok "Saved the settings in $envFile"
$run = Join-Path $home_ 'run.cmd'
Set-Content -Path $run -Encoding ascii -Value @(
'@echo off',
+ 'chcp 65001 >nul',
"cd /d `"$home_`"",
"set GYMMANE_DATA=$data",
"set GYMMANE_WEB=$home_\web",
@@ -323,6 +345,10 @@ function Install-GymMane {
BoxRow ''
BoxRow 'Open it from any device on your network:' "${D}Open it from any device on your network:$R"
foreach ($l in $links) { BoxRow " $l" " $A$B$l$R" }
+ if ($who) {
+ BoxRow ''
+ BoxRow 'Each person picks their name on that page.' "${D}Each person picks their name on that page.$R"
+ }
if ($pass) {
BoxRow ''
if ($generated) {
diff --git a/selfhost/install.sh b/selfhost/install.sh
index b81434a..beab8dc 100644
--- a/selfhost/install.sh
+++ b/selfhost/install.sh
@@ -28,6 +28,7 @@ for arg in "$@"; do
echo " sh install.sh --uninstall remove GymMane (your data is kept)"
echo ""
echo "Environment: GYMMANE_PORT, GYMMANE_PASSWORD (empty = no password), GYMMANE_HOME,"
+ echo " GYMMANE_PEOPLE (\"Ana, Pablo\": one GymMane each, on the same address),"
echo " GYMMANE_ARCHIVE (a release .tar.gz already downloaded, for --binary)"
exit 0 ;;
*) echo "Unknown option: $arg (try --help)"; exit 1 ;;
@@ -244,7 +245,11 @@ fetch() {
env_value() {
[ -f "$HOME_DIR/.env" ] || return 0
- grep "^$1=" "$HOME_DIR/.env" | head -n1 | cut -d= -f2- || true
+ grep "^$1=" "$HOME_DIR/.env" | head -n1 | cut -d= -f2- | sed -e 's/^"//' -e 's/"$//' || true
+}
+
+names_only() {
+ printf '%s' "$1" | sed -e 's/:[^,]*//g' -e 's/ *, */, /g' -e 's/^ *//' -e 's/ *$//'
}
random_password() {
@@ -485,6 +490,29 @@ else
PASS=""
fi
+if [ "${GYMMANE_PEOPLE+set}" = set ]; then
+ PEOPLE="$GYMMANE_PEOPLE"
+elif [ "$ACTION" = update ]; then
+ PEOPLE=$(env_value GYMMANE_PEOPLE)
+elif [ "$TTY" = 1 ]; then
+ if yes_no "Will more than one person use it, each with their own data?" n; then
+ while :; do
+ ask "Their names, separated by commas (Ana, Pablo)" ""
+ case "$REPLY" in
+ *'"'*|*"'"*|*'\'*) note "Names without quotes or backslashes." ;;
+ *[A-Za-z0-9]*) PEOPLE=$REPLY; break ;;
+ *) note "Type at least one name." ;;
+ esac
+ done
+ else
+ PEOPLE=""
+ fi
+else
+ PEOPLE=""
+fi
+case "$PEOPLE" in *'"'*) die "GYMMANE_PEOPLE cannot have quotes in it." ;; esac
+WHO=$(names_only "$PEOPLE")
+
if [ "$MODE" = docker ] && [ -z "$SYNC" ]; then
if yes_no "Also run Syncthing, to share data with the phone app?" n; then SYNC=1; else SYNC=0; fi
fi
@@ -520,7 +548,7 @@ else
fi
if [ -n "$PASS" ]; then PW_TEXT="yes"; else PW_TEXT="no, open to your network"; fi
-box_fit "$HOME_DIR" "$HOW"
+box_fit "$HOME_DIR" "$HOW" "$(names_only "$PEOPLE")"
[ "$TTY" = 0 ] || say ""
box_top
if [ "$ACTION" = update ]; then box_row "Ready to update" "${B}Ready to update${R}"
@@ -530,6 +558,7 @@ box_pair "Folder" "$HOME_DIR"
box_pair "Runs with" "$HOW"
box_pair "Port" "$PORT"
box_pair "Password" "$PW_TEXT"
+if [ -n "$WHO" ]; then box_pair "People" "$WHO"; else box_pair "People" "just you"; fi
if [ "$MODE" = docker ]; then
if [ "$SYNC" = 1 ]; then box_pair "Syncthing" "yes"; else box_pair "Syncthing" "no"; fi
fi
@@ -542,7 +571,7 @@ fi
mkdir -p "$HOME_DIR"
EXTRA=""
if [ -f "$HOME_DIR/.env" ]; then
- EXTRA=$(grep -E '^GYMMANE_' "$HOME_DIR/.env" | grep -vE '^GYMMANE_(PASSWORD|PORT|DATA|WEB|SYNCTHING)=' || true)
+ EXTRA=$(grep -E '^GYMMANE_' "$HOME_DIR/.env" | grep -vE '^GYMMANE_(PASSWORD|PORT|DATA|WEB|SYNCTHING|PEOPLE)=' || true)
fi
if [ "$ROOT" = 1 ]; then OWNER="${SUDO_UID:-1000}"; GROUP="${SUDO_GID:-$OWNER}"
@@ -552,6 +581,7 @@ write_env() {
{
say "GYMMANE_PASSWORD=$PASS"
say "GYMMANE_PORT=$PORT"
+ [ -z "$PEOPLE" ] || say "GYMMANE_PEOPLE=\"$PEOPLE\""
if [ "$MODE" = binary ]; then
say "GYMMANE_DATA=$DATA_DIR"
say "GYMMANE_WEB=$HOME_DIR/web"
@@ -683,6 +713,8 @@ LINKS="http://localhost:$PORT"
for ip in $IPS; do LINKS="$LINKS http://$ip:$PORT"; done
BOXW=52
for l in $LINKS; do box_fit "$l"; done
+ONCE="Once it runs, open it from any device on your network:"
+[ "${#ONCE}" -le "$BOXW" ] || BOXW=${#ONCE}
if [ "$GENERATED" = 1 ]; then box_fit "$PASS (any user name works)"; fi
say ""
@@ -697,6 +729,10 @@ else
box_row "Once it runs, open it from any device on your network:" "${D}Once it runs, open it from any device on your network:${R}"
fi
for l in $LINKS; do box_row " $l" " ${A}${B}$l${R}"; done
+if [ -n "$WHO" ]; then
+ box_row ""
+ box_row "Each person picks their name on that page." "${D}Each person picks their name on that page.${R}"
+fi
if [ -n "$PASS" ]; then
box_row ""
if [ "$GENERATED" = 1 ]; then
diff --git a/selfhost/nas/compose.yaml b/selfhost/nas/compose.yaml
new file mode 100644
index 0000000..c050bcf
--- /dev/null
+++ b/selfhost/nas/compose.yaml
@@ -0,0 +1,56 @@
+name: gymmane
+
+services:
+ gymmane:
+ image: ghcr.io/inlitx/gymmane:latest
+ container_name: gymmane
+ restart: unless-stopped
+ ports:
+ - "8080:8080"
+ volumes:
+ - gymmane-data:/data
+ environment:
+ GYMMANE_PASSWORD: ""
+ GYMMANE_PEOPLE: ""
+ x-casaos:
+ ports:
+ - container: "8080"
+ description:
+ en_us: Web page of GymMane
+ volumes:
+ - container: /data
+ description:
+ en_us: Your workouts, photos and daily copies
+ envs:
+ - container: GYMMANE_PASSWORD
+ description:
+ en_us: Password to open GymMane, 8 or more characters. Empty means no password
+ - container: GYMMANE_PEOPLE
+ description:
+ en_us: "Several people, each with their own data: names separated by commas"
+
+volumes:
+ gymmane-data:
+
+x-casaos:
+ architectures:
+ - amd64
+ - arm64
+ main: gymmane
+ author: InlitX
+ developer: InlitX
+ category: Health
+ icon: https://raw.githubusercontent.com/InlitX/GymMane/main/fastlane/metadata/android/en-US/images/icon.png
+ screenshot_link:
+ - https://raw.githubusercontent.com/InlitX/GymMane/main/docs/screenshots/01-home.png
+ - https://raw.githubusercontent.com/InlitX/GymMane/main/docs/screenshots/02-progress.png
+ - https://raw.githubusercontent.com/InlitX/GymMane/main/docs/screenshots/04-session.png
+ title:
+ en_us: GymMane
+ tagline:
+ en_us: Your gym log on your own server
+ description:
+ en_us: Log workouts, routines, progress and nutrition from any browser at home. No account, no cloud, your data stays on this machine. The GymMane phone app can share data with it through Syncthing.
+ port_map: "8080"
+ scheme: http
+ index: /
diff --git a/selfhost/proxmox.sh b/selfhost/proxmox.sh
new file mode 100644
index 0000000..0c2bb91
--- /dev/null
+++ b/selfhost/proxmox.sh
@@ -0,0 +1,319 @@
+#!/bin/sh
+set -eu
+
+REPO="InlitX/GymMane"
+RAW="https://raw.githubusercontent.com/$REPO/main"
+NAME="gymmane"
+YES=0
+
+for arg in "$@"; do
+ case "$arg" in
+ -y|--yes) YES=1 ;;
+ -h|--help)
+ echo "GymMane for Proxmox VE: makes a small Debian container and installs GymMane in it."
+ echo ""
+ echo " sh proxmox.sh guided install, or update if it is already there"
+ echo " sh proxmox.sh --yes no questions, use the defaults"
+ echo ""
+ echo "Environment: GYMMANE_CTID, GYMMANE_STORAGE, GYMMANE_BRIDGE (vmbr0), GYMMANE_IP (dhcp,"
+ echo " or 192.168.1.50/24,gw=192.168.1.1), GYMMANE_MEMORY (512), GYMMANE_DISK (2),"
+ echo " GYMMANE_PORT (8080), GYMMANE_PASSWORD (empty = no password), GYMMANE_PEOPLE"
+ exit 0 ;;
+ *) echo "Unknown option: $arg (try --help)"; exit 1 ;;
+ esac
+done
+
+if [ -t 1 ] && [ -z "${NO_COLOR:-}" ] && [ "${TERM:-}" != dumb ]; then
+ esc=$(printf '\033')
+ R="$esc[0m"; B="$esc[1m"; A="$esc[38;5;180m"; G="$esc[38;5;108m"; D="$esc[38;5;244m"
+ F="$esc[38;5;239m"; Y="$esc[38;5;179m"; E="$esc[38;5;167m"
+else
+ R=""; B=""; A=""; G=""; D=""; F=""; Y=""; E=""
+fi
+
+LIVE=0
+CLR=""
+if [ -t 1 ]; then LIVE=1; CLR="$(printf '\033[K')"; fi
+TTY=0
+if [ "$YES" = 0 ] && (: </dev/tty) 2>/dev/null; then TTY=1; fi
+LOGF=$(mktemp)
+trap 'rm -f "$LOGF"' EXIT
+
+say() { printf '%s\n' "$*"; }
+have() { command -v "$1" >/dev/null 2>&1; }
+ok() { printf ' %s+%s %s\n' "$G" "$R" "$*"; }
+note() { printf ' %s- %s%s\n' "$D" "$*" "$R"; }
+warn() { printf ' %s!%s %s\n' "$Y" "$R" "$*"; }
+die() {
+ printf '\n %sx%s %s\n\n' "$E" "$R" "$*" >&2
+ exit 1
+}
+step() { say ""; say " ${A}${B}$1${R}"; say ""; }
+
+ask() {
+ if [ "$TTY" = 0 ]; then REPLY=$2; return 0; fi
+ printf ' %s?%s %s %s%s%s %s>%s ' "$A" "$R" "$1" "$F" "$2" "$R" "$A" "$R"
+ IFS= read -r REPLY </dev/tty || REPLY=""
+ [ -n "$REPLY" ] || REPLY=$2
+}
+
+yes_no() {
+ if [ "$TTY" = 0 ]; then [ "$2" = y ]; return; fi
+ if [ "$2" = y ]; then hint="Y/n"; else hint="y/N"; fi
+ while :; do
+ printf ' %s?%s %s %s%s%s %s>%s ' "$A" "$R" "$1" "$F" "$hint" "$R" "$A" "$R"
+ IFS= read -r answer </dev/tty || answer=""
+ [ -n "$answer" ] || answer=$2
+ case "$answer" in
+ y|Y|yes|Yes|YES) return 0 ;;
+ n|N|no|No|NO) return 1 ;;
+ *) note "Type y or n." ;;
+ esac
+ done
+}
+
+secret() {
+ printf ' %s?%s %s %s>%s ' "$A" "$R" "$1" "$A" "$R"
+ stty -echo </dev/tty 2>/dev/null || true
+ IFS= read -r REPLY </dev/tty || REPLY=""
+ stty echo </dev/tty 2>/dev/null || true
+ printf '\n'
+}
+
+random_password() {
+ LC_ALL=C tr -dc 'A-HJ-NP-Za-km-z2-9' </dev/urandom 2>/dev/null | head -c 16 || true
+}
+
+valid_password() {
+ case "$1" in
+ *[!A-Za-z0-9._@%+=!?~^:,/-]*) return 1 ;;
+ esac
+ [ "${#1}" -ge 8 ]
+}
+
+names_only() {
+ printf '%s' "$1" | sed -e 's/:[^,]*//g' -e 's/ *, */, /g' -e 's/^ *//' -e 's/ *$//'
+}
+
+pending() { [ "$LIVE" = 0 ] || printf ' %s...%s %s' "$A" "$R" "$1"; }
+done_line() { [ "$LIVE" = 0 ] || printf '\r%s' "$CLR"; }
+
+row() { printf ' %s%-11s%s%s\n' "$D" "$1" "$R" "$2"; }
+
+run() {
+ label=$1; shift
+ pending "$label"
+ if "$@" >>"$LOGF" 2>&1; then done_line; ok "$label"; return 0; fi
+ done_line
+ warn "$label failed:"
+ tail -n 15 "$LOGF" | sed 's/^/ /'
+ return 1
+}
+
+in_ct() { pct exec "$CTID" -- "$@"; }
+
+say ""
+say " ${A}${B}GymMane${R} ${F}-${R} ${B}Proxmox VE${R}"
+say " ${D}A small Debian container with GymMane in it. No account, no cloud.${R}"
+
+[ "$(id -u)" = 0 ] || die "Run this as root in the Proxmox VE shell (Datacenter > your node > Shell)."
+for tool in pct pveam pvesm pvesh; do
+ have "$tool" || die "This is not a Proxmox VE host. On any other Linux, use the normal installer: curl -fsSL $RAW/selfhost/install.sh | sh"
+done
+
+step "This Proxmox"
+ok "$(pveversion 2>/dev/null | head -n1 || echo 'Proxmox VE')"
+
+EXISTING=$(pct list 2>/dev/null | awk -v n="$NAME" 'NR > 1 && $NF == n { print $1 }' | head -n1)
+if [ -n "$EXISTING" ]; then
+ ok "GymMane is already in container $EXISTING"
+ CHOICE=update
+ if [ "$TTY" = 1 ]; then
+ say ""
+ while :; do
+ printf ' %s?%s What do you want to do? %s[U]pdate, [n]ew container, [c]ancel%s %s>%s ' "$A" "$R" "$F" "$R" "$A" "$R"
+ IFS= read -r answer </dev/tty || answer=""
+ case "$answer" in
+ ""|u|U) CHOICE=update; break ;;
+ n|N) CHOICE=new; break ;;
+ c|C) say ""; exit 0 ;;
+ *) note "Type u, n or c." ;;
+ esac
+ done
+ fi
+ if [ "$CHOICE" = update ]; then
+ CTID=$EXISTING
+ step "Updating"
+ if ! pct status "$CTID" | grep -q running; then run "Starting container $CTID" pct start "$CTID" || die "Container $CTID did not start."; fi
+ run "Updating GymMane inside container $CTID" in_ct sh -c "curl -fsSL $RAW/selfhost/install.sh | TERM=dumb sh -s -- --yes" \
+ || die "The update did not finish. Your data is untouched."
+ IP=$(in_ct hostname -I 2>/dev/null | awk '{print $1}')
+ PORT=$(in_ct sh -c 'grep "^GYMMANE_PORT=" /opt/gymmane/.env | cut -d= -f2' 2>/dev/null || echo 8080)
+ say ""
+ say " ${G}+${R} ${B}GymMane is up to date${R}"
+ say ""
+ [ -z "$IP" ] || row "Open" "${A}${B}http://$IP:${PORT:-8080}${R}"
+ row "Container" "$CTID"
+ say ""
+ exit 0
+ fi
+fi
+
+step "Settings"
+[ "$TTY" = 0 ] || { note "Press Enter to keep the value in grey."; say ""; }
+
+CTID="${GYMMANE_CTID:-$(pvesh get /cluster/nextid)}"
+if [ -z "${GYMMANE_CTID:-}" ]; then
+ while :; do
+ ask "Container ID" "$CTID"
+ case "$REPLY" in
+ ''|*[!0-9]*) note "Type a number, 100 or more." ;;
+ *) if [ "$REPLY" -lt 100 ]; then note "Type a number, 100 or more."
+ elif pct status "$REPLY" >/dev/null 2>&1; then note "$REPLY is already taken."
+ else CTID=$REPLY; break; fi ;;
+ esac
+ done
+fi
+pct status "$CTID" >/dev/null 2>&1 && die "Container $CTID already exists. Pick another ID with GYMMANE_CTID."
+
+STORES=$(pvesm status -content rootdir 2>/dev/null | awk 'NR > 1 && $3 == "active" { print $1 }')
+[ -n "$STORES" ] || die "No storage here can hold containers (content type rootdir)."
+STORAGE="${GYMMANE_STORAGE:-}"
+if [ -z "$STORAGE" ]; then
+ STORAGE=$(printf '%s\n' "$STORES" | grep -x 'local-lvm' || printf '%s\n' "$STORES" | head -n1)
+ if [ "$(printf '%s\n' "$STORES" | wc -l)" -gt 1 ]; then
+ while :; do
+ ask "Storage for the container ($(printf '%s' "$STORES" | tr '\n' ' ' | sed 's/ $//'))" "$STORAGE"
+ if printf '%s\n' "$STORES" | grep -qx "$REPLY"; then STORAGE=$REPLY; break; fi
+ note "Type one of: $(printf '%s' "$STORES" | tr '\n' ' ')"
+ done
+ fi
+fi
+
+BRIDGE="${GYMMANE_BRIDGE:-vmbr0}"
+NETIP="${GYMMANE_IP:-dhcp}"
+MEMORY="${GYMMANE_MEMORY:-512}"
+DISK="${GYMMANE_DISK:-2}"
+
+PORT="${GYMMANE_PORT:-8080}"
+if [ -z "${GYMMANE_PORT:-}" ]; then
+ while :; do
+ ask "Port to open GymMane on" "$PORT"
+ case "$REPLY" in
+ ''|*[!0-9]*) note "Type a number between 1 and 65535." ;;
+ *) if [ "$REPLY" -ge 1 ] && [ "$REPLY" -le 65535 ]; then PORT=$REPLY; break; fi
+ note "Type a number between 1 and 65535." ;;
+ esac
+ done
+fi
+
+GENERATED=0
+if [ "${GYMMANE_PASSWORD+set}" = set ]; then
+ PASS="$GYMMANE_PASSWORD"
+ [ -z "$PASS" ] || valid_password "$PASS" || die "GYMMANE_PASSWORD needs 8 or more characters: letters, digits and . _ @ % + = ! ? ~ ^ : , / -"
+elif yes_no "Ask for a password in the browser?" y; then
+ PASS=""
+ if [ "$TTY" = 1 ]; then
+ while :; do
+ secret "Password, or Enter to make one up"
+ [ -n "$REPLY" ] || break
+ if valid_password "$REPLY"; then PASS=$REPLY; break; fi
+ note "8 or more characters: letters, digits and . _ @ % + = ! ? ~ ^ : , / -"
+ done
+ fi
+ if [ -z "$PASS" ]; then PASS=$(random_password); GENERATED=1; fi
+else
+ PASS=""
+fi
+
+if [ "${GYMMANE_PEOPLE+set}" = set ]; then
+ PEOPLE="$GYMMANE_PEOPLE"
+elif [ "$TTY" = 1 ] && yes_no "Will more than one person use it, each with their own data?" n; then
+ while :; do
+ ask "Their names, separated by commas (Ana, Pablo)" ""
+ case "$REPLY" in
+ *'"'*|*"'"*|*'\'*) note "Names without quotes or backslashes." ;;
+ *[A-Za-z0-9]*) PEOPLE=$REPLY; break ;;
+ *) note "Type at least one name." ;;
+ esac
+ done
+else
+ PEOPLE=""
+fi
+case "$PEOPLE" in *'"'*|*"'"*) die "GYMMANE_PEOPLE cannot have quotes in it." ;; esac
+WHO=$(names_only "$PEOPLE")
+
+say ""
+row "Container" "$CTID ${D}($NAME, Debian, unprivileged, starts with Proxmox)${R}"
+row "Storage" "$STORAGE ${D}(${DISK} GB)${R}"
+row "Memory" "$MEMORY MB"
+row "Network" "$BRIDGE, $NETIP"
+row "Port" "$PORT"
+if [ -n "$PASS" ]; then row "Password" "yes"; else row "Password" "no, open to your network"; fi
+if [ -n "$WHO" ]; then row "People" "$WHO"; else row "People" "just you"; fi
+if [ "$TTY" = 1 ]; then
+ say ""
+ yes_no "Go ahead?" y || { say ""; exit 0; }
+fi
+
+step "Creating the container"
+TSTORE=$(pvesm status -content vztmpl 2>/dev/null | awk 'NR > 1 && $3 == "active" { print $1 }' | grep -x local || true)
+[ -n "$TSTORE" ] || TSTORE=$(pvesm status -content vztmpl 2>/dev/null | awk 'NR > 1 && $3 == "active" { print $1 }' | head -n1)
+[ -n "$TSTORE" ] || die "No storage here can hold container templates (content type vztmpl)."
+run "Refreshing the template list" pveam update || warn "Using the template list Proxmox already has"
+TEMPLATE=$(pveam available --section system 2>/dev/null | awk '{ print $2 }' | grep -E '^debian-[0-9]+-standard_' | sort -V | tail -n1)
+[ -n "$TEMPLATE" ] || die "Could not find a Debian template. Check that this Proxmox can reach the internet."
+if pveam list "$TSTORE" 2>/dev/null | grep -q "$TEMPLATE"; then
+ ok "Template $TEMPLATE is already here"
+else
+ run "Downloading $TEMPLATE" pveam download "$TSTORE" "$TEMPLATE" || die "Could not download the Debian template."
+fi
+
+run "Creating container $CTID" pct create "$CTID" "$TSTORE:vztmpl/$TEMPLATE" \
+ --hostname "$NAME" \
+ --cores 1 \
+ --memory "$MEMORY" \
+ --swap 256 \
+ --rootfs "$STORAGE:$DISK" \
+ --net0 "name=eth0,bridge=$BRIDGE,ip=$NETIP" \
+ --unprivileged 1 \
+ --features nesting=1 \
+ --onboot 1 \
+ --tags gymmane \
+ --description "GymMane, your gym log on your own server. Update: run the Proxmox command again." \
+ || die "Proxmox could not create the container."
+run "Starting it" pct start "$CTID" || die "Container $CTID did not start."
+
+i=0
+pending "Waiting for the network"
+until in_ct sh -c 'getent hosts raw.githubusercontent.com >/dev/null 2>&1'; do
+ i=$((i + 1))
+ if [ "$i" -ge 60 ]; then done_line; die "Container $CTID has no internet. Check the bridge ($BRIDGE) and DHCP, or set GYMMANE_IP."; fi
+ sleep 1
+done
+done_line; ok "Container $CTID is online"
+
+step "Installing GymMane"
+run "Installing curl" in_ct sh -c 'command -v curl >/dev/null || { apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq curl ca-certificates; }' \
+ || die "Could not install curl inside the container."
+run "Installing GymMane, this can take a minute" in_ct env GYMMANE_PORT="$PORT" GYMMANE_PASSWORD="$PASS" GYMMANE_PEOPLE="$PEOPLE" TERM=dumb \
+ sh -c "curl -fsSL $RAW/selfhost/install.sh | sh -s -- --yes --binary" \
+ || die "GymMane did not install. The container stays, so you can look inside with: pct enter $CTID"
+
+IP=$(in_ct hostname -I 2>/dev/null | awk '{print $1}')
+
+say ""
+say " ${G}+${R} ${B}GymMane is running${R}"
+say ""
+if [ -n "$IP" ]; then row "Open" "${A}${B}http://$IP:$PORT${R} ${D}from any device on your network${R}"
+else row "Open" "http://<container-ip>:$PORT"; fi
+[ -z "$WHO" ] || row "" "${D}Each person picks their name on that page.${R}"
+if [ -n "$PASS" ]; then
+ if [ "$GENERATED" = 1 ]; then row "Password" "${B}$PASS${R} ${D}made up for you, any user name works${R}"
+ else row "Password" "the one you chose"; fi
+fi
+row "Container" "$CTID ($NAME), starts with Proxmox"
+row "Data" "/opt/gymmane/data inside it, included in Proxmox backups of $CTID"
+row "Settings" "pct enter $CTID, then edit /opt/gymmane/.env"
+row "Update" "run this same command again"
+say ""
diff --git a/selfhost/unraid/gymmane.xml b/selfhost/unraid/gymmane.xml
new file mode 100644
index 0000000..c63e95c
--- /dev/null
+++ b/selfhost/unraid/gymmane.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<Container version="2">
+ <Name>GymMane</Name>
+ <Repository>ghcr.io/inlitx/gymmane:latest</Repository>
+ <Registry>https://github.com/InlitX/GymMane/pkgs/container/gymmane</Registry>
+ <Network>bridge</Network>
+ <Privileged>false</Privileged>
+ <Support>https://github.com/InlitX/GymMane/issues</Support>
+ <Project>https://github.com/InlitX/GymMane</Project>
+ <Overview>Your gym log on your own server. Log workouts, routines, progress and nutrition from any browser at home. No account, no cloud: everything stays in your appdata folder. The GymMane phone app (Android, F-Droid) can share data with it through Syncthing. Guide: https://github.com/InlitX/GymMane/blob/main/SELFHOST.md</Overview>
+ <Category>Productivity: Tools:Utilities</Category>
+ <WebUI>http://[IP]:[PORT:8080]/</WebUI>
+ <TemplateURL>https://raw.githubusercontent.com/InlitX/GymMane/main/selfhost/unraid/gymmane.xml</TemplateURL>
+ <Icon>https://raw.githubusercontent.com/InlitX/GymMane/main/fastlane/metadata/android/en-US/images/icon.png</Icon>
+ <ExtraParams>--user 0:0</ExtraParams>
+ <Config Name="Web page port" Target="8080" Default="8080" Mode="tcp" Description="Port to open GymMane on." Type="Port" Display="always" Required="true" Mask="false">8080</Config>
+ <Config Name="Data" Target="/data" Default="/mnt/user/appdata/gymmane" Mode="rw" Description="Your workouts, photos and daily copies. Back up this folder and you have everything." Type="Path" Display="always" Required="true" Mask="false">/mnt/user/appdata/gymmane</Config>
+ <Config Name="Password" Target="GYMMANE_PASSWORD" Default="" Mode="" Description="Password to open GymMane, 8 or more characters. Leave it empty for no password." Type="Variable" Display="always" Required="false" Mask="true"></Config>
+ <Config Name="People" Target="GYMMANE_PEOPLE" Default="" Mode="" Description="Several people, each with their own data: names separated by commas, like Ana, Pablo. Leave it empty if it is just you." Type="Variable" Display="always" Required="false" Mask="false"></Config>
+ <Config Name="Days of daily copies" Target="GYMMANE_KEEP_DAYS" Default="30" Mode="" Description="How many daily copies of your data to keep in the history folder." Type="Variable" Display="advanced" Required="false" Mask="false">30</Config>
+</Container>