i'm trying to set up a Minecraft server in a VPS managed with traefik. After I start the docker container and I tried to reach the server via weburl it fails for timeout. If I use the server IP address is's working. I think that the problem is that if I try to reach the default server port in Minecraft (25565) via domain the port is not redirected correctly to the container. Also, I got to mention that my domain is under Cloudflare, but I don't think that is the problem because I've tried to bypass it turning on the development mode whit no positive results. I've added a custom entry point as so
defaultEntryPoints = ["https","http","mc"]
[entryPoints.mc]
address = ":25565"
then in the labels of my docker-compose I've used these settings:
# map host port
ports:
- 25565:25565
networks:
- traefik_proxy
- default
labels:
- "traefik.docker.network=traefik_proxy"
- "traefik.enable=true"
- "traefik.basic.frontend.rule=Host:mc.myserver.net"
- "traefik.basic.port=25565"
- "traefik.frontend.entryPoints=mc"
But it still fails.
what am I doing wrong?
Ok, after some research the problem should be that at the moment traefik doesn't handle all the tcp traffic but only the http related one ( https://github.com/containous/traefik/issues/10 ). From what i understand it will be supported in the V2 I've managed to make it work just altering the cloudflare setting adding a SRV records as follow Name - _minecraft Value - SRV 1 1 25565
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.