Game Server #170
Replies: 1 comment
-
Ok I got it to work with MitchTalmadge's AMP-Dockerized container found here: https://github.com/MitchTalmadge/AMP-dockerized This does require purchasing a license for Cubecoders AMP which is around $10 I think and opens up a few more game server ports. Works great and I now have a game server added to my home server with a nice panel behind Oauth and Traefik. I am new to Docker so happy to hear ways to improve upon this. 1. Under the Traefik service in your docker-compose.yml add TCP and/or UDP entry points for whatever game servers you are planning on running. These are placed underneath the existing http and https entryPoints for ports 80 and 443. If you are planning on creating multiple servers of the same game make sure you make entrypoints for each one with different ports. Example for TCP minecraft ports and a Factorio UDP port:
2. Under the Traefik service in your docker-compose.yml add the ports for whatever game servers you are planning on running. These can be listed under the pre-existing ports:
3. Edit and copy MitchTalmadge's AMP-Dockerized container into your docker-compose.yml. This is only the code beginning with 4. Under the Amp service comment out all of the ports using #. These will all be handled by Traefik.
5. Under the Amp service create a new section beneath the 6. To create an entry point and make the Main ADS instance accessible via your domain add under the
7. To place ADS behind the Google Oauth middleware add the following:
8. Next add the following two lines to create the service that will connect the entrypoint and router from "amp.domain.com" to port 8080 of this container:
9. Now we need to create routers that connect the traefik entrypoints we created in Step 1 to the AMP Instances you will be creating for your game servers. These will need to be customized based on whatever game servers you will be running. Each one will need a tcp or udp router that connects to an entrypoint created in Step 1. Example Minecraft (TCP)
Example Minecraft2 (TCP)
Example Factorio (UDP)
10. Finally you need to update the DNS settings for your domain. Create new A records for each game server that point to your WAN IP address. So your A records should look like: A Record 1: Name = domain.com IPv4 Address = 10.10.10.10 These would make your servers accessible at "minecraft.domain.com" and "minecraft2.domain.com" set them to be whatever you want. 11. Last create SRV records in your DNS records so you won't need to add ports to the end of your subdomains when entering them in game. SRV Record 1: Name = minecraft Service = _minecraft1 Protocol = TCP Priority = 0 Weight = 0 Port = 25565 Target = minecraft.domain.com TTL = Auto SRV Record 1: Name = minecraft2 Service = _minecraft1 Protocol = TCP Priority = 0 Weight = 0 Port = 25566 Target = minecraft2.domain.com TTL = Auto If everything is working correctly you should be able to fire up your docker-compose file and connect to AMP. Navigating to "amp.domain.com" should prompt for your Google Authentication and then bring you to your Main AMP panel. Once that's setup create instances for your games configured above. These can be deleted and recreated whenever you want just make sure you use the ports used during the setup. Within Minecraft you should be able to connect to your servers by entering in "minecraft.domain.com" and "minecraft2.domain.com" using the examples above. Note: I didn't create DNS records for Factorio because Factorio doesn't support SRV records. To access this server you need to either make it public (add a password if you want it private) and access it from the list of public servers or use your WAN IP address to connect directly. If you have anyways of making this work even better let me know! |
Beta Was this translation helpful? Give feedback.
-
Hey thanks for this resource I am using it to upgrade my meager home server to something a little more robust. The one thing missing for my build is a game server. I'm still working on configuring this but to fully replace my current setup I'll need to get a game server working for the kids. I'm using your repo and guides to learn docker at the same time as setting this up.
Would be nice to have something like Petrodactyl or CubeCoders AMP running behind Traefik with the servers accessible remotely at "gameserver1.domainname.com" and "gameserver2.domainname.com". I haven't attempted it yet but these game servers spin up their own containers for each instance you create and start using their control panels. Because these are dynamically created through the control panel I'm anticipating it might be a little more involved to get them working with Traefik. Being a newb at docker and Traefik I am hoping i can get this all running using your examples. A specific example for a game server would be nice to have though which is why I am posting that suggestion here.
Beta Was this translation helpful? Give feedback.
All reactions