FarmBot's self-hosted stack made to restart after a reboot
A pull request written with Claude Code adds restart policies so the whole docker-compose FarmBot server comes back after a power cut, and starts Passenger on the configured port.
Credits
- Source byline tencur Source ↗
Earliest dated source:
The full story
In FarmBot's docker-compose setup for self-hosting on a local network, only three services had a restart policy, so after a reboot or power cut redis, web, mqtt, assets and the RabbitMQ jobs stayed down until someone ran docker compose up again. Because the broker checks every login, including the bot's, against the web service, which needs redis, an unattended farm could not reconnect.
The pull request adds restart policies to the whole stack and starts Passenger on the configured API port. It was generated with Claude Code; the author notes they had not checked how the new policy affects one-off containers used in setup instructions.
How it was done
Tools
Themes
Loading themes…
Sources
From the maker's own write-up or code. We summarise what they report; we haven't tested it ourselves.
- FarmBot on GitHub: docker-compose: restart the server containers after a reboot, and start Passenger on API_PORTSource byline: tencurPublished
The FarmBot pull request describing the problems and the fix.