Host your own CTF with CTFd
Recently, our organization wanted to challenge colleagues with an internal OSINT competition. To me came the question if I wanted to technically set this up. Using Python, Flask and Bootstrap, after a day of writing I had a framework in place where an OSINT challenge could easily be created. However, there were more and more feature requests from the internal organization that it seemed better to me to make a switch from my self-made CTF platform to CTFd. Why I didn’t start using CTFd right away? Well, I do like to challenge myself and so I wanted to build a CTF framework myself.
Host your own CTF with CTFd
CTFd is an open-source platform for hosting your own CTF. CTFd is build with Python and
What is an CTF?
CTF stands for Capture The Flag. CTF is best described as a computer competition for computer nerds. Most of the hosted CTFs are about cybersecurity and hacking.
Hardware Requirements
Installation
Install Docker
- First, update your package index.
1
sudo apt-get update
- Install the following packages:
1
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
- Install
Docker
andDocker Compose
.1
sudo apt-get install docker docker-compose
- Now, clone the CTFd repo, and navigate into this folder.
1
sudo git clone git clone https://github.com/CTFd/CTFd.git
- Navigate in the
CTFd
folder.1
cd CTFd/
- Create a secret key file in this folder.
1
head -c 64 /dev/urandom > .ctfd_secret_key
- Test your CTFd environment.
1
sudo docker-compose up
- You should now to be able to access CTFd at
https://localhost:8000