If you struggle with Podman and/or Traefik setup

Hi everyone,

first, great job! Everything is working as intended (ATM). I am running the new server within Podman on a Debian 12 server. Furthermore, I am using the server behind a traefik proxy. If you struggle with the configuration, mine looks like this:

services:
  # ────
  # Traefik
  # ────
  traefik:
    image: docker.io/library/traefik:latest
    restart: unless-stopped
    container_name: traefik
    networks:
      - teamspeak_net
    command:
      # Global Config
      - "--global.checknewversion=false"
      - "--global.sendanonymoususage=false"
      - "--serverstransport.maxidleconnsperhost=0"
      # Entrypoints Config
      - "--entryPoints.teamspeak-squery.address=:10022/tcp"
      - "--entryPoints.teamspeak-data.address=:30033/tcp"
      - "--entryPoints.teamspeak-voice.address=:9987/udp"
      # API Config
      - "--api.insecure=false"
      - "--api.dashboard=false"
      # Backend Provider Config
      - "--providers.docker=true"
      - "--providers.docker.endpoint=unix:///var/run/docker.sock"
      - "--providers.docker.exposedbydefault=false"
      - "--providers.docker.watch=true"
      # Log Config
      - "--log.level=DEBUG"
      - "--accesslog.filepath=access.log"
    ports:
      - "9987:9987/udp"
      - "10022:10022/tcp"
      - "30033:30033/tcp"
    volumes:
      - "/run/user/1001/podman/podman.sock:/var/run/docker.sock"
      - "/path/to/logfile.log:/var/log/logfile.log"
      - "/path/to/access.log:/access.log"
      - "/path/to/acme.json:/acme.json"

  # ────────────
  # Teamspeak Server
  # ────────────
  teamspeak:
    image: docker.io/teamspeaksystems/teamspeak6-server:latest
    restart: unless-stopped
    container_name: teamspeak
    networks:
      - teamspeak_net
    environment:
      - "TSSERVER_LICENSE_ACCEPTED=accept"
      - "TSSERVER_QUERY_SSH_ENABLED=1"
    volumes:
      - teamspeak-data:/var/tsserver/
    labels:
      # Enable Traefik
      - "traefik.enable=true"
      # Enalbe UDP Route for Voice
      - "traefik.udp.routers.teamspeak-voice.entrypoints=teamspeak-voice"
      # Enable TCP Route for SQuery
      - "traefik.tcp.routers.teamspeak-squery.entrypoints=teamspeak-squery"
      - "traefik.tcp.routers.teamspeak-squery.rule=HostSNI(`*`)"
      - "traefik.tcp.routers.teamspeak-squery.service=teamspeak-loadbalancer-squery"
      - "traefik.tcp.services.teamspeak-loadbalancer-squery.loadbalancer.server.port=10022"
      # Enable TCP Route for Data
      - "traefik.tcp.routers.teamspeak-data.entrypoints=teamspeak-data"
      - "traefik.tcp.routers.teamspeak-data.rule=HostSNI(`*`)"
      - "traefik.tcp.routers.teamspeak-data.service=teamspeak-loadbalancer-data"
      - "traefik.tcp.services.teamspeak-loadbalancer-data.loadbalancer.server.port=30033"

# ───────
# Volumes
# ───────
volumes:
  teamspeak-data:

# ────────
# Networks
# ────────
networks: # Podman: Networks have to be created manually via CLI. After that the network can be used by compose
  teamspeak_net:
    external: true

Keep up the great job! And by the way … I would really love to see 10 slots instead of 5 :heart:

4 Likes

I’m having an issue getting my rootless podman storage to work quite right.

If I use this “teamspeak-data” identifier, it successfully launches the container but the storage is under ~/.local

If I replace that line with:

volumes:
  - /var/containers/ts6:/var/tsserver:z

Then the server fails to launch and says it has issues hitting /var/tsserver

Would you know how to map that teamspeak-data to my desired /var/containers/ts6 ?

Thanks!

Desired:

What happens when I use:

    volumes:
      - teamspeak-data:/var/tsserver/

volumes:
  teamspeak-data:

Update:

i am facing issues where TeamSpeak appears unable to obtain the true IP after passing through a Traefik proxy and not sure how to configure it

Thank you for this pioneering groundwork.

One question, where do you define the domain, you access the TeamSpeak-Server with? For example, I’d like to give public access to my server, with the domain teamspeak.myhomepage.com

Hey,
I faced that issue too. I am actually using the default volume of podman. But my guess for that error is a permission mismatch between volume within the container and the directory outside of it. I would suggest to exec -it into the container and get the UID of the user. After that, I would chown the directory according to that user id. Group can be as present.

All the best.

Hey,
sorry to break it down but that’s why you are using a proxy in the first place :smiley:. With HTTP/HTTPS would it be possible by pvoviding the X-Forward-For header. But for TCP/UDP traefik does not have a function implemented for that.

All the best!

Hey,

basically, if you using my setup, you specify it in your DNS provider settings and pinpoint it to your server. But if you want to specifically listen to a domain you have to modify that:

# Replace this line
- "traefik.tcp.routers.teamspeak-data.rule=HostSNI(`*`)"

# With this
- "traefik.tcp.routers.teamspeak-data.rule=Host(`teamspeak.myhomepage.com`)"

But personlly speaking, I currently don’t know if traefik supports the “Host” attribute for TCP/UDP connections. I mean HostSNI should do the trick as well, as you open up the ports for your teamspeak server in traefik and traefik will match for that as well.

All the best!