For a simpler approach to TF2 servers on Oracle Cloud, see the Terraform Module.
Logo by kcaugolden
Deploy Team Fortress 2 servers directly from Discord using Docker and multi-cloud infrastructure (Oracle Cloud and AWS).
TF2-QuickServer is a Discord bot that spawns TF2 servers across multiple regions. It uses Oracle Container Instances for most regions and AWS Local Zones for ultra-low latency in select locations. Servers are up and running within minutes.
- Quick Server Deployment – Spin up a TF2 server in 3 minutes with a simple Discord command
- Multi-Cloud Global Deployment – Deploy across Oracle Cloud regions and AWS Local Zones for low latency
- DDoS Protection – TF2-QuickServer-Shield monitors and blocks attacks in real time with in-game notifications
- Containerized Architecture – Each server runs in an isolated Docker container
- Automatic Cost Savings – Idle servers terminate after 10 minutes
- Join our Discord or use the bot in a partnered guild
- Run
/create-server <region> - Select a variant (e.g.,
standard-competitive) - Receive connection info (SDR, direct, and TV addresses)
- Connect and play
The main TF2-QuickServer app currently supports the following regions for server deployment:
- 🇨🇱 Santiago
- 🇧🇷 São Paulo
- 🇨🇴 Bogotá
- 🇺🇸 Chicago
- 🇩🇪 Frankfurt
- 🇦🇺 Sydney
- 🇦🇷 Buenos Aires (Experimental)
- 🇵🇪 Lima (Experimental)
If you are self-hosting, you can use any region that supports Oracle Container Instances or AWS ECS in Local Zones.
See the full lists: Oracle Cloud Regions | AWS Local Zones
| Command | Description |
|---|---|
/create-server <region> |
Launches a server in the selected region (you'll be prompted to select a variant) |
/get-my-servers |
Retrieves all your active server details (IPs, passwords, etc.) in case you lost the original message |
/status |
Shows the current status of all servers across all regions (running, pending, terminating counts) |
/terminate-servers |
Terminates all servers created by the user |
/set-user-data <steamId> |
Sets the SteamID of the user, assigning them as the Sourcemod admin for all servers the user creates |
Want to run your own version? Follow the steps below:
git clone https://github.com/sonikro/TF2-QuickServer.git
cd TF2-QuickServerCreate a .env file:
# Discord Bot
DISCORD_TOKEN=
DISCORD_CLIENT_ID=
# Oracle Cloud Auth (required for OCI regions)
OCI_CONFIG_FILE=
# AWS Auth (required for AWS Local Zone regions)
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
# Third-party Services
DEMOS_TF_APIKEY=
LOGS_TF_APIKEY=npm installOracle Container Instances do not support NFS or shared file systems like FSS. Instead, this project uses Docker fat images that bake in all TF2 maps directly.
npm run download:mapsThis will create the maps/ folder and download all maps listed in maps.json.
Maps are gitignored and stored in a local
mapsfolder. The mapdownloader plugin is also included and will attempt to fetch missing maps dynamically if needed.
Make sure you're authenticated with both OCI and AWS (if using Local Zones). Then run:
npm run terraform:deployThis command runs Terraform to create required infrastructure across Oracle Cloud and AWS, and generates a
config/local.jsonfile with all outputs. TF2-QuickServer code reads this file at runtime to determine which cloud resources to use.
Authentication info:
npm run devservices:
tf2-quickserver:
image: sonikro/tf2-quickserver:latest
restart: always
ports:
- 8000:3000
env_file:
- .env
volumes:
- ./db:/app/db
- ./config:/app/config:ro
- ./keys:/app/keys:roMake sure you have your config files in the ./config directory
TF2-QuickServer is instrumented for full observability using OpenTelemetry. This enables you to collect traces, metrics, and logs from the bot and supporting services, making it easy to monitor performance, troubleshoot issues, and gain insights into server operations.
If the environment variable NEW_RELIC_LICENSE_KEY is set, a New Relic agent (newrelic-infra sidecar container) will automatically run on each Oracle server instance for enhanced infrastructure monitoring and reporting to New Relic.
To enable OpenTelemetry data export from the Discord App, set the following environment variables in your .env file or deployment configuration:
# OpenTelemetry Exporter Configuration
OTEL_SERVICE_NAME=tf2-quickserver
OTEL_RESOURCE_ATTRIBUTES=service.environment=localhost
OTEL_EXPORTER_OTLP_ENDPOINT=
OTEL_EXPORTER_OTLP_HEADERS=api-key=
OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT=
OTEL_EXPORTER_OTLP_COMPRESSION=gzip
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=deltaContributions are welcome. Open a PR, suggest improvements, or file an issue.
MIT
Need help? Join the Discord or open a GitHub Issue.