Moved to https://codeberg.org/spire/dispenser
Automatically spawn and destroy a tf2 server on a schedule
- Copy
config.sample.tomltoconfig.tomland edit accordingly - Start
dispenser config.tomlas a system service
When the configured start schedule is reached it will create a new cloud server, update the dyndns (optional) and install a tf2 server. This server is then destroyed when the stop schedule is reached.
As a failsafe against unexpected costs or destroying the wrong server, this program will not spawn any server if it already detects a running one, and it will only destroy a server that was created by the program.
This does mean that if the program is (re-)started while a server is already active, the program will not start and destroy any server because it can't be sure it should control the running server. You'll need to manually destroy the existing server in that case.
You can overwrite this behavior by setting manage_existing = true in your config.toml,
Instead of managing the servers on a schedule with a background server you can also manually manage the server.
dispenser config.toml listdispenser config.toml startNote that this will not start an additional server is a server is already running
dispenser config.toml stopIf you want to store your config file in version control but don't want to store your secrets there, you can choose to load the secrets from other files by specifying the secret as an absolute path.
This can be done for the following config options:
server.demostf_key, server.logstf_key, vultr.api_key, digitalocean.api_key and dyndns.password.
- don't blindly kill server if there are players connected
- kill the server earlier if everyone disconnected
- digital ocean backend
- more backends?