selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

DarkMoon logo

Self-host DarkMoon

v1.6.0

Autonomous AI penetration testing on local LLMs

ReleaseOpen CoreGPL-3.0
Updated18 hours ago
LanguagePython
Setup difficultyAdvanced
Stars
1 159
CPU
2 vCPU
RAM
8 GB
Storage
40 GB SSD
Ports
9222 (darkmoon scanner debug port), 80 (web UI dashboard (configurable via DARKMOON_UI_PORT)), 8000 (internal FastAPI service (loopback only))
Requires
Docker Engine, Docker-compose-v2, LLM provider (cloud or local)
Docker
ascit/darkmoon:latest
Install with Docker Compose
Darkmoon Pro web dashboard showing projects, targets, campaigns and vulnerabilities by severityDarkmoon login screen with default admin/admin credentialsLaunching a DarkMoon assessment from the command line with a single TARGET lineAutonomous sub-agent detecting CVE-2019-9978 and moving to exploitation in the terminalDarkMoon recon and environment model summary printed in the terminalLive MCP output stream in the terminal with timestamped commands and raw responsesSignal detection matrix mapping detected technologies to dispatched agents

What is DarkMoon?

DarkMoon is an open-source autonomous AI penetration testing platform that runs on your own infrastructure. It uses 50 specialist AI agents to discover, exploit, and qualify vulnerabilities across web applications, APIs, cloud environments, Active Directory, Kubernetes clusters, CI/CD pipelines, firmware, and AI/LLM endpoints. The platform operates using a local LLM paired with a Privacy Gateway that tokenizes sensitive data locally so real values never leave your perimeter. The open-source edition is a CLI/TUI tool that streams live agent output; the paid Pro edition adds a web dashboard with live SSE streaming, 3D orbital attack-surface maps, automated remediation that creates sandbox-validated fix pull requests, branded PDF reports, and SSO via OIDC. It integrates with CI/CD platforms, IDEs, automation tools, and observability systems. Installation is via a single install.sh script that sets up Docker Compose with two containers (darkmoon scanner and opencode core). Minimum requirements are 2 vCPU, 8 GB RAM, and 40 GB disk.

Should you self-host DarkMoon?

DarkMoon scores 57/100 on selfhost.directory (how scoring works) and ranks #28 of 78 in Security. It has 1 159 GitHub stars.

It shipped 9 stable releases in the past year. The latest, v1.6.0, came out on 25 October 2026. New versions land roughly every 3 weeks.

Setup is advanced: plan for several services and some ongoing maintenance. An official Docker image is available. It is GPL-3.0-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is CyberChef (83/100, 36 238 stars). It scores higher overall, so compare the two before you pick. See DarkMoon vs CyberChef side by side.

Features

  • Automated remediation (Pro)Paid Pro edition only
  • Autonomous AI penetration testing
  • Branded PDF reports (Pro)Paid Pro edition only
  • CI/CD Integration
  • Cloud deployment (Pro)Paid Pro edition only
  • Evidence-based findings
  • Hardened runtime (Pro)Paid Pro edition only
  • IDE Integration
  • LLM endpoint testing
  • Local LLM Support
  • MCP-gated tool execution
  • Privacy Gateway
  • SSO via OIDC (Pro)Paid Pro edition only
  • Web dashboard (Pro)Paid Pro edition only

DarkMoon README

How to install DarkMoon

Install DarkMoon with Docker Compose

Environment variables
OPENROUTER_PROVIDER, OPENCODE_MODEL, OPENROUTER_API_KEY, OPENCODE_LOCAL_MODE, OPENCODE_LOCAL_PROVIDER_ID, OPENCODE_LOCAL_BASE_URL, OPENCODE_LOCAL_MODEL, ANTHROPIC_BASE_URL, ANTHROPIC_MODEL, ANTHROPIC_API_KEY, DARKMOON_PRIVACY, DARKMOON_UI_PORT, DM_MODE
git clone https://github.com/ASCIT31/Dark-Moon.git
cd Dark-Moon
./install.sh

install.sh configures your LLM provider interactively (no need to edit docker-compose.yml) and builds the full stack:

./install.sh           # skip form if .opencode.env already configured
./install.sh --init    # force reconfiguration (cloud or local model)
./install.sh --help    # show usage

Supports cloud providers (Anthropic, OpenAI, OpenRouter…) and local models (Ollama, llama.cpp). Then run your first assessment and watch it live:

./darkmoon.sh "TARGET: example.com"
./darkmoon.sh --log <session_id>

Requires Docker & Docker Compose v2, Linux host (amd64 validated, arm64 experimental)

How to configure DarkMoon

  • ANTHROPIC_API_KEYOn-prem Anthropic-compatible API key (optional)

    On-prem Anthropic-compatible API key (optional)

  • ANTHROPIC_BASE_URLOn-prem Anthropic-compatible endpoint base URL

    On-prem Anthropic-compatible endpoint base URL

  • ANTHROPIC_MODELOn-prem Anthropic-compatible model name

    On-prem Anthropic-compatible model name

  • DARKMOON_PRIVACY1Master switch for Privacy Gateway

    Master switch for Privacy Gateway

    values: 0, 1

  • DARKMOON_PRIVACY_CATEGORIESfull boundaryComma-separated categories to tokenize

    Comma-separated categories to tokenize

  • DARKMOON_PRIVACY_POLICYdegradePrivacy policy mode

    Privacy policy mode

    values: degrade, strict

  • DARKMOON_UI_PORT80Dashboard UI port

    Dashboard UI port

  • DM_MODEdefaultDarkmoon mode

    Darkmoon mode

  • OPENCODE_LOCAL_BASE_URLLocal model base URL

    Local model base URL

    values: e.g. http://localhost:11434/v1

  • OPENCODE_LOCAL_MODEfalseEnable local model mode

    Enable local model mode

    values: true, false

  • OPENCODE_LOCAL_MODELLocal model name

    Local model name

    values: e.g. Qwen2.5-Coder-32B-Instruct-Q4_K_M.gguf

  • OPENCODE_LOCAL_PROVIDER_IDLocal provider identifier

    Local provider identifier

    values: ollama, llama.cpp, local

  • OPENCODE_MODELExact model used

    Exact model used

    values: e.g. claude-opus-4-7, gpt-4o

  • OPENROUTER_API_KEYProvider API key

    Provider API key

  • OPENROUTER_PROVIDERLLM model provider

    LLM model provider

    values: anthropic, openai, openrouter, etc.

DarkMoon releases & version history

FAQ

Is it safe to run against production environments?

Yes, Darkmoon includes configurable noise levels (stealth, low, moderate), safe-harbor mode, out-of-scope enforcement, per-agent scope propagation, and a hardened runtime with read-only filesystem, seccomp, no-new-privileges, and continuous watchdog checks.

How does licensing work?

Darkmoon uses hardware-bound licensing tied to a machine fingerprint derived from MAC address and CPU model. It cannot be cloned or moved by changing an environment variable.

What report formats does Darkmoon produce?

ISO 27001 standard, HackerOne, Bugcrowd (VRT/P1-P5), and custom formats. All include CVSS 3.1, MITRE ATT&CK, ISO 27001 controls, raw evidence, and remediation guidance. PDF export is branded and password-protected.

Is Darkmoon really open source?

Yes, the engine is published on GitHub under GPLv3. You can read the orchestration logic, agent playbooks, and MCP layer, and self-host it. The commercial licence adds hardened runtime, managed dashboard, and support.

Why does the AI never get shell access?

By design — the model plans and reasons but every tool invocation passes through an MCP gateway that validates and gatekeeps the call, keeping engagements auditable and safe.

How is Darkmoon different from a vulnerability scanner?

Darkmoon orchestrates an end-to-end offensive campaign with reasoning, specialist agents, real payload validation, infrastructure graphs, and structured reports, while a scanner runs one-pass signatures.

More in Security

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…