Upvote Upvoted 18 Downvote Downvoted
Hosting TF2 with Docker
posted in Projects
1
#1
0 Frags +

Hi all. Couple of days ago I sat down and put together a Docker image for hosting tf2 servers. It has sourcemod, metamod, mge, soap, and RGL plugins / maps. ETF2L support would be nice (pull request maybe?)

A lot of people pay for dedicated servers where they set up everything for you using actual money. However big digital VPS providers like Amazon Web Services or DigitalOcean give out their credits like candy.

The github repo is: https://github.com/joshdabosh/tf2-docker-comp
The Docker Hub page is: https://hub.docker.com/repository/docker/joshdabosh/tf2-docker-comp

Instructions for setup are in the readme.

The hope is that people who aren't as experienced with Linux or want minimal contact with tf2 server administration can spin up a VPS, edit firewall, install docker / docker-compose, and be on their way for server hosting.

I find tf2 servers need at least 4 gigs ram, not sure about # of cpus as I've always used 2 vcpus. Runs fine on a t2.medium from aws ec2.

Hi all. Couple of days ago I sat down and put together a Docker image for hosting tf2 servers. It has sourcemod, metamod, mge, soap, and RGL plugins / maps. ETF2L support would be nice (pull request maybe?)

A lot of people pay for dedicated servers where they set up everything for you using actual money. However big digital VPS providers like Amazon Web Services or DigitalOcean give out their credits like candy.

The github repo is: [url=https://github.com/joshdabosh/tf2-docker-comp]https://github.com/joshdabosh/tf2-docker-comp[/url]
The Docker Hub page is: [url=https://hub.docker.com/repository/docker/joshdabosh/tf2-docker-comp]https://hub.docker.com/repository/docker/joshdabosh/tf2-docker-comp[/url]

Instructions for setup are in the readme.

The hope is that people who aren't as experienced with Linux or want minimal contact with tf2 server administration can spin up a VPS, edit firewall, install docker / docker-compose, and be on their way for server hosting.

I find tf2 servers need at least 4 gigs ram, not sure about # of cpus as I've always used 2 vcpus. Runs fine on a t2.medium from aws ec2.
2
#2
tf2pickup.org
5 Frags +

bro take a look on what mały's done recently, you may like it:
https://github.com/melkortf/tf2-servers

bro take a look on what mały's done recently, you may like it:
https://github.com/melkortf/tf2-servers
3
#3
tf2pickup.org
8 Frags +

I've also been at work in the last year doing this:
https://hub.docker.com/repository/docker/c43721/tf2-comp
https://hub.docker.com/repository/docker/c43721/tf2-comp-rgl

Other community contributors:
https://hub.docker.com/r/gameservers/teamfortress2
https://github.com/tf2pickup-org/tf2-gameserver

You don't even need that much ram, I've ran small servers with only 1 gig ram, and some larger servers with only 2 gigs. DigitalOcean especially has great tooling for it, allowing you to create a droplet with Docker(compose) preinstalled and you'd just have to run your command. Most you would pay is $10 for a 6s server, any more you're wasting money.

I suggest those who don't understand servers to run docker, especially on cloud, since it is much cheaper. It however comes with huge disadvantage to not having the same tools (like rcon control) as opposed to an actual provider (NFO, tragic). Also, you will not have persistant storage for STVs, ability to easily add your own plugins, or easily extend configurations without previous docker exposure. However, if you're a server owner looking for just a server, nothing else, this would be your best option.

I've also been at work in the last year doing this:
https://hub.docker.com/repository/docker/c43721/tf2-comp
https://hub.docker.com/repository/docker/c43721/tf2-comp-rgl

Other community contributors:
https://hub.docker.com/r/gameservers/teamfortress2
https://github.com/tf2pickup-org/tf2-gameserver

You don't even need that much ram, I've ran small servers with only 1 gig ram, and some larger servers with only 2 gigs. DigitalOcean especially has great tooling for it, allowing you to create a droplet with Docker(compose) preinstalled and you'd just have to run your command. Most you would pay is $10 for a 6s server, any more you're wasting money.

I suggest those who don't understand servers to run docker, especially on cloud, since it is much cheaper. It however comes with huge disadvantage to not having the same tools (like rcon control) as opposed to an actual provider (NFO, tragic). Also, you will not have persistant storage for STVs, ability to easily add your own plugins, or easily extend configurations without previous docker exposure. However, if you're a server owner looking for just a server, nothing else, this would be your best option.
4
#4
2 Frags +

Nice! Glad to know other people have done it before. Not gonna complain about a docker refresher though.

suprabro take a look on what mały's done recently, you may like it:
https://github.com/melkortf/tf2-servers

Haha, didn't know about this lol. Googling gave me links to images that didn't have sourcemod / the other plugins.

24You don't even need that much ram, I've ran small servers with only 1 gig ram, and some larger servers with only 2 gigs.

I ran a small 6s server with 1 gig and crashed it a lot bc out of memory, so I said screw it and went with 4 as my credits were going to expire anyway. Didn't try 2, guess that's a better line.

Nice! Glad to know other people have done it before. Not gonna complain about a docker refresher though.

[quote=supra]bro take a look on what mały's done recently, you may like it:
https://github.com/melkortf/tf2-servers[/quote]
Haha, didn't know about this lol. Googling gave me links to images that didn't have sourcemod / the other plugins.

[quote=24]You don't even need that much ram, I've ran small servers with only 1 gig ram, and some larger servers with only 2 gigs.[/quote]
I ran a small 6s server with 1 gig and crashed it a lot bc out of memory, so I said screw it and went with 4 as my credits were going to expire anyway. Didn't try 2, guess that's a better line.
5
#5
tf2pickup.org
1 Frags +
fastbin

2 is the best, 4 for mvm I think.

1 is risky, but for 1v1 I think its more than enough (private mge servers). I did almost run a successful pug with it however.

For the rcon issue, I may have some tools for server owners who need to manage many servers at once!

[quote=fastbin][/quote]

2 is the best, 4 for mvm I think.

1 is risky, but for 1v1 I think its more than enough (private mge servers). I did almost run a successful pug with it however.

For the rcon issue, I may have some tools for server owners who need to manage many servers at once!
6
#6
tf2pickup.org
2 Frags +

Remember to start the containers with the virtual tty attached. (It's the -t param in the docker run command.) srcds will hang if it can't find any (proper?) tty. I found it the hard way :)

Remember to start the containers with the virtual tty attached. (It's the -t param in the docker run command.) srcds will hang if it can't find any (proper?) tty. I found it the hard way :)
7
#7
tf2pickup.org
1 Frags +
fastbinETF2L support would be nice (pull request maybe?)

i'm here from ETF2L and i'm sure if you make a layer with sourcemod, you can make another with tf2-comp-fixes and our configs
https://etf2l.org/rules/configs/

that should be enough i guess

[quote=fastbin]ETF2L support would be nice (pull request maybe?)[/quote]

i'm here from ETF2L and i'm sure if you make a layer with sourcemod, you can make another with tf2-comp-fixes and our configs
https://etf2l.org/rules/configs/

that should be enough i guess
8
#8
RGL.gg
3 Frags +

Icewind wrote some stuff along these lines as well, figure I should leave it in this thread for future reference
https://github.com/spiretf

Icewind wrote some stuff along these lines as well, figure I should leave it in this thread for future reference
https://github.com/spiretf
9
#9
6 Frags +

where are the unit tests

where are the unit tests
10
#10
1 Frags +

Hey, im trying to use Docker with melkor images, but im struggling, i would appreciate it so much if someone can help me pls :C Piloalucard#0445

Hey, im trying to use Docker with melkor images, but im struggling, i would appreciate it so much if someone can help me pls :C Piloalucard#0445
11
#11
tf2pickup.org
3 Frags +

feel free to dm me supra#0337 or mały#0226

feel free to dm me supra#0337 or mały#0226
Please sign in through STEAM to post a comment.