Skip to content

Bug: Traefik does not load balance UDP and TCP for services #1044

@Zer0PointModule

Description

@Zer0PointModule

While almost no services need this, a service like forgejo that exposes port 2222 does, well at least if you want to use it over pangolin-newt which seems fair.

You can help yourself and configure something like this in your stacks.nix:

        staticConfig.entrypoints.sshgit.address = ":2222";
        dynamicConfig.tcp = {
          routers.forgejo-ssh = {
            entryPoints = ["sshgit"];
            rule = "HostSNI(`*`)";
            service = "forgejo-ssh";
          };
          services.forgejo-ssh.loadbalancer.servers = [
            { address = "forgejo:22"; }
          ];
        };
        containers.traefik.ports = lib.mkAfter [ "2222:2222" ];

You could make the case you don't want everything proxied by Traefik and that you choose that you should just connect over lan exclusively. For me however, this feels like a shortcoming that this isn't covered by default in this project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions