Skip to content

fix(webhook): make webhook server port configurable via WEBHOOK_PORT#2435

Open
evenisse wants to merge 1 commit into
nanocoai:mainfrom
evenisse:fix/webhook-port-configurable
Open

fix(webhook): make webhook server port configurable via WEBHOOK_PORT#2435
evenisse wants to merge 1 commit into
nanocoai:mainfrom
evenisse:fix/webhook-port-configurable

Conversation

@evenisse
Copy link
Copy Markdown
Contributor

Type of Change

  • Fix - bug fix or security fix to source code

Description

The webhook server was hardcoded to bind on port 3000 with no way to override it from .env. On installations where another service already uses port 3000, this caused a fatal EADDRINUSE crash on every startup, triggering the circuit breaker and leaving the ncl CLI socket stale (ECONNREFUSED).

Changes:

  • src/config.ts: add WEBHOOK_PORT to the readEnvFile key list and export it as WEBHOOK_PORT constant (respects process.env.WEBHOOK_PORT.env → default 3000)
  • src/webhook-server.ts: replace the inline process.env.WEBHOOK_PORT read and DEFAULT_PORT constant with the imported WEBHOOK_PORT from config

Usage: set WEBHOOK_PORT=3001 (or any free port) in .env to move the webhook server off port 3000.

@github-actions github-actions Bot added the PR: Fix Bug fix label May 12, 2026
@evenisse evenisse force-pushed the fix/webhook-port-configurable branch from c68339d to 2c2bb85 Compare May 12, 2026 17:28
The webhook server was hardcoded to port 3000 with no way to override it
from .env. Add WEBHOOK_PORT to the env config read list and export it from
config.ts so installations sharing port 3000 with another service can set
an alternative port.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant