Skip to content

Docker Local Deployment

tkaixiang edited this page Sep 29, 2021 · 4 revisions

Dependencies

Get and Move Stuff To the Right Places

Setting up Sieberrsec CTF Platform locally can be done in a few simple steps. We are going to assume we are on an Ubuntu Server in this guide.

Firstly, clone the repo and move into it

git clone https://github.com/IRS-Cybersec/ctf_platform.git
cd ctf_platform

Build And Run The Containers

docker-compose up # Do not use -d (detached mode) for now as there is some important output
  • After the containers are done building, the client will be running on localhost:20002 and the API is running on localhost:20001.
  • An admin account is automatically created on initial setup, and the login details can be found in the output on screen.
  • A new secure salt & secret is generated automatically on initial setup as well.

Congratulations! The platform should now be accessible at http://localhost:20002.

Remarks

  • If you want to change any part of the platform (such as changing the logo to your own CTF's logo), simply edit the source code & rebuild the docker
  • Uploaded files and database data are saved in volumes permanently even if you rebuild the docker. If you want to refresh the instance and clear all data, simply run:
docker-compose down -v
docker-compose up -d

Edit cache database with config.json

If you want to use pre-saved settings on load, you can create a config.json inside /api that looks like this:

{
  "announcements": 0,
  "challenges": 0,
  "registerDisable": false,
  "adminShowDisable": false,
  "submissionDisabled": false,
  "uploadSize": 512000,
  "latestSolveSubmissionID": 0,
  "maxSockets": 5,
  "uploadPath": "/usr/share/nginx/static/profile"
}

The API will automatically insert these settings into the cache database

Clone this wiki locally