Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kangaroux/tf2-docker
A simple docker setup for running a TF2 (Team Fortress 2) server.
https://github.com/kangaroux/tf2-docker
docker server steam teamfortress2 tf2 valve
Last synced: 27 days ago
JSON representation
A simple docker setup for running a TF2 (Team Fortress 2) server.
- Host: GitHub
- URL: https://github.com/kangaroux/tf2-docker
- Owner: Kangaroux
- License: mit
- Created: 2020-08-31T02:28:36.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-17T15:40:09.000Z (about 4 years ago)
- Last Synced: 2023-08-10T06:26:35.980Z (about 1 year ago)
- Topics: docker, server, steam, teamfortress2, tf2, valve
- Language: Shell
- Homepage:
- Size: 16.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TF2 for Docker
This repo contains a Docker setup for automatically downloading, updating, and running a TF2 server.## Quickstart
Start by running `touch server.env`. You can leave this file blank for now.Run `./tf2.sh` to download and start the server. Once the download has completed, you should see the message ` >> Starting server`. If you're running this on your local machine you should also see the server appear under the LAN tab of the server browser.
The server volume is mounted to `data/`. You'll probably want `data/tf/` which has things like `cfg`, `maps`, etc.
## Accessing the Console
```bash
./tf2.sh daemon
./tf2.sh console# Or
./tf2.sh d
./tf2.sh c
```This starts the server in daemon-mode and then attaches to the process in the container. Once attached you can type in console commands, such as `sm version` if you have SourceMod installed.
**NOTE:** Because you are attaching directly to the server process, if you press `CTRL-C` it will exit the server. To detach, press `CTRL-A, D`.
## Server Configuration
You can customize the server startup options with a `server.env` file. These are command line options used by SRCDS. For a full list of possible options see the [wiki page](https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server).### Options
- `SERVER_TOKEN`
- A login token for your server, required by Steam. [Get a login token here.](https://steamcommunity.com/dev/managegameservers)
- `IP`
- The IP to bind the server to. Leave this blank unless you know what you're doing. (default: `0.0.0.0`)
- `PORT`
- The port to bind the server to. (default: `27015`)
- `START_MAP`
- The map to load when the server starts. (default: `ctf_2fort`)
- `MAX_PLAYERS`
- The maximum number of players for the server. (default: 16, max is 32)
- `VAC`
- Enable/disable Valve Anti-Cheat. (default: `1`, use `0` for insecure)
- `DEBUG`
- Enable/disable debugging. (default: `0`, use `1` to enable)
- `EXTRA`
- Any extra command line options. These are appended to the end of the options before starting the server.## Troubleshooting
- **The server crashes on startup and says to enable debugging for more info**
- Open `docker/Dockerfile` and uncomment the debug section
- Add `DEBUG=1` to `server.env`
- Run `./tf2.sh`
- Once you've solved the issue you can re-comment the debug section in the Dockerfile
- **"There is no screen to be attached matching tf2." error when running `./tf2.sh console`**
- This usually means you pressed `CTRL-C` while attached in a previous console session and killed the server.
- Run `./tf2.sh restart`