-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Basic Deployment
Kevin Chung edited this page Jul 24, 2020
·
6 revisions
NOTICE: This wiki is deprecated! Please visit the new documentation site!
CTFd can be deployed as a standard wsgi application. However, the simplest means of deploying a CTFd instance is to use Docker Compose.
- Install Docker
- Install Docker Compose
- Clone the CTFd repository with
git clone https://github.com/CTFd/CTFd.git
- Modify the
docker-compose.yml
file from the repository to specify aSECRET_KEY
environment for the CTFd service.- You can also run
python -c "import os; f=open('.ctfd_secret_key', 'a+'); f.write(os.urandom(64)); f.close()"
within the CTFd repo to generate a .ctfd_secret_key file.
- You can also run
environment:
- SECRET_KEY=<SPECIFY_RANDOM_VALUE>
- UPLOAD_FOLDER=/var/uploads
- LOG_FOLDER=/var/log/CTFd
- DATABASE_URL=mysql+pymysql://root:ctfd@db/ctfd
- REDIS_URL=redis://cache:6379
- WORKERS=4
- Run
docker-compose up
- You should now be able to access CTFd at http://localhost:8000
If you're interested in a more advanced deployment read the Advanced Deployment page or contact support@ctfd.io for an Enterprise Deployment.