Cactus is a programming contest hosting application. It is a single all-in-one binary that lets you host on-site programming contests over a local area network, with a web-based interface for managing problems, submissions, and standings.
- Single binary with embedded web UI — no client installation needed
- Automatic judging with sandboxed code execution
- Support for C and C++ submissions
- Real-time updates via WebSocket
- Contest standings with scoring and penalty calculation
- Clarification (Q&A) system
- User management with participant, judge, and administrator roles
- CSV account import
tasksudo ./cactusCactus requires sudo for sandboxing submitted code (when using the default ptrace jail). On first run, it creates a config.toml file that you can edit:
[core]
addr = ":5050" # Server address
[belt]
size = 2 # Number of concurrent judging workers
[sandbox]
# mode = "jail" # Options: "jail" (ptrace, default), "docker"
# docker_image = "cactus-sandbox"The web interface will be available at http://localhost:5050.
To use Docker instead of the ptrace jail for sandboxing, first build the sandbox image:
task sandbox-imageThen set mode = "docker" under [sandbox] in config.toml. You can customize the image name with docker_image.
In 2014, I wanted to build an alternative to PC^2; a better way of hosting on-site programming contests over the local area network. Unlike PC^2, Cactus doesn't need a client to be installed on every computer. Cactus can be distributed as a single all-in-one binary.
Cactus served as my creative outlet until I started working on Toph.
Cactus is available under the BSD 3-Clause License.
