Managing a Running Bot
pywa cloud status [--bot <bot-id>]pywa cloud stop [--bot <bot-id>]pywa cloud start [--bot <bot-id>]pywa cloud restart [--bot <bot-id>]All four default to the linked bot if --bot is omitted, same as logs. None of
them rebuild anything — for that, see Deploying a Pywa Bot.
What actually happens
Section titled “What actually happens”statusis queried live, every time you run it — nothing is cached or tracked separately. Shows whether the container is running, its Docker-level status (running,exited,restarting, …), how many times it’s restarted since it was deployed, and when it last started.stopstops the container but doesn’t remove it, sostartcan resume it later without a rebuild.startresumes a stopped container.restartstops and starts it in place. This does not pick up environment variable changes made since the last deploy — those needdeployagain, sincerestartreuses the exact same container Docker already has, with whatever was injected when it was originally built and run.
Crash recovery — what’s automatic, and what isn’t
Section titled “Crash recovery — what’s automatic, and what isn’t”Every deploy runs the container with Docker’s --restart unless-stopped policy. In practice:
- If the container’s own process crashes or exits unexpectedly, Docker restarts it on its own — nothing here needs to notice or act.
- If you
pywa cloud stopit deliberately, Docker respects that and leaves it stopped — it won’t fight you by restarting it. Onlystart(or a freshdeploy) brings it back. - If the machine running Docker reboots, the same policy brings the container back up automatically once Docker itself is running again.
What’s genuinely not covered yet: nobody is watching whether a running container is actually
serving traffic correctly — “the process is alive” (which status shows you) and “the process is
working correctly” aren’t the same thing, and only the first is currently visible. If your bot is
running but silently broken (bad credentials, an unhandled exception in a specific handler, etc.),
status will still say running. Check Logs if something seems off despite a
healthy-looking status.