Dokploy / Dokploy/dokploy

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

Open
#2,915 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
37.4k
Forks
3k
Avg merge
1d 3h
Merged PRs (30d)
73

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the code that handles published ports for database applications and the External Credentials section. Trace how Docker receives the current host IP, then define the optional-IP behavior and verify that blank input preserves the existing default while a supplied IP limits the binding.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, typescript
Domain
databases, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.