Hi all,
I've been working on a small project for my own OMV box and it's grown into something I think others here might find useful, so I'm sharing it.
What it is
Stowaway sits between your dashboard or bookmarks and your containers' web interfaces. When you open an app's link, Stowaway starts the container, shows a short "waking up" page, and then passes you through to the app as normal. When nobody has used it for a while, it stops the container again.
I built it because I had a pile of containers I only open now and then, plus a habit of trying out new ones. They were all running 24/7 and eating RAM and CPU for nothing. Now you can install as many as you like and only the ones you're actually using are running.
Main features
- Wake on demand: opening the link starts the container. It works with macvlan containers too.
- Sleep when idle: you set the idle time per app. It won't put an app to sleep while it's busy, judged by CPU or network activity, so a transcode or download isn't cut off.
- "Only when I say so" mode: the app is never put to sleep automatically. You start and stop it from the dashboard or Home Assistant.
- Companion containers: for apps with helpers, like Tdarr and its nodes. The helpers wake and sleep together with the main app, and a busy node keeps the app awake.
- Scheduled maintenance: restarts and image updates on a schedule, with rollback if an update fails.
- Dashboard tiles: status for Homarr, Homepage, Dashy, Glance and Heimdall. The status checks never wake the app.
- Home Assistant integration (HACS): switches, sensors and buttons per app. For example, you could put the media server to sleep when everyone leaves home.
- Diagnostics: optional debug logging, with a report you can download. Passwords and tokens are removed from it automatically.
- Small footprint: about 40 MB of RAM, and close to 0% CPU when idle.
Installing with the OMV Compose plugin
Go to Services → Compose → Files → Add, and paste:
yaml
services: stowaway: image: ghcr.io/sat32blk/stowaway:latest container_name: stowaway restart: unless-stopped network_mode: host # Only needed if you have containers on macvlan, uncomment these AND MACVLAN_HELPER_IP: # cap_add: # - NET_ADMIN environment: - DASHBOARD_PORT=8880 - TZ=America/New_York # - MACVLAN_HELPER_IP=192.168.1.250 # a free IP outside your DHCP range volumes: - /var/run/docker.sock:/var/run/docker.sock - ${DOCKER_DATA}/stowaway:/config
Save it and click Up. Then open http://<your-omv-ip>:8880, create your account, and tick Enable Stowaway on the containers you want managed. Each app gets its own link port. Point your dashboard or bookmark at that link instead of the container's port.
Notes for OMV users
- Containers you created with the Compose plugin work as they are. You don't have to change their compose files.
- If you use macvlan, for example for a container with its own IP, Stowaway needs NET_ADMIN and a spare IP. Linux normally blocks the host from talking to its own macvlan containers, so Stowaway adds a small helper interface to get around that. If you already have a macvlan shim set up, it uses that instead.
- After a reboot, managed apps stay asleep until someone opens them. That's on purpose.
Links
- GitHub: https://github.com/Sat32blk/Stowaway
- Home Assistant integration: https://github.com/Sat32blk/stowaway-homeassistant
It's MIT licensed and free. I'm running it on my own OMV 7 server with Navidrome on macvlan and Tdarr with three nodes, but I'd really like to hear how it does on other setups. Bug reports, feature ideas and "this broke my thing" posts are all welcome, here or as a GitHub issue. The dashboard has a Report a problem button that fills in most of the details for you.
Thanks!