Need help with the docker compose setup for TeamSpeak 6

I’m trying to set up my TeamSpeak 6 server with Docker Compose, but I can’t configure it the way I want.

  1. I don’t want to use Docker volumes; I just want to store the server files in a host folder because it’s simpler for me. When I mount the folder instead of using volumes, I get a permission error.
  2. I’m trying to add the GeoIP database, but the server reports that the required libraries are missing. How do I add the GeoIP database to TeamSpeak 6? I managed to do this for TeamSpeak 3 by building the image myself.

Here is my Docker Compose file:

services:
  teamspeak6:
    image: teamspeaksystems/teamspeak6-server:latest
    container_name: teamspeak6-server
    restart: unless-stopped
    ports:
      - 9987:9987/udp # Default voice port
      - 30034:30034/tcp # File transfer port
      - 10081:10081/tcp # WebQuery port
      - 10023:10023/tcp # SSHQuery port
    labels:
      com.centurylinklabs.watchtower.enable: "true"
    environment:
      - TSSERVER_LICENSE_ACCEPTED=accept
      - TSSERVER_DEFAULT_PORT=9987
      - TSSERVER_VOICE_IP=0.0.0.0
      - TSSERVER_FILE_TRANSFER_PORT=30034
      - TSSERVER_FILE_TRANSFER_IP=0.0.0.0
      - TSSERVER_QUERY_HTTP_ENABLED=true
      - TSSERVER_QUERY_SSH_ENABLED=true
      - TSSERVER_QUERY_SSH_PORT=10023
      - TSSERVER_QUERY_HTTP_PORT=10081
      - TSSERVER_MAXMIND_DB_PATH=/usr/share/GeoIP/GeoLite2-Country.mmdb

      # Database settings
      - TSSERVER_DATABASE_PLUGIN=mariadb
      - TSSERVER_DATABASE_SQL_CREATE_PATH=create_mariadb
      - TSSERVER_DATABASE_HOST=172.32.0.3
      - TSSERVER_DATABASE_PORT=3306
      - TSSERVER_DATABASE_NAME=teamspeak
      - TSSERVER_DATABASE_USERNAME=teamspeak
      - TSSERVER_DATABASE_PASSWORD=
    volumes:
      - /opt/teamspeak6-server/data/logs/:/var/tsserver/logs
      - /opt/teamspeak6-server/data/files/:/var/tsserver/files
      - /usr/share/GeoIP/GeoLite2-Country.mmdb:/usr/share/GeoIP/GeoLite2-Country.mmdb
    depends_on:
      mariadb6:
        condition: service_healthy
    network_mode: host

  mariadb6:
    image: mariadb:latest
    container_name: teamspeak6-server-db
    environment:
      - MYSQL_ROOT_PASSWORD=4#?}d]cTuFcbG@/
      - MYSQL_DATABASE=teamspeak
      - MYSQL_USER=teamspeak
      - MYSQL_PASSWORD=4#?}d]cTuFcbG@/
      - MYSQL_ROOT_HOST=172.32.0.1
    volumes:
      - /opt/teamspeak6-server/database:/var/lib/mysql:Z
    restart: unless-stopped
    labels:
      com.centurylinklabs.watchtower.enable: "true"
    healthcheck:
      test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ]
      start_period: 10s
      interval: 10s
      timeout: 5s
      retries: 3
    networks:
      teamspeak6-network:
        ipv4_address: ${IPV4_NETWORK:-172.32.0}.3
        aliases:
          - database

networks:
  teamspeak6-network:
    driver: bridge
    driver_opts:
      com.docker.network.bridge.name: br-teamspeak6
    enable_ipv6: false
    ipam:
      driver: default
      config:
        - subnet: ${IPV4_NETWORK:-172.32.0}.0/24
  1. [FR] Better handling of user permissions in docker · Issue #30 · teamspeak/teamspeak6-server · GitHub
  2. geoipupdate/doc/docker.md at main · maxmind/geoipupdate · GitHub

EDIT1: Ah…I was mistaken for #2 and that’s not relevant for the problem.
EDIT2: I was able to rebuild the image to include the libraries and it appears to be working:

FROM teamspeaksystems/teamspeak6-server:latest

USER root
RUN apt-get update && \
    apt-get install -y libmaxminddb0 libmaxminddb-dev mmdb-bin && \
    rm -rf /var/lib/apt/lists/*

USER 9987

2025-12-20 22:13:33.725759|INFO |GeoIP | |mmdb database found and will be used for geoip lookups

And opened an issue on Github:

2 Likes

Oh, I had no idea you could take an image and then build from that, and I see now what’s going on with the file perms.

Thank you very much :slight_smile: