Skip to content

Allow duplicate ports when using multiple IP addresses #77

@brianmay

Description

@brianmay

I see the code:

        {
          assertion =
            let
              serverPorts = mapAttrsToList
                (name: conf: conf.serverProperties.server-port or 25565)
                (filterAttrs (_: cfg: cfg.openFirewall) servers);

              counts = map (port: count (x: x == port) serverPorts) (unique serverPorts);
            in
            lib.all (x: x == 1) counts;
          message = "Multiple servers are set to use the same port. Change one to use a different port.";
        }

I haven't tested it, but this looks very much like you can't have multiple servers using the same server-port even if they have different server-ip values.

Or Maybe it just means you can't use openFirewall with such configs. Still trying to understand this logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requestmoduleTopic: The minecraft-servers module

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions