Skip to content

Prevent AlphaClaw from starting on port 18789#28

Open
emileferreira wants to merge 1 commit intochrysb:mainfrom
emileferreira:feat/prevent-port-18789
Open

Prevent AlphaClaw from starting on port 18789#28
emileferreira wants to merge 1 commit intochrysb:mainfrom
emileferreira:feat/prevent-port-18789

Conversation

@emileferreira
Copy link

@emileferreira emileferreira commented Mar 17, 2026

This resolves #26, by preventing AlphaClaw from starting on port 18789. An alternative approach would be to change the port used for OpenClaw when AlphaClaw uses this port.

Changes Made:

  1. Updated bin/alphaclaw.js:
    • Improved flag parsing to correctly recognise --port and --root-dir even when placed after the command (e.g., alphaclaw start --port 18789).
    • Added a fatal error check that prevents AlphaClaw from starting if the resolved port is 18789 (the port reserved for the OpenClaw gateway).
  2. Added unit tests:
    • Created tests/bin/alphaclaw.test.js to verify the port check behavior.
    • Verified that PORT=18789 environment variable triggers the error.
    • Verified that --port 18789 CLI flag triggers the error.
    • Verified that other ports allow the process to continue (until the next check, such as SETUP_PASSWORD).

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.

Unable to launch OpenClaw when starting AlphaClaw on port 18789

1 participant