{"id":15090144,"url":"https://github.com/ctfer-io/ctfd-setup","last_synced_at":"2026-02-10T16:16:39.657Z","repository":{"id":232079530,"uuid":"783411405","full_name":"ctfer-io/ctfd-setup","owner":"ctfer-io","description":"Utility to version your CTFd setup configuration.","archived":false,"fork":false,"pushed_at":"2025-07-07T19:09:39.000Z","size":1020,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-07T20:56:24.328Z","etag":null,"topics":["action","ctfd","docker","golang","utility","versionning"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctfer-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-07T20:10:30.000Z","updated_at":"2025-07-07T19:09:36.000Z","dependencies_parsed_at":"2024-04-07T21:30:57.301Z","dependency_job_id":"9dfab458-4bdb-41a0-98a8-c424768a141a","html_url":"https://github.com/ctfer-io/ctfd-setup","commit_stats":{"total_commits":100,"total_committers":2,"mean_commits":50.0,"dds":"0.42000000000000004","last_synced_commit":"4e664f421c6a54f52ba6eb63f33db119820f000a"},"previous_names":["ctfer-io/ctfd-setup"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/ctfer-io/ctfd-setup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctfer-io%2Fctfd-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctfer-io%2Fctfd-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctfer-io%2Fctfd-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctfer-io%2Fctfd-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctfer-io","download_url":"https://codeload.github.com/ctfer-io/ctfd-setup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctfer-io%2Fctfd-setup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265450645,"owners_count":23767665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","ctfd","docker","golang","utility","versionning"],"created_at":"2024-09-25T09:22:02.656Z","updated_at":"2026-02-10T16:16:39.652Z","avatar_url":"https://github.com/ctfer-io.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eCTFd-Setup\u003c/h1\u003e\n  \u003cp\u003e\u003cb\u003eVersion your CTFd setup configuration.\u003c/b\u003e\u003cp\u003e\n  \u003ca href=\"https://pkg.go.dev/github.com/ctfer-io/ctfd-setup\"\u003e\u003cimg src=\"https://shields.io/badge/-reference-blue?logo=go\u0026style=for-the-badge\" alt=\"reference\"\u003e\u003c/a\u003e\n  \u003ca href=\"\"\u003e\u003cimg src=\"https://img.shields.io/github/license/ctfer-io/ctfd-setup?style=for-the-badge\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://coveralls.io/github/ctfer-io/ctfd-setup?branch=main\"\u003e\u003cimg src=\"https://img.shields.io/coverallsCoverage/github/ctfer-io/ctfd-setup?style=for-the-badge\" alt=\"Coverage Status\"\u003e\u003c/a\u003e\n\t\u003cbr\u003e\n\t\u003ca href=\"https://github.com/ctfer-io/ctfd-setup/actions/workflows/codeql-analysis.yaml\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/ctfer-io/ctfd-setup/codeql-analysis.yaml?style=for-the-badge\u0026label=CodeQL\" alt=\"CodeQL\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://securityscorecards.dev/viewer/?uri=github.com/ctfer-io/ctfd-setup\"\u003e\u003cimg src=\"https://img.shields.io/ossf-scorecard/github.com/ctfer-io/ctfd-setup?label=openssf%20scorecard\u0026style=for-the-badge\" alt=\"OpenSSF Scoreboard\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/slsa-level%203-green?style=for-the-badge\" alt=\"SLSA Level 3\"\u003e\n\u003c/div\u003e\n\nCTFd does not have the concept of **configuration file**, leading to **deployment complications** and the **impossibility to version configurations**.\nThis is problematic for reproducibility or sharing configuration for debugging or replicating a CTF infrastructure.\n\nMoreover, the setup API does not exist, so we had to map it to what the frontend calls in [go-ctfd](https://github.com/ctfer-io/go-ctfd/blob/main/api/setup.go).\n\nTo fill those gaps, we built `ctfd-setup` on top of the CTFd API. This utility helps setup a CTFd instance from a YAML configuration file, CLI flags and environment variables.\nThanks to this, you can integrate it using **GitHub Actions**, **Drone CI** or even as part of your **IaC provisionning**.\n\nWith `ctfd-setup` you can **setup your CTFd in a second**.\n\n## How to use\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"res/how-to-use.excalidraw.png\" alt=\"ctfd-setup utility used in GitHub Actions, Drone CI and Docker and Kubernetes initial container\" width=\"800px\"\u003e\n\u003c/div\u003e\n\n### YAML\n\nYou can use `ctfd-setup` as a CLI tool and provision it a YAML configuration file.\n\n```yaml\nappearance:\n  name: 'My CTF'\n  description: 'My CTF description'\n\nadmin:\n  name: 'admin'\n  email: 'admin@super.ctf'\n  password: 'admin_password'\n\nmode: users\n```\n\n**We encourage you to version this file** such that re-deployment is easy (e.g., for test purposes, or in case of a catastrophic failure of the infra during the event).\nNevertheless, please do not commit the admin credentials ! Use `from_env` objects instead (refer to [the YAML Schema](#schema) for more info) or use [CLI overrides](examples/cli-override/).\n\nIt could also deploy custom pages (like the index) as follows.\nThis feature is not available in CLI, [GitHub Actions](#github-actions) and [Drone CI](#drone-ci).\n\n```yaml\n# ... other configuration attributes\n\npages:\n  additional:\n    - title: CTFer.io example index\n      route: index\n      format: markdown\n      content: |\n        \u003cdiv\u003e\n          \u003cp\u003eSome index page content\u003c/p\u003e\n        \u003c/div\u003e\n```\n\nFor further configuration, please refer to the binary's specific API through `ctfd-setup --help`.\n\n### GitHub Actions\n\nTo improve our own workflows and share knownledges and tooling, we built a GitHub Action: `ctfer-io/ctfd-setup`.\nYou can use it given the following example.\n\n```yaml\nname: 'My workflow'\n\non:\n  push:\n    branches:\n      - 'main'\n\njobs:\n  my-job:\n    runs-on: 'ubuntu-latest'\n    steps:\n      - name: 'Setup CTFd'\n        uses: 'ctfer-io/ctfd-setup@v1.8.1'\n        with:\n          url: ${{ secrets.CTFD_URL }}\n          file: '.ctfd.yaml'\n          # or directly attributes\n          appearance_name: 'My CTF'\n          appearance_description: 'My CTF description'\n          admin_name: ${{ secrets.ADMIN_USERNAME }}\n          admin_email: ${{ secrets.ADMIN_EMAIL }}\n          admin_password: ${{ secrets.ADMIN_PASSWORD }}\n          # ... and so on (non-mandatory attributes)\n```\n\n### Drone CI\n\nThis could also be used as part of a Drone CI use `ctferio/ctfd-setup`.\n\n```yaml\nkind: pipeline\ntype: docker\nname: 'My pipeline'\n\ntrigger:\n  branch:\n  - main\n  event:\n  - push\n\nsteps:\n  # ...\n\n  - name: 'Setup CTFd'\n    image: 'ctferio/ctfd-setup@v1.8.1'\n    settings:\n      url:\n        from_secret: CTFD_URL\n      file: '.ctfd.yaml'\n      # or directly attributes\n      appearance_name: 'My CTF'\n      appearance_description: 'My CTF description'\n      admin_name:\n        from_secret: ADMIN_USERNAME\n      admin_email:\n        from_secret: ADMIN_EMAIL\n      admin_password:\n        from_secret: ADMIN_PASSWORD\n      # ... and so on (non-mandatory attributes)\n```\n\n## Schema\n\nFor ease of use, you can generate and use the YAML schema using `ctfd-setup schema`.\n\n### In file\n\n**(Optional)** In your `.ctfd.yaml` file you could then prepend `# yaml-language-server: $schema=file:///path/to/schema.json`.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"res/schema.png\"\u003e\n\u003c/div\u003e\n\n\u003e [!NOTE]\n\u003e This will appear by default if your IDE has a YAML extension with support of the [JSON SchemaStore](https://www.schemastore.org/json/).\n\n### In VSCode\n\nIn case you are working in an air-gapped environment or working on improving the project, you may want your schema to automatically target your configuration files.\n\nTo do so, add the following to your `.vscode/settings.json`.\n```json\n{\n    \"yaml.schemas\": {\n        \"schema.json\": \".ctfd.yaml\"\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctfer-io%2Fctfd-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctfer-io%2Fctfd-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctfer-io%2Fctfd-setup/lists"}