Skip to content

[Bug]: Server creation fails when using same IP with different ports (NAT configuration support) #7573

@isbool

Description

@isbool

Error Message and Logs

When attempting to add a new server with the same IP address but a different SSH port, the application returns the error:

"This IP/Domain is already in use by another server in your team."

This prevents users from adding multiple servers that share the same public IP but use different ports, which is a common scenario in NAT configurations.

Steps to Reproduce

  1. Go to Servers page
  2. Add a new server with IP x.x.x.x and port 22
  3. Try to add another server with the same IP x.x.x.x but different port 2222
  4. Receive error: "This IP/Domain is already in use by another server in your team."

Example Repository URL

No response

Coolify Version

v4.0.0-beta.452

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu Server 24.04.3

Additional Information

In NAT/port-forwarding setups, it's common to have multiple virtual machines accessible through a single public IP address with different port mappings.

For example:
VM1: public-ip:22 -> internal VM1 on port 22
VM2: public-ip:2222 -> internal VM2 on port 22
VM3: public-ip:2223 -> internal VM3 on port 22

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 Possible BugReported issues that need to be reproduced by the team.🔍 TriageIssues that need assessment and prioritization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions