From Zero to CTF: Deploying Your Own CTFd Competition Server
What is a Capture the Flag?
Capture the Flag (CTF) competitions are interactive cybersecurity challenges where participants solve technical problems to uncover hidden pieces of information called flags.
In most CTF competitions, participants work through a series of challenges that test different technical skills.
Typical characteristics of a CTF include:
- Challenges: Individual technical problems participants must solve.
- Flags: Unique text strings that prove the challenge was completed.
- Scoreboard: A live ranking of teams or players based on points earned.
- Categories: Cryptography, networking, web security, reverse engineering, or digital forensics.
For educators and event organizers, CTF competitions provide a structured way to create engaging cybersecurity exercises. Instead of simply reading about tools or concepts, participants actively apply their knowledge to uncover flags and solve real technical problems.
Why use CTFd?
When running a Capture the Flag competition, organizers need a platform to manage challenges, accept flag submissions, track scores, and display a live scoreboard. CTFd is one of the most widely used open-source platforms for hosting cybersecurity competitions. It provides the tools needed to run a professional CTF event without having to build a custom scoring system from scratch.
CTFd is designed specifically for CTF competitions and is used by universities, training programs, cybersecurity clubs, and major international competitions. Organizers can create challenges, define flags, assign point values, and monitor participant progress throughout the event.
Key advantages of using CTFd include:
- Open Source: The platform is free to use and actively maintained by the community.
- Challenge Management: Easily create and organize challenges with categories, descriptions, and files.
- Automatic Flag Validation: Submitted flags are automatically checked and points are awarded.
- Live Scoreboard: Rankings update in real time as teams solve challenges.
- Team or Individual Play: Competitions can be configured for teams or individual competitors.
- Plugin Support: Additional functionality can be added through plugins and integrations.
Another advantage of CTFd is that it runs well inside Docker containers, making it simple to deploy on many types of servers. With only a few commands, a fully functioning CTF platform can be running and ready for participants.
Choosing Where to Start
Before installing CTFd, it is helpful to decide where your competition platform will run. One of the advantages of CTFd is its flexibility. Because it runs inside Docker, the platform can operate on a laptop, a Raspberry Pi, a local server, or a cloud-hosted virtual machine.
For workshops and classroom environments, the best approach is often to start small, learn how the system works, and then expand to a larger server or cloud deployment when hosting bigger competitions.
The sections below will help you understand the hardware requirements, typical player capacity, and hosting options so you can choose the setup that best fits your event.
CTFd Hardware Requirements
CTFd itself is relatively lightweight. The platform mainly manages challenges, user accounts, and the scoreboard. Most of the computing load in a competition comes from the challenge infrastructure, not the CTFd platform itself.
Minimum system requirements
- 2 CPU cores
- 2 GB RAM
- 10–20 GB storage
- Docker and Docker Compose installed
Recommended for classroom competitions
- 4 CPU cores
- 4–8 GB RAM
- SSD storage
Keep in mind that if your challenges involve virtual machines, containers, or intentionally vulnerable web applications, those systems may require additional resources beyond the CTFd server.
Player Capacity Guidelines
The number of participants your system can support depends on both hardware and the complexity of the challenges being hosted.
| System Type | Approximate Player Capacity |
|---|---|
| Laptop or classroom PC | 10–30 players |
| Raspberry Pi | 10–30 players |
| Small server | 30–100 players |
| Cloud VPS | 50–200 players |
| Managed CTFd hosting | Hundreds to thousands |
For many classroom competitions, even a modest system is more than sufficient.
Use the guide below to quickly determine which hosting option may work best for your situation.
| If you want to… | Recommended option |
|---|---|
| Run a quick classroom activity or workshop | Laptop or classroom PC |
| Host a small club competition | Raspberry Pi |
| Run a department or school-wide event | Local server |
| Allow students to participate remotely | Cloud-hosted server |
| Avoid managing servers altogether | Hosted CTFd platform |
Hosting Options
Below are several common ways educators and event organizers deploy CTFd.
Run CTFd on a Laptop or Classroom Computer
This is often the easiest way to begin learning CTFd. Running the platform locally allows instructors to experiment with challenges and test the system before hosting a larger event.
Benefits include:
- Fast setup
- No additional hardware required
- Ideal for workshops and small classes
Limitations include:
- The computer must remain powered on during the event
- Not ideal for larger competitions
- Participants typically must be on the same network
Run CTFd on a Raspberry Pi
A Raspberry Pi can serve as a small, inexpensive server for running a local CTF competition. Many cybersecurity clubs and classrooms use this approach for portable or low-cost competitions.
Benefits include:
- Low cost hardware
- Low power consumption
- Portable competition server
Limitations include:
- Limited performance for larger events
- Storage speed may be slower depending on the media used
Run CTFd on a Server
A dedicated server or virtual machine is a good choice when running competitions with larger groups of participants. Many schools already have servers that can host Docker applications.
Benefits include:
- More stable for larger groups
- Can run continuously for extended competitions
- Easier to manage long-term events
Because CTFd runs in Docker, any Linux system capable of running Docker can host a competition server.
Host CTFd in the Cloud
Cloud hosting allows competitions to be accessible from anywhere on the internet. A small virtual private server is often enough to run a classroom or departmental competition.
Many cloud providers offer inexpensive virtual servers starting around $5 per month, including:
- DigitalOcean
- Vultr
- Linode
- RackNerd
Cloud hosting is useful when participants need to access the competition from outside the local network.
Hosted CTFd Platform
The developers of CTFd also provide a fully hosted platform where they manage the infrastructure, security, and scaling for your event.
This option removes the need to configure servers or manage Docker containers and may be useful for large competitions or organizations that prefer a managed solution.
More information about the platform and hosted options can be found at: CTFd
In the next section, we will begin the hands-on portion of the workshop by creating the server that will host the CTF platform.
Create Your Server.
At this point in the workshop, you will need to decide which system will host your CTFd platform. One of the strengths of CTFd is that it can run on many different systems, including Windows, Linux, macOS, Raspberry Pi devices, and cloud-hosted servers.
Because this is a conference workshop, many participants will choose to run CTFd directly on the computer they brought with them. This allows you to quickly build and test a working Capture the Flag platform without needing additional hardware.
In the next step, choose the option that best matches the system you plan to use. Each option will take you to instructions specific to that platform.