Skip to content
Pocket Homelab
Install

Docker Engine

Your containers and Compose stacks with their health, logs and stats, plus Start, Stop and Restart, in the Containers tab and the Mac Containers workspace.

iPhoneMac
On this page

Docker Engine runs the containers on your server. Pocket Homelab talks to its API directly to list every container (stopped ones too), group them by Compose stack, show their health, stats and logs, and start, stop or restart them. The same Containers screen can also read from Dozzle, which adds more hosts and a faster log search. Either one is enough.

What you get

  • A Containers screen: every container grouped by Compose stack, a Needs attention section, filters, search, and a page per container with its resources, recent logs, health checks, ports, networks, mounts and restarts.
  • Start, Stop and Restart for one container or a whole stack (needs Docker; Dozzle alone is read-only).
  • A Containers tab, off by default: turn it on in Settings → Tabs to pin it to the tab bar.
  • Home card “Containers”: “38 running”, with “2 stopped · 1 needs attention” (or “All running”) underneath. Blue when all is well, red when something needs attention. In Settings → Home layout, Show on this card can switch it to Needing attention (“All fine” or “1 needs attention”, with the names) or Compose stacks (“12 stacks”, “11 all running”).
  • Issue chip in red, for example “grafana unhealthy”, “grafana restarting”, “grafana stopped”, or “3 containers need attention”.
  • A Running containers pinned header (“38 running · 2 stopped · 1 needs attention”), and Containers as one of the health sources behind the System status header.
  • Spotlight entry “Containers” (containers, docker, dozzle, compose, stacks, logs, restart, unhealthy).
  • Mac: the Containers workspace in the sidebar’s Infrastructure group (⇧⌘8 by default), a Containers widget for Home, and a Docker card in the Services directory.

A container needs attention when its health check says unhealthy, when it keeps restarting, or when it stopped with an error (any exit code other than 0 and 143, which is what a normal docker stop leaves, or a container Docker reports as dead).

Set up

Don’t point the app at the raw Docker socket. Put a small proxy in front of it that only lets through what the app needs. docker-socket-proxy does exactly that.

  1. Add the proxy next to your other containers. CONTAINERS=1 lets the app list containers and read their details, stats and logs. POST=1 is only needed for Start, Stop and Restart; leave it out if you only want to look.

    services:
      docker-proxy:
        image: tecnativa/docker-socket-proxy
        restart: unless-stopped
        environment:
          CONTAINERS: 1   # list, details, stats and logs
          POST: 1         # only for Start, Stop and Restart
        volumes:
          - /var/run/docker.sock:/var/run/docker.sock
        ports:
          - "192.168.1.10:2375:2375"   # your server's LAN address, not 0.0.0.0

    The version check used by Test connection is allowed by the proxy out of the box. On hosts with SELinux, the proxy’s README asks for privileged: true as well.

  2. Make it reachable from your phone and Mac over your LAN or VPN. The simplest is the LAN address above (http://192.168.1.10:2375). Better: put it behind your reverse proxy with HTTPS and a password or token, and use that address instead.

  3. In Pocket Homelab: Settings → Services → Docker, paste the address in Docker URL. If your reverse proxy asks for a sign-in, fill in Docker bearer token, or Docker user name and Docker password. Tap Test connection.

  4. The Containers card shows up on Home. Turn on the Containers tab in Settings → Tabs if you want it in the tab bar.

Only the URL is needed. A bearer token wins over the user name and password when both are set.
KeyFieldRequiredSecretWhere to get it
DOCKER_URLDocker URLRequired—Address of a Docker Engine API: a docker-socket-proxy (CONTAINERS=1, and POST=1 for start, stop and restart) or dockerd listening on TCP, usually behind a reverse proxy. Leave empty to hide it.
DOCKER_TOKENDocker bearer tokenOptionalSecretOptional. Sent as Authorization: Bearer when the reverse proxy in front of the Docker API asks for a token. Stored in the Keychain.
DOCKER_USERNAMEDocker user nameOptional—Optional. For a reverse proxy that protects the Docker API with basic authentication (used when no bearer token is set).
DOCKER_PASSWORDDocker passwordOptionalSecretOptional. That user's password. Stored in the Keychain.
Only the URL is needed. A bearer token wins over the user name and password when both are set.

On iPhone

The Containers screen opens with three counters: running, stopped and attention. Tap one to show only those containers, tap it again to show all. Below them, a line says what was read, for example “24 containers in 9 stacks · Docker”.

Containers in trouble are listed first under Needs attention. Then each Compose stack gets a section with its name, a state icon (all running, some running, stopped, or a problem) and “3 of 4 running”. Containers that are not part of a stack are listed last under Other containers. Each row has a coloured dot, the name, Docker’s own status (“Up 3 hours (healthy)”, “Exited (137) 2 days ago”) and the image, plus a tag such as unhealthy, starting, restarting or exit 137 when something is off.

Filter containers… searches by name, image, stack, Compose service or host. The Filter menu picks All containers, Running, Stopped or Needs attention. The list refreshes every 15 seconds; pull down to refresh now.

Swipe a row to the left for Restart and Stop (running) or Start (stopped). Long-press it for the same actions plus Copy name, Copy ID and Copy image. The ⋯ button on a stack header has Start all, Stop all and Restart all.

A container’s page

Tap a container to open its page. It starts with the status, the image and tags for the state, health, stack and host, and how long it has been up (or since when it is stopped). Then:

  • The buttons that apply: Stop and Restart for a running container, Start for a stopped one.
  • Resources (running containers): CPU, Memory (used of the limit, like docker stats), Network, Disk I/O and Processes.
  • Recent logs: the last 15 lines, coloured by level, with All logs to open the full log. The footer says where they came from (“From Docker” or “From Dozzle”).
  • Health checks: the last five runs with their time, a tick or a cross, the exit code and the check’s output, plus Failing in a row when it keeps failing.
  • Ports, Networks (with each IP address) and Mounts (with rw or ro).
  • Restarts: the Restart policy (Never, Always, Unless stopped, On failure), how often Docker restarted it, the Exit code (“137 (killed)”, “143 (stopped)”) and “Killed for running out of memory” when that happened.
  • Labels (folded away) and Details: the ID, Compose service, created and started times, and the command.

The page refreshes every 10 seconds. The More menu has the same actions and copy options as the long-press menu. Environment variables are never read: they often hold passwords.

Logs

All logs opens the full log, newest at the bottom. Follow is on by default and adds new lines as they come (every 3 seconds from Docker, live from Dozzle). The Options menu has Standard output, Standard error, Errors only, Show times, Lines (Last 100, Last 300, Last 500) and Copy shown lines. Errors are red, warnings orange, debug lines grey, and lines from standard error carry a small red E. Filter lines narrows what’s shown; with Dozzle the search runs on the server instead. The bar at the bottom says “120 of 300 lines · from Docker · following”.

On Mac

The Containers workspace sits under Infrastructure in the sidebar (⇧⌘8 by default), with the header “Your containers and Compose stacks from Docker and Dozzle: health, logs and stats, with start, stop and restart.” It is the same screen as on iPhone, with a Refresh button in the toolbar. Right-click a container for Start, Stop, Restart and the copy options; the stack header’s ⋯ menu acts on the whole stack.

On Home, the Containers widget shows “21 running” with “Everything is up” or how many need attention, then Running, Stopped, Unhealthy and Stacks. Wide or expanded, it also lists up to four containers in trouble with their stack.

In Services, the Docker card opens the Containers workspace.

Actions

  • Start, Stop and Restart for one container: from the swipe actions (iPhone), the long-press or right-click menu, the More menu, or the buttons on its page. Start runs at once. Stop and Restart ask first: “The container stops until it is started again.” / “The container stops and starts again; whatever it is doing is interrupted.”
  • Start all, Stop all and Restart all for a Compose stack, always with a confirmation. They go in Compose’s dependency order (a database starts before the app that needs it, and stops after it). Every container is tried; any that fail are listed by name.
  • A container that is already started or stopped counts as done. Stop and restart can take a while because Docker waits for the container to exit; the row shows a spinner meanwhile.

Works with

  • Dozzle: adds the containers of every host Dozzle reaches (read-only) and serves the logs, with search on the server and a live stream. With both set up, Docker’s containers keep their buttons and get their logs from Dozzle. Containers are matched by ID, so none shows up twice.
  • The Home issue chip and the System status header, where Containers is a health source.
  • Komodo stays a link in the Services directory; it does not feed this screen.

Tips & troubleshooting

  • Start fails with “… is not allowed”: the proxy has POST off. Add POST=1 and recreate the proxy.
  • docker-socket-proxy also has ALLOW_START, ALLOW_STOP and ALLOW_RESTARTS. You don’t need them: with CONTAINERS=1 and POST=1 the three actions already go through. Note that POST=1 together with CONTAINERS=1 lets through every change to containers, not just the three the app uses, which is one more reason to keep the proxy private.
  • The app reads one engine per Docker URL. For several servers, set up Dozzle with its agents: the other hosts show up next to this one, read-only.
  • A stopped container has no Resources section: stats are only read for running containers.
  • Docker and Dozzle are two services, so each takes one of the free plan’s three slots.