Skip to content

Feature Request: Allow Binding Published Ports to a Specific Host IP for Enhanced Security #2915

Description

@FrOz3nFir3

What problem will this feature address?

As a user deploying services on a server with multiple network interfaces (e.g., a public IP and a private VPN IP from Netbird/Tailscale), I need to control which network interface a service's port binds to.
Currently, when a port is published in Dokploy, the code automatically detect the server's primary public IP address and binds the published port to that specific IP.
This forces the service to be exposed on the public internet, even if the user's intention is to only access it via a secure, private network. Security is then entirely reliant on an external firewall, rather than being enforceable at the application/service level. This violates the Principle of Least Privilege, as the service is forced to listen on an interface it doesn't need to.

Use Case Example:
A server has a public IP 203.0.113.10 and a private Netbird /Tailscale VPN IP 100.115.30.50.
I deploy a PostgreSQL database and publish port 5432.
Current Behavior: Dokploy binds the port to 203.0.113.10:5432, exposing it to the internet.
Desired Behavior: I want to specify that the port should bind only to 100.115.30.50:5432, making it accessible exclusively over my private Netbird / Tailscale network and invisible to the public internet.

Describe the solution you'd like

I propose adding an optional "Host IP / External IP" text field in the "External Credentials" section for each database application.
If the "Host IP" field is left blank, the system should maintain its current default behavior (binding to the server's public IP). This ensures backward compatibility.
If a specific IP address is provided (e.g., 100.115.30.50), Dokploy should instruct Docker to bind the port exclusively to that IP.

Describe alternatives you've considered

none actually, it's not possible in docker update command to bind to specific ip address tried all possible ways.

Additional context

No response

Will you send a PR to implement it?

Maybe, need help

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions