[
{
"id": "jellyfin",
"name": "Jellyfin",
"description": "Stream your movies, shows and music to any device. Uses the phone's hardware video encoder.",
"port": 8096,
"size": "≈ 420 MB",
"install": "apk add --no-cache jellyfin jellyfin-web\n# Hardware encoding: Jellyfin's V4L2 option is routed to Android's MediaCodec by the\n# ffmpeg shim. Only on first install, so a user's own choice is kept.\nmkdir -p /var/lib/jellyfin/config\n[ -e /var/lib/jellyfin/config/encoding.xml ] || cat > /var/lib/jellyfin/config/encoding.xml <<'XML'\n\n\n v4l2m2m\n true\n\nXML\n# Torrent downloads show up in Jellyfin: a \"Downloads\" library (mixed movies and shows,\n# watched for new files) once Jellyfin and a torrent client are installed. Only once, so a user who\n# removes the library in Jellyfin keeps it removed.\nif [ -x /usr/bin/jellyfin ] && { [ -x /usr/bin/qbittorrent-nox ] || [ -x /usr/bin/aria2c ]; } && [ ! -e /var/lib/jellyfin/.downloads-library ]; then\n mkdir -p /media/Downloads /var/lib/jellyfin/root/default/Downloads\n cd /var/lib/jellyfin/root/default/Downloads\n printf /media/Downloads > Downloads.mblink\n cat > options.xml <<'XML'\n\n\n true\n true\n true\n false\n false\n false\n false\n false\n \n \n /media/Downloads\n \n \n false\n true\n false\n false\n false\n 0\n Specials\n \n \n \n \n \n false\n true\n true\n true\n \n \n \n /\n |\n ;\n \\\n \n \n false\n AllowAll\n \n\nXML\n touch /var/lib/jellyfin/.downloads-library\nfi\n# Movies and Shows libraries when Radarr or Sonarr is installed (see media-stack).\n[ ! -x /usr/local/lib/homedroid/media-stack ] || /usr/local/lib/homedroid/media-stack libraries",
"uninstall": "apk del jellyfin jellyfin-web",
"data": [
"/var/lib/jellyfin",
"/var/cache/jellyfin"
],
"run": [
"/usr/bin/jellyfin",
"--datadir",
"/var/lib/jellyfin",
"--cachedir",
"/var/cache/jellyfin",
"--webdir",
"/usr/share/webapps/jellyfin-web",
"--ffmpeg",
"/usr/local/lib/homedroid/ffmpeg"
],
"env": {
"DOTNET_gcServer": "0",
"DOTNET_GCHeapHardLimitPercent": "0x32"
},
"storage": {
"path": "/media",
"label": "Media library",
"shared": "Media"
},
"update": {
"kind": "apk",
"packages": [
"jellyfin",
"jellyfin-web",
"jellyfin-ffmpeg"
]
}
},
{
"id": "qbittorrent",
"name": "qBittorrent",
"description": "Torrent client. Downloads go to the media library's Downloads folder, in order (stream while downloading), and keep seeding. Add from SSH: torrent 'magnet:?…'",
"port": 8081,
"size": "≈ 60 MB",
"install": "apk add --no-cache qbittorrent-nox curl jq\nmkdir -p /media/Downloads /var/lib/qbittorrent/qBittorrent/config\n# Only on first install, so the user's own settings are kept.\n[ -e /var/lib/qbittorrent/qBittorrent/config/qBittorrent.conf ] || cat > /var/lib/qbittorrent/qBittorrent/config/qBittorrent.conf <<'CONF'\n[LegalNotice]\nAccepted=true\n\n[BitTorrent]\nSession\\DefaultSavePath=/media/Downloads\nSession\\TempPathEnabled=false\nSession\\GlobalMaxRatio=-1\nSession\\GlobalMaxSeedingMinutes=-1\nSession\\QueueingSystemEnabled=false\n\n[Preferences]\nWebUI\\Port=8081\nWebUI\\LocalHostAuth=false\nCONF\ncat > /usr/local/bin/torrent <<'SH'\n#!/bin/sh\n# torrent ... add, downloading pieces in order\n# torrent list show progress\napi=http://127.0.0.1:8081/api/v2\nif ! curl -fsS -o /dev/null \"$api/app/version\" 2>/dev/null; then\n echo 'qBittorrent is not running: start the server in the Homedroid app.' >&2; exit 1\nfi\ncase $1 in\n''|-h|--help) sed -n '2,3s/^# //p' \"$0\"; exit 2 ;;\nlist) curl -fsS \"$api/torrents/info\" | jq -r '.[] | \"\\(.progress * 100 | floor)%\\t\\(.state)\\t\\(.name)\"'; exit ;;\nesac\nfor link do\n curl -fsS -F \"urls=$link\" -F sequentialDownload=true -F firstLastPiecePrio=true \"$api/torrents/add\" >/dev/null &&\n echo \"Added: $link\"\ndone\nSH\nchmod +x /usr/local/bin/torrent\n# Torrent downloads show up in Jellyfin: a \"Downloads\" library (mixed movies and shows,\n# watched for new files) once Jellyfin and a torrent client are installed. Only once, so a user who\n# removes the library in Jellyfin keeps it removed.\nif [ -x /usr/bin/jellyfin ] && { [ -x /usr/bin/qbittorrent-nox ] || [ -x /usr/bin/aria2c ]; } && [ ! -e /var/lib/jellyfin/.downloads-library ]; then\n mkdir -p /media/Downloads /var/lib/jellyfin/root/default/Downloads\n cd /var/lib/jellyfin/root/default/Downloads\n printf /media/Downloads > Downloads.mblink\n cat > options.xml <<'XML'\n\n\n true\n true\n true\n false\n false\n false\n false\n false\n \n \n /media/Downloads\n \n \n false\n true\n false\n false\n false\n 0\n Specials\n \n \n \n \n \n false\n true\n true\n true\n \n \n \n /\n |\n ;\n \\\n \n \n false\n AllowAll\n \n\nXML\n touch /var/lib/jellyfin/.downloads-library\nfi",
"uninstall": "apk del qbittorrent-nox; rm -f /usr/local/bin/torrent",
"data": [
"/var/lib/qbittorrent"
],
"run": [
"/usr/bin/qbittorrent-nox",
"--profile=/var/lib/qbittorrent",
"--confirm-legal-notice"
],
"env": {},
"storage": {
"path": "/media",
"label": "Media library",
"shared": "Media"
},
"notice": {
"pattern": "temporary password is provided for this session: (\\S+)",
"text": "Web UI login: admin / $1 (temporary; set your own under Tools → Options → Web UI)"
},
"update": {
"kind": "apk",
"packages": [
"qbittorrent-nox"
]
}
},
{
"id": "aria2",
"name": "aria2",
"description": "Lightweight torrent client, about 10 MB of memory: an alternative to qBittorrent with no web page of its own. Downloads go to the media library's Downloads folder and seed to a ratio of 1. Radarr, Sonarr and Prowlarr use it through its RPC on port 6800; add from SSH: torrent 'magnet:?…'",
"port": 6800,
"size": "≈ 5 MB",
"install": "apk add --no-cache aria2 curl jq\nmkdir -p /media/Downloads /var/lib/aria2\ntouch /var/lib/aria2/session\n# Only on first install, so the user's own settings and RPC secret are kept.\nif [ ! -e /var/lib/aria2/aria2.conf ]; then\n secret=$(head -c 16 /dev/urandom | od -An -tx1 | tr -d ' \\n')\n cat > /var/lib/aria2/aria2.conf < /usr/local/bin/homedroid-aria2 <<'SH'\n#!/bin/sh\n# Starts aria2 for Homedroid; the module card shows the RPC secret from this line.\necho \"RPC secret: $(sed -n 's/^rpc-secret=//p' /var/lib/aria2/aria2.conf)\"\nexec aria2c --conf-path=/var/lib/aria2/aria2.conf\nSH\nchmod +x /usr/local/bin/homedroid-aria2\n# The torrent helper talks to aria2, unless qBittorrent is installed and already provides it.\nif [ ! -x /usr/bin/qbittorrent-nox ]; then\n cat > /usr/local/bin/torrent <<'SH'\n#!/bin/sh\n# torrent ... add to aria2\n# torrent list show progress\n# Written by Homedroid's aria2 module.\ntok=\"token:$(sed -n 's/^rpc-secret=//p' /var/lib/aria2/aria2.conf)\"\nrpc() { # method [params as a jq array, after the token]\n jq -nc --arg t \"$tok\" --arg m \"$1\" --argjson p \"${2:-[]}\" '{jsonrpc: \"2.0\", id: \"torrent\", method: $m, params: ([$t] + $p)}' |\n curl -fsS --data-binary @- http://127.0.0.1:6800/jsonrpc\n}\nif ! rpc aria2.getVersion >/dev/null 2>&1; then\n echo 'aria2 is not running: start the server in the Homedroid app.' >&2; exit 1\nfi\ncase $1 in\n''|-h|--help) sed -n '2,3s/^# //p' \"$0\"; exit 2 ;;\nlist)\n # A magnet's metadata download is followed by the real one; only the real one is listed.\n for m in aria2.tellActive 'aria2.tellWaiting [0,1000]' 'aria2.tellStopped [0,1000]'; do\n set -- $m; rpc \"$1\" \"${2:-[]}\"\n done | jq -r '.result[] | select((.followedBy // []) == []) | (.totalLength | tonumber) as $t\n | \"\\(if $t > 0 then (.completedLength | tonumber) * 100 / $t | floor else 0 end)%\\t\\(.status)\\t\\(.bittorrent.info.name // (.files[0].path | split(\"/\") | last))\"'\n exit ;;\nesac\nfor link do\n rpc aria2.addUri \"$(jq -nc --arg l \"$link\" '[[$l]]')\" >/dev/null && echo \"Added: $link\"\ndone\nSH\n chmod +x /usr/local/bin/torrent\nfi\n# Torrent downloads show up in Jellyfin: a \"Downloads\" library (mixed movies and shows,\n# watched for new files) once Jellyfin and a torrent client are installed. Only once, so a user who\n# removes the library in Jellyfin keeps it removed.\nif [ -x /usr/bin/jellyfin ] && { [ -x /usr/bin/qbittorrent-nox ] || [ -x /usr/bin/aria2c ]; } && [ ! -e /var/lib/jellyfin/.downloads-library ]; then\n mkdir -p /media/Downloads /var/lib/jellyfin/root/default/Downloads\n cd /var/lib/jellyfin/root/default/Downloads\n printf /media/Downloads > Downloads.mblink\n cat > options.xml <<'XML'\n\n\n true\n true\n true\n false\n false\n false\n false\n false\n \n \n /media/Downloads\n \n \n false\n true\n false\n false\n false\n 0\n Specials\n \n \n \n \n \n false\n true\n true\n true\n \n \n \n /\n |\n ;\n \\\n \n \n false\n AllowAll\n \n\nXML\n touch /var/lib/jellyfin/.downloads-library\nfi",
"uninstall": "apk del aria2; rm -f /usr/local/bin/homedroid-aria2; grep -qs \"aria2 module\" /usr/local/bin/torrent && rm -f /usr/local/bin/torrent; true",
"data": [
"/var/lib/aria2"
],
"run": [
"/usr/local/bin/homedroid-aria2"
],
"env": {},
"storage": {
"path": "/media",
"label": "Media library",
"shared": "Media"
},
"notice": {
"pattern": "RPC secret: (\\S+)",
"text": "RPC on this phone only, port 6800, path /jsonrpc, secret $1 (Radarr, Sonarr and Prowlarr are connected for you)"
},
"update": {
"kind": "apk",
"packages": [
"aria2"
]
}
},
{
"id": "prowlarr",
"name": "Prowlarr",
"description": "Keeps your torrent indexers in one place and hands them to Radarr and Sonarr, so you add each site once. Connected to Radarr, Sonarr and qBittorrent automatically.",
"port": 9696,
"size": "≈ 230 MB",
"install": "/usr/local/lib/homedroid/media-stack install prowlarr",
"uninstall": "rm -rf /opt/Prowlarr",
"data": [
"/var/lib/prowlarr"
],
"run": [
"/usr/local/lib/homedroid/media-stack",
"run",
"prowlarr"
],
"env": {
"DOTNET_gcServer": "0",
"DOTNET_GCHeapHardLimitPercent": "0x19",
"TMPDIR": "/tmp"
},
"storage": {
"path": "/media",
"label": "Media library",
"shared": "Media"
},
"notice": {
"pattern": "^Homedroid media stack: (.+)$",
"text": "$1"
},
"update": {
"kind": "stamp",
"file": "/opt/Prowlarr/.homedroid-build",
"source": "media-stack"
}
},
{
"id": "radarr",
"name": "Radarr",
"description": "Finds, downloads and files movies for you. Sends downloads to qBittorrent and files finished movies in Movies, which Jellyfin shows as its own library.",
"port": 7878,
"size": "≈ 250 MB",
"install": "/usr/local/lib/homedroid/media-stack install radarr",
"uninstall": "rm -rf /opt/Radarr",
"data": [
"/var/lib/radarr"
],
"run": [
"/usr/local/lib/homedroid/media-stack",
"run",
"radarr"
],
"env": {
"DOTNET_gcServer": "0",
"DOTNET_GCHeapHardLimitPercent": "0x19",
"TMPDIR": "/tmp"
},
"storage": {
"path": "/media",
"label": "Media library",
"shared": "Media"
},
"notice": {
"pattern": "^Homedroid media stack: (.+)$",
"text": "$1"
},
"update": {
"kind": "stamp",
"file": "/opt/Radarr/.homedroid-build",
"source": "media-stack"
}
},
{
"id": "sonarr",
"name": "Sonarr",
"description": "Does the same for TV: watches for new episodes, downloads them with qBittorrent and files them by show and season in Shows, a Jellyfin library. This is Sonarr 5, Sonarr's test release: version 4 can't run on Android.",
"port": 8989,
"size": "≈ 260 MB",
"arches": [
"arm64",
"amd64"
],
"install": "/usr/local/lib/homedroid/media-stack install sonarr",
"uninstall": "rm -rf /opt/Sonarr",
"data": [
"/var/lib/sonarr"
],
"run": [
"/usr/local/lib/homedroid/media-stack",
"run",
"sonarr"
],
"env": {
"DOTNET_gcServer": "0",
"DOTNET_GCHeapHardLimitPercent": "0x19",
"TMPDIR": "/tmp"
},
"storage": {
"path": "/media",
"label": "Media library",
"shared": "Media"
},
"notice": {
"pattern": "^Homedroid media stack: (.+)$",
"text": "$1"
},
"update": {
"kind": "stamp",
"file": "/opt/Sonarr/.homedroid-build",
"source": "media-stack"
}
},
{
"id": "seerr",
"name": "Jellyseerr (Seerr)",
"description": "A friendly page for finding movies and shows and asking for them; requests go to Radarr and Sonarr. Jellyseerr is now called Seerr. Sign in with your Jellyfin account; Radarr and Sonarr are added for you after that.",
"port": 5055,
"size": "≈ 400 MB",
"arches": [
"arm64",
"amd64"
],
"images": {
"server": "ghcr.io/seerr-team/seerr:v3.5.2"
},
"install": "apk add --no-cache curl jq",
"uninstall": "true",
"data": [],
"run": [],
"services": [
{
"name": "server",
"image": "server",
"run": [
"/usr/local/bin/node",
"dist/index.js"
],
"env": {
"NODE_ENV": "production",
"PORT": "5055",
"NODE_OPTIONS": "--max-old-space-size=384"
},
"binds": [
[
"@data/config",
"/app/config"
]
]
},
{
"name": "link",
"run": [
"/usr/local/lib/homedroid/media-stack",
"seerr-link"
],
"binds": [
[
"@data/config",
"/var/lib/seerr"
]
]
}
],
"notice": {
"pattern": "^Homedroid media stack: (.+)$",
"text": "$1"
},
"update": {
"kind": "oci"
}
},
{
"id": "homeassistant",
"name": "Home Assistant",
"description": "Home automation hub. Network and cloud integrations work; USB radios and Bluetooth need root.",
"port": 8123,
"size": "≈ 900 MB",
"install": "apk add --no-cache python3 uv ffmpeg libjpeg-turbo libstdc++ tzdata ca-certificates\n# proot fakes hard links, which uv's cache linking can't cope with; copy instead.\nexport UV_LINK_MODE=copy\nrm -rf /opt/homeassistant /root/.cache/uv\nuv venv --python /usr/bin/python3 /opt/homeassistant\nuv pip install --python /opt/homeassistant/bin/python --index-strategy unsafe-best-match --extra-index-url https://wheels.home-assistant.io/musllinux-index/ homeassistant\nmkdir -p /var/lib/homeassistant",
"uninstall": "rm -rf /opt/homeassistant",
"data": [
"/var/lib/homeassistant"
],
"run": [
"/opt/homeassistant/bin/hass",
"--config",
"/var/lib/homeassistant"
],
"env": {
"UV_EXTRA_INDEX_URL": "https://wheels.home-assistant.io/musllinux-index/",
"UV_INDEX_STRATEGY": "unsafe-best-match",
"UV_LINK_MODE": "copy"
},
"update": {
"kind": "pypi",
"package": "homeassistant",
"venv": "/opt/homeassistant"
}
},
{
"id": "immich",
"name": "Immich",
"description": "Photo and video backup with the Immich phone apps. Face and object recognition are off: too heavy for phones.",
"port": 2283,
"size": "≈ 1.6 GB",
"arches": [
"arm64",
"amd64"
],
"images": {
"server": "ghcr.io/immich-app/immich-server:v3.2.4",
"postgres": "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0"
},
"install": "apk add --no-cache valkey",
"uninstall": "true",
"data": [],
"run": [],
"services": [
{
"name": "postgres",
"image": "postgres",
"sysvipc": true,
"env": {
"POSTGRES_USER": "postgres",
"POSTGRES_PASSWORD": "{{secret}}",
"POSTGRES_DB": "immich",
"POSTGRES_INITDB_ARGS": "--data-checksums",
"DB_STORAGE_TYPE": "SSD"
},
"args": [
"-c",
"listen_addresses=127.0.0.1",
"-c",
"dynamic_shared_memory_type=mmap",
"-c",
"shared_preload_libraries=vchord.so"
],
"binds": [
[
"@data/postgres",
"/var/lib/postgresql/data"
]
]
},
{
"name": "valkey",
"run": [
"valkey-server",
"--bind",
"127.0.0.1",
"--port",
"6379",
"--dir",
"/var/lib/valkey",
"--save",
"60 1"
]
},
{
"name": "server",
"image": "server",
"env": {
"DB_HOSTNAME": "127.0.0.1",
"DB_USERNAME": "postgres",
"DB_PASSWORD": "{{secret}}",
"DB_DATABASE_NAME": "immich",
"REDIS_HOSTNAME": "127.0.0.1",
"IMMICH_MACHINE_LEARNING_ENABLED": "false",
"IMMICH_PORT": "2283"
},
"binds": [
[
"@storage",
"/data"
]
],
"run": [
"/usr/src/app/server/bin/start.sh"
]
}
],
"storage": {
"path": "/data",
"label": "Photo library"
},
"update": {
"kind": "oci"
}
},
{
"id": "adguard",
"name": "AdGuard Home",
"description": "Network-wide ad and tracker blocking. DNS on port 1053; devices on your tailnet can use the phone as their DNS server directly. Blocklists, statistics and a query log in its web UI.",
"port": 3000,
"size": "≈ 40 MB",
"install": "apk add --no-cache adguardhome apache2-utils\nmkdir -p /var/lib/adguardhome\n# Only on first install, so the user's own settings are kept. An app can't listen below\n# port 1024: plain DNS is on 1053 (Tailscale devices reach it on 53, see Tailscale.kt) and\n# encrypted DNS, once set up, on 8443 (DoH) and 8853 (DoT). All clients may arrive from one\n# address (the router or the Tailscale relay), so there is no per-client rate limit.\nif [ ! -e /var/lib/adguardhome/AdGuardHome.yaml ]; then\n pw=$(tr -dc A-Za-z0-9 < /dev/urandom | head -c 16)\n printf '%s' \"$pw\" > /var/lib/adguardhome/.initial-password\n hash=$(htpasswd -nbB -C 10 admin \"$pw\" | cut -d: -f2-)\n cat > /var/lib/adguardhome/AdGuardHome.yaml </dev/null || { echo \"Checksum mismatch for $1\"; rm -f \"$2\"; exit 1; }\n}\nif [ \"$(cat /usr/local/share/stalwart.version 2>/dev/null)\" != \"$VER/$CLI_VER\" ]; then\n mkdir -p /tmp/stalwart-dl /usr/local/bin /usr/local/share\n cd /tmp/stalwart-dl\n fetch \"https://github.com/stalwartlabs/stalwart/releases/download/v$VER/stalwart-$T.tar.gz\" stalwart.tgz \"$SW\"\n fetch \"https://github.com/stalwartlabs/cli/releases/download/v$CLI_VER/stalwart-cli-$CT.tar.xz\" cli.txz \"$CS\"\n tar xzf stalwart.tgz stalwart\n xz -dc cli.txz | tar x\n cp stalwart /usr/local/bin/stalwart.new\n cp \"stalwart-cli-$CT/stalwart-cli\" /usr/local/bin/stalwart-cli.new\n chmod 755 /usr/local/bin/stalwart.new /usr/local/bin/stalwart-cli.new\n mv /usr/local/bin/stalwart.new /usr/local/bin/stalwart\n mv /usr/local/bin/stalwart-cli.new /usr/local/bin/stalwart-cli\n printf '%s' \"$VER/$CLI_VER\" > /usr/local/share/stalwart.version\n cd /\n rm -rf /tmp/stalwart-dl\nfi\nmkdir -p /var/lib/stalwart\ncat > /usr/local/bin/homedroid-stalwart <<'SH'\n#!/bin/sh\n# Homedroid's launcher for Stalwart. Written by the Mail app's install script; edits are overwritten.\n# Setup files come from the Mail page: setup/bootstrap.json (first start) and setup/plan.ndjson\n# (listeners, domain, outbound route), which is re-applied whenever it changes.\nD=${STALWART_DIR:-/var/lib/stalwart}\nBIN=${STALWART_BIN:-/usr/local/bin/stalwart}\nCLI=${STALWART_CLI:-/usr/local/bin/stalwart-cli}\nRPORT=${STALWART_RECOVERY_PORT:-8799}\nCONF=$D/etc/config.json\nmkdir -p \"$D/etc\" \"$D/data\" \"$D/setup\"\nexport TOKIO_WORKER_THREADS=${TOKIO_WORKER_THREADS:-2}\n\nif [ ! -f \"$D/setup/bootstrap.json\" ]; then\n echo \"Mail server is installed but not set up yet. Open Mail in the dashboard to set up your domain.\"\n while [ ! -f \"$D/setup/bootstrap.json\" ]; do sleep 5; done\nfi\n\n# Starts the server on the loopback-only setup port and waits for it; $1 is the probe object.\ntemp_server() {\n STALWART_RECOVERY_ADMIN=\"admin:$TMPPW\" STALWART_RECOVERY_MODE_PORT=$RPORT \\\n STALWART_RECOVERY_MODE_BIND=127.0.0.1 \"$@\" \"$BIN\" --config \"$CONF\" &\n TMPPID=$!\n i=0\n until \"$CLI\" --url \"http://127.0.0.1:$RPORT\" --user admin --password \"$TMPPW\" get \"$PROBE\" >/dev/null 2>&1; do\n i=$((i + 1))\n if [ $i -gt 90 ] || ! kill -0 \"$TMPPID\" 2>/dev/null; then echo \"Setup server did not start\"; return 1; fi\n sleep 1\n done\n}\nstop_temp() { kill \"$TMPPID\" 2>/dev/null; wait \"$TMPPID\" 2>/dev/null; }\n\nTMPPW=$(tr -dc A-Za-z0-9 < /dev/urandom | head -c 24)\n\nif [ ! -f \"$CONF\" ]; then\n echo \"First start: creating the mail server's database…\"\n PROBE=Bootstrap\n temp_server env || exit 1\n out=$(\"$CLI\" --url \"http://127.0.0.1:$RPORT\" --user admin --password \"$TMPPW\" --no-color \\\n update Bootstrap --file \"$D/setup/bootstrap.json\" 2>&1)\n rc=$?\n stop_temp\n user=$(printf '%s\\n' \"$out\" | sed -n 's/^ *username: \"\\(.*\\)\"$/\\1/p')\n pass=$(printf '%s\\n' \"$out\" | sed -n 's/^ *secret: \"\\(.*\\)\"$/\\1/p')\n if [ $rc -ne 0 ] || [ -z \"$pass\" ] || [ ! -f \"$CONF\" ]; then\n echo \"Setup failed: $out\"\n rm -f \"$CONF\"\n exit 1\n fi\n umask 077\n printf '%s' \"$user\" > \"$D/admin-user\"\n printf '%s' \"$pass\" > \"$D/admin-password\"\nfi\n\nif [ -f \"$D/setup/plan.ndjson\" ]; then\n want=$(sha256sum \"$D/setup/plan.ndjson\" | cut -d' ' -f1)\n if [ \"$(cat \"$D/etc/.plan-applied\" 2>/dev/null)\" != \"$want\" ]; then\n echo \"Applying mail settings…\"\n PROBE=SystemSettings\n temp_server env STALWART_RECOVERY_MODE=1 || exit 1\n \"$CLI\" --url \"http://127.0.0.1:$RPORT\" --user admin --password \"$TMPPW\" --no-color \\\n apply --file \"$D/setup/plan.ndjson\" 2>&1\n rc=$?\n stop_temp\n if [ $rc -ne 0 ]; then echo \"Applying the mail settings failed\"; exit 1; fi\n printf '%s' \"$want\" > \"$D/etc/.plan-applied\"\n fi\nfi\n\necho \"Mail admin login: $(cat \"$D/admin-user\") / $(cat \"$D/admin-password\")\"\nexec \"$BIN\" --config \"$CONF\"\nSH\nchmod +x /usr/local/bin/homedroid-stalwart",
"uninstall": "rm -f /usr/local/bin/stalwart /usr/local/bin/stalwart-cli /usr/local/bin/homedroid-stalwart /usr/local/share/stalwart.version",
"data": [
"/var/lib/stalwart"
],
"run": [
"/usr/local/bin/homedroid-stalwart"
],
"env": {},
"storage": {
"path": "/var/lib/stalwart/data",
"label": "Mail"
},
"notice": {
"pattern": "Mail admin login: (.+)$",
"text": "Web admin login: $1 · open Mail in the dashboard for DNS records and mail app settings"
},
"update": {
"kind": "stamp",
"file": "/usr/local/share/stalwart.version",
"target": "1.2.0/2.0.0"
}
},
{
"id": "syncthing",
"name": "Syncthing",
"description": "Keeps folders in sync between this phone and your computers and other phones, directly and encrypted, with no cloud account. Add your other devices with this phone's device ID (Actions → Show ID in its web UI); new folders go in Synced folders. Sync on port 22000.",
"port": 8384,
"size": "≈ 35 MB",
"install": "apk add --no-cache syncthing\nmkdir -p /var/lib/syncthing /sync\n# Only on first install, so the user's own settings are kept. The web UI listens on all\n# addresses (it is the only way to manage Syncthing here), so it gets a login. New folders\n# are suggested under /sync, the storage path, and don't copy file permissions (SD cards and\n# USB drives can't keep them). No default folder: you add the folders you want.\n# Anonymous usage reports and crash reports stay off; discovery and relays stay on, as\n# Syncthing needs them to find your other devices.\nif [ ! -e /var/lib/syncthing/config.xml ]; then\n pw=$(tr -dc A-Za-z0-9 < /dev/urandom | head -c 16)\n ( umask 077; printf '%s' \"$pw\" > /var/lib/syncthing/.initial-password )\n STNODEFAULTFOLDER=1 syncthing generate --home=/var/lib/syncthing --gui-user=admin --gui-password=\"$pw\" --no-port-probing || exit 1\n sed -i \\\n -e 's#127\\.0\\.0\\.1:8384#0.0.0.0:8384#' \\\n -e 's#[^<]*#-1#' \\\n -e 's#[^<]*#false#' \\\n -e 's#/,/<\\/defaults>/s#ignorePerms=\"false\"#ignorePerms=\"true\"#' \\\n /var/lib/syncthing/config.xml\nfi",
"uninstall": "apk del syncthing",
"data": [
"/var/lib/syncthing"
],
"run": [
"/bin/sh",
"-c",
"[ -e /var/lib/syncthing/.initial-password ] && echo \"Syncthing login: admin / $(cat /var/lib/syncthing/.initial-password)\"; exec /usr/bin/syncthing serve --home=/var/lib/syncthing --no-browser --no-restart --no-upgrade"
],
"env": {
"STMONITORED": "1"
},
"storage": {
"path": "/sync",
"label": "Synced folders"
},
"notice": {
"pattern": "Syncthing login: admin / (\\S+)",
"text": "Web UI login: admin / $1 · show this phone's device ID under Actions → Show ID to pair your other devices"
},
"update": {
"kind": "apk",
"packages": [
"syncthing"
]
}
},
{
"id": "vaultwarden",
"name": "Vaultwarden",
"description": "Self-hosted Bitwarden password manager. Use with Bitwarden mobile, desktop and browser apps. Open the setup guide for HTTPS access.",
"port": 8000,
"openable": false,
"size": "≈ 200 MB",
"install": "apk add --no-cache vaultwarden vaultwarden-web-vault argon2 ca-certificates\nmkdir -p /var/lib/vaultwarden\n# Only on first install, so the user's own settings and admin token are kept.\nif [ ! -e /var/lib/vaultwarden/.env ]; then\n (\n umask 077\n tok=$(tr -dc A-Za-z0-9 < /dev/urandom 2>/dev/null | head -c 24)\n salt=$(tr -dc A-Za-z0-9 < /dev/urandom 2>/dev/null | head -c 32)\n hash=$(printf '%s' \"$tok\" | argon2 \"$salt\" -e -id -k 19456 -t 2 -p 1)\n printf '%s' \"$tok\" > /var/lib/vaultwarden/.admin-token\n printf \"ADMIN_TOKEN='%s'\\n\" \"$hash\" > /var/lib/vaultwarden/.env\n )\nfi",
"uninstall": "apk del vaultwarden vaultwarden-web-vault argon2",
"data": [
"/var/lib/vaultwarden"
],
"run": [
"/bin/sh",
"-c",
"mkdir -p /var/lib/vaultwarden && cd /var/lib/vaultwarden && exec /usr/bin/vaultwarden"
],
"env": {
"DATA_FOLDER": "/var/lib/vaultwarden",
"WEB_VAULT_ENABLED": "true",
"WEB_VAULT_FOLDER": "/usr/share/webapps/vaultwarden-web",
"ROCKET_ADDRESS": "127.0.0.1",
"ROCKET_PORT": "8000"
},
"notice": {
"pattern": "Rocket has launched from",
"text": "HTTPS required (Cloudflare Tunnel or Tailscale). See Web dashboard → Modules → Vaultwarden → Setup guide; admin token: /var/lib/vaultwarden/.admin-token"
},
"update": {
"kind": "apk",
"packages": [
"vaultwarden",
"vaultwarden-web-vault"
]
}
}
]