Skip to content

ADVERTISE_ADDR on installation is not working #153

@ecoskun87

Description

@ecoskun87

To Reproduce

When installing Dokploy with Docker already present, the install script automatically leaves any existing swarm and re-initializes it.
Even when the environment variable ADVERTISE_ADDR is set, the script ignores it and always uses the Docker bridge IP (172.17.0.1) as the swarm advertise address.

  1. Ensure Docker is installed and running.
  2. Set the desired advertise address:
    export ADVERTISE_ADDR=10.50.50.1
  3. Run the Dokploy install script:
    curl -sSL https://dokploy.com/install.sh | sudo sh
  4. Observe the output:
    Node left the swarm.
    Using advertise address: 172.17.0.1
    Swarm initialized: current node (...) is now a manager.

Current vs. Expected behavior

Expected behavior
The script should respect the ADVERTISE_ADDR environment variable and initialize the swarm using the specified IP (10.50.50.1 in this case).

Actual behavior
The script ignores ADVERTISE_ADDR and chooses 172.17.0.1 (Docker bridge IP) instead.

Workarounds

  • Manually initialize the swarm with docker swarm init --advertise-addr 10.50.50.1 before running the script.
  • Modify the script to hardcode the desired advertise address.

Environment

  • Dokploy version: v0.28.6
  • Docker version: (any recent stable version)
  • OS: Debian-based Linux
  • Use case: Installing Dokploy behind WireGuard private network

Provide environment information

S: Debian GNU/Linux 13 (trixie)
Kernel: 6.1.0-10-amd64
Architecture: x86_64
Docker: 28.5.0

Which area(s) are affected? (Select all that apply)

Installation

Are you deploying the applications where Dokploy is installed or on a remote server?

Same server where Dokploy is installed

Additional context

No response

Will you send a PR to fix it?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions