Skip to content

Add --restart unless-stopped to container#343

Open
woltspace-jerpint[bot] wants to merge 1 commit into
mainfrom
uxw/restart-policy
Open

Add --restart unless-stopped to container#343
woltspace-jerpint[bot] wants to merge 1 commit into
mainfrom
uxw/restart-policy

Conversation

@woltspace-jerpint
Copy link
Copy Markdown
Contributor

Summary

  • Container auto-starts on host reboot / docker daemon restart, but respects manual woltspace stop
  • Credit Zachary Miller for flagging the missing flag and the right fix
  • Updated backup-restore example output and HUMANS.md docs to match

Why

Today woltspace start runs docker run -d ... with no restart policy, so a host reboot leaves the container down until the user manually re-runs woltspace start. --restart unless-stopped is the canonical fix:

  • starts on docker daemon start
  • starts on host reboot
  • stays stopped if the user explicitly ran docker stop / woltspace stop

This matches the behavior described in the original chat ("not always — exception is if you stop it manually").

No sudo

The flag is just a docker run argument, so it inherits whatever permissions the user already has for docker. On macOS Docker Desktop sudo is never needed; on Linux the user just needs to be in the docker group (sudo usermod -aG docker $USER), which is the normal setup. No sudo invocation introduced.

Existing containers

This only affects new containers created via woltspace start. To upgrade an already-running container without recreating it:

docker update --restart unless-stopped woltspace

Test plan

  • Fresh woltspace start on linux host → docker inspect woltspace --format '{{.HostConfig.RestartPolicy.Name}}' returns unless-stopped
  • Reboot host → container comes back up automatically
  • woltspace stop → reboot → container stays stopped

Auto-restarts the container on host reboot or docker daemon restart, but respects manual `woltspace stop`. No more "have to start the container every time."

Same flag added to backup-restore command examples and HUMANS.md docs for consistency.

No sudo needed — host user just needs to be in the docker group (standard linux setup, automatic on macOS Docker Desktop).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
woltspace Ready Ready Preview, Comment May 2, 2026 0:50am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants