fix: Coolify redeploy (build + gateway) and optional OpenClaw version pin#28
Open
doch2 wants to merge 3 commits into
Open
fix: Coolify redeploy (build + gateway) and optional OpenClaw version pin#28doch2 wants to merge 3 commits into
doch2 wants to merge 3 commits into
Conversation
This was referenced Feb 21, 2026
Closed
|
Great work! 🎉 I can confirm this approach works - my fork (discountkeys/openclaw-coolify) has been running on Node 22 since Feb 18 with commit 23c38ba and it's been stable. This fix resolves the better-sqlite3 build failure issue. The Node 22 pin is the right approach. Thanks for creating this PR - hope it gets merged soon! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Redeploys on Coolify were failing in two ways: the image build died on better-sqlite3 / node-gyp, and the public URL often returned 502 because the gateway was only listening on localhost. This PR addresses both and adds a way to pin the OpenClaw version at build time so you can avoid the Slack Socket Mode crash (#21715) until it’s fixed upstream.
Build (Dockerfile)
Base image is now
node:22-bookworm-sliminstead ofnode:lts-*, so we don’t end up on Node 24 with no better-sqlite3 prebuild and no node-gyp. We also runnpm install -g node-gypbefore the global bun installs so native addons can compile. AddedEXPOSE 18789for the gateway port.502 / Public URL
Compose already had
OPENCLAW_GATEWAY_BIND: lan, but the gateway wasn’t getting it at runtime. Bootstrap now runsopenclaw gateway run --bind "$OPENCLAW_GATEWAY_BIND"when that env is set, so the process actually listens on 0.0.0.0 and the Coolify proxy can reach it.Version pin
New build args:
OPENCLAW_VERSION(optional) and existingOPENCLAW_BETA. IfOPENCLAW_BETA=truewe installopenclaw@beta. IfOPENCLAW_VERSIONis set we install that version (e.g.2026.2.16). Otherwise we installopenclaw@latest. Compose passes these through so you can set them in Coolify (build args or env) and rebuild. Once the Slack listeners bug is fixed upstream you can drop the pin and use latest again.Files
Dockerfile: Node 22, node-gyp, version logic, EXPOSE 18789docker-compose.yaml: OPENCLAW_GATEWAY_BIND, build args for OPENCLAW_BETA and OPENCLAW_VERSIONscripts/bootstrap.sh: gateway started with--bindwhen OPENCLAW_GATEWAY_BIND is set