selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

CTFd logo

Self-host CTFd

3.8.9

Open-source Capture The Flag competition platform

ReleaseOpen SourceApache-2.0
docker run -p 8000:8000 -it ctfd/ctfd
Updated2 weeks ago
LanguagePython
Setup difficultyEasy
Stars
6 902
CPU
dual core CPU
RAM
1 GB
Port
8000 (CTFd web application)
Docker
ctfd/ctfd
CTFd scoreboard page on the default theme

What is CTFd?

CTFd is a web platform for running Capture The Flag competitions and cybersecurity training events, aimed at organizers, schools, and companies. Its admin panel lets you build challenges, categories, hints, and flags, with dynamic scoring, unlockable and hidden challenges, static or regex flag checking, attempt limits, and automatic brute-force protection. Events can be played solo or by teams, and the scoreboard offers automatic tie resolution, score freezing, public score hiding, and top-10 progress graphs. Other capabilities include SMTP email with confirmation and password resets, filesystem or S3-compatible file uploads, scheduled event start/end times, team management, an import/export system for archiving competitions, and deep customization through plugins and themes. You can try it on the public demo, or self-host it with the ctfd/ctfd Docker image, the bundled Docker Compose stack (nginx + MariaDB + Redis), Vagrant, or any WSGI server such as gunicorn; a SQLite database is created automatically when none is configured, and Redis caching falls back to the filesystem. Webhooks and Slack/Discord notification integrations are limited to hosted and enterprise tiers, while the open-source core stays free.

CTFd alternatives

Should you self-host CTFd?

CTFd scores 70/100 on selfhost.directory (how scoring works) and ranks #1 of 31 in Education. It has 6 902 GitHub stars, +37 in the last 30 days.

It shipped 8 stable releases in the past year. The latest, 3.8.9, came out on 22 October 2026. New versions land roughly every 4 weeks.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is learnhouse (65/100, 2 459 stars). CTFd scores higher overall. See CTFd vs learnhouse side by side.

Features

  • Admin interface for challenges, flags and hints
  • Attempt limiting and hidden challenges
  • Brute-force Protection
  • Dynamic scoring
  • Email notifications
  • File upload challenges
  • Import/export of CTF data
  • Individual and team play
  • Plugins and Themes
  • REST API
  • Scheduled competition start and end
  • Scoreboard with freezing and tie resolution
  • Score graphs
  • Static and regex flags
  • Unlockable challenges

CTFd README

CTFd MySQL CI Linting Documentation Status

What is CTFd?

CTFd is a Capture The Flag framework focusing on ease of use and customizability. It comes with everything you need to run a CTF and it's easy to customize with plugins and themes.

CTFd is a CTF in a can.

How to install CTFd

Install CTFd with Docker

docker run -p 8000:8000 -it ctfd/ctfd

Auto-generated Docker images published on Docker Hub.

How to configure CTFd

  • SECRET_KEYSecret used for sessions and signing; a random string, auto-generated as a secret key file if unset.
  • DATABASE_URLURI with credentials, host, port and database for the CTFd database; if unset (with DATABASE_HOST), a SQLite database is created automatically.
  • DATABASE_HOSTHostname of the database server; ignored if DATABASE_URL is set.
  • DATABASE_PROTOCOLmysql+pymysqlProtocol used to access the database server when DATABASE_HOST is set.
  • DATABASE_USERctfdUsername for the database server when DATABASE_HOST is set.

CTFd releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

More in Education

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…