Skip to content

(Self-hosted) Default SERVER_PORT in docker-compose.yaml not set. #5305

@adamkingdotnet

Description

@adamkingdotnet

Problem

Following https://nango.dev/docs/guides/self-hosting/free-self-hosting/locally and running docker compose up with the default configuration fails because of a port mismatch between the published image and docker-compose.yaml.

The nangohq/nango-server:hosted image has PORT=8080 baked in. The server resolves its port in this order (packages/shared/lib/utils/utils.ts:29-39):

  1. SERVER_PORT → not set
  2. PORT → finds 8080 from image
  3. Default 3003 → never reached

But docker-compose.yaml maps 3003:3003 by default.

Result: server listens on 8080, but only 3003 is exposed.

Reproduction

  1. docker compose up
  2. Visit http://localhost:3003 → Connection refused

Proposed Fix

Change line 34 in docker-compose.yaml from:

  • SERVER_PORT
    to:
  • SERVER_PORT=${SERVER_PORT:-3003}

OR

Include this documentation https://nango.dev/docs/guides/self-hosting/free-self-hosting/configuration#server-url,-callback-url-&-custom-domains on https://nango.dev/docs/guides/self-hosting/free-self-hosting/locally

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions