Hosted Challenge Deployment

Container Servers

Managing challenges for CTFs can be an ordeal. Our hosted challenge platform makes it easy to automatically deploy and manage challenges with technologies you're already familiar with.

# app.py
from flask import Flask

app = Flask(__name__)

@app.route("/")
def flag():
    return "<p>flag{that_was_easy!}</p>"

FROM python:3
RUN pip install flask
COPY app.py .
EXPOSE 5000
CMD flask run --host=0.0.0.0

Build your challenge

First we create a simple challenge that just emits our flag on connect. It must include a Dockerfile which attempts to EXPOSE a port.

Finally you should be able to build your docker image with docker build -t project .

Create a service in CTFd

Next we create a new service inside of CTFd. This is where your challenge will live once it's deployed — no infrastructure setup required.

Create a service in CTFd
Push your image to CTFd

Push and deploy

Finally we push our image up to CTFd, which will automatically handle the rest.

docker login registry.ctfd.io
docker tag <image> registry.ctfd.io/demo/project
docker push registry.ctfd.io/demo/project

The challenge will go from push to building to deployed until finally your challenge will automatically be given a port.

Need an unencrypted TCP port for netcat? Read about Requesting a TCP Port.

Challenge deployment is as easy as docker push.

Check out our hosted plans 
v1 v2