CTFd is a customizable Capture The Flag framework designed to easily create, manage, and run CTF competitions for security training and red teaming.
CTFs as you need them
CTFd is primarily used by security professionals, educators, and event organizers to host Capture The Flag competitions that facilitate penetration testing, red team exercises, and security training. It enables users to create challenges, manage teams, and track scores in individual or team-based competitions, making it ideal for training environments and bug bounty practice.
CTFd requires Python and Flask environment setup or Docker for containerized deployment. Users should configure email settings for full functionality like password recovery and notifications. It is recommended to secure the deployment environment and configure access controls properly when hosting public competitions. Extensive customization is possible via plugins and themes, enabling tailored CTF experiences.
Install dependencies using pip: pip install -r requirements.txt
Optionally, run prepare.sh script to install system dependencies via apt
Modify the configuration file at CTFd/config.ini as needed
Run the server in debug mode using python serve.py or flask run
Alternatively, run the official Docker image with: docker run -p 8000:8000 -it ctfd/ctfd
Or use Docker Compose from the source repository: docker compose up
python serve.py
Launches the CTFd server in debug mode for development and testing
flask run
Starts the Flask development server to run CTFd locally
docker run -p 8000:8000 -it ctfd/ctfd
Runs the official CTFd Docker container exposing port 8000
docker compose up
Starts CTFd using Docker Compose for multi-container deployment