A production-grade Capture The Flag (CTF) competition platform written entirely in Go.
- Blazing Fast: Built with Go for high performance and low resource usage.
- Real-time: Live scoreboard and notifications via WebSockets.
- Secure: AES-256-GCM flag encryption, audit logging, and built-in CSRF/XSS protection.
- Customizable: Support for custom themes and a powerful plugin system.
- Advanced Scoring: Static and dynamic (decay) scoring modes with bracket support.
- Developer Friendly: Comprehensive REST API v1 with Swagger documentation.
- Easy Deployment: Single binary or Docker-based setup.
- Data Portability: CTFd-compatible JSON/ZIP import and export.
- Language: Go 1.22+
- Router: Chi
- Database: PostgreSQL (via Sqlx)
- Cache/Session: Redis
- Templates: Go
html/template+ HTMX + Alpine.js - Real-time: Gorilla WebSocket
- Go 1.22 or higher
- PostgreSQL
- Redis
-
Clone the repository:
git clone https://github.com/chrollo-03/goCTF.git cd goCTF -
Copy the example configuration:
cp configs/goctf.example.yaml configs/goctf.yaml
-
Build the project:
go build -o bin/goctf ./cmd/goctf go build -o bin/goctf-cli ./cmd/goctf-cli
-
Run the server:
./bin/goctf --config configs/goctf.yaml
-
Visit
http://localhost:8080/setupto complete the initial setup.
The goctf-cli tool provides management commands:
# Create an admin user
./bin/goctf-cli user create --name=admin --email=admin@example.com --password=secret --role=admin
# Flush the cache
./bin/goctf-cli cache flush
# Create a full backup
./bin/goctf-cli backup create --output=backup.zipDetailed documentation can be found in the /docs directory:
This project is licensed under the MIT License.