Ghostwriter includes a management command that rebuilds a development or demo database with realistic sample data. Use it when
you need a fresh environment for demos, training, screenshots, testing workflows, or validating report exports.
The default command wipes the database and uploaded media before loading demo data. Do not run it against a production database
or any environment with data or files you need to keep.
The media directory itself is preserved so the command works when MEDIA_ROOT is a Docker volume or bind mount; only its contents
are removed. The command validates the media path and bundled templates before flushing the database.
What the Command Creates
The demo data command performs the same baseline setup as a fresh install and then adds realistic Ghostwriter content:
- Clears uploaded media and reloads all Ghostwriter initial fixture data, including the optional default report templates
- Creates or updates the admin user using the username, email, and password from the DotEnv configuration
- Assigns the admin user to every active project and checks out a domain and server to the admin so the dashboard and My Active Assets page are populated immediately after login
- Creates demo users with names, emails, passwords, and user profiles
- Creates clients, contacts, projects, four-person project teams with one lead, one oversight, and two operators, scopes, targets, objectives, deconflictions, white cards, operation logs, findings, observations, reports, and evidence
- Creates believable examples of every extra field type, including project fields such as Entity Tested and Include CVSS, plus report fields for Reviewed, Attack Path Narrative, and Executive Summary
- Adds sanitized Nmap, Burp Proxy, and Rubeus text evidence from
DOCS/example-data
- Applies demo company information and report configuration
- Enables the global BloodHound API configuration with placeholder values and loads cached demo BloodHound results
Project dates are generated relative to the day you run the command. The full dataset includes completed work in the past, projects
overlapping the current date, and upcoming work in the future.
Run the Command
For a local development checkout, run the command in the Django container:
After it finishes, log in as the configured admin user. If you used the Ghostwriter CLI installer, retrieve the admin password from
the DotEnv configuration:
Create a Smaller Dataset
Use --quick when you want enough data for a complete walkthrough without filling every demo client and project:
By default, the command creates all three available demo clients. The --quick option creates one client. The --clients flag is capped at the three built-in demo clients, so its useful middle setting is --clients 2:
Use --projects-per-client when you want to limit how many projects are created for each selected client:
Append Instead of Wiping
If you want to keep existing data and only add or update demo rows, use --append:
Append mode is idempotent for the seeded demo rows. It stops with an error rather than overwrite an unrelated client, project, finding,
domain, or server that uses the same identifying value as a demo record. To remove previous demo rows before appending fresh demo data,
add --reset:
--reset only removes rows marked as demo seed data. It does not wipe unrelated rows unless you omit --append, in which case the default database rebuild behavior applies.
Because a normal run already performs the full rebuild, --reset is only necessary together with --append.
The standard rebuild is deterministic apart from dates being relative to the day it runs. Re-running it produces the same clients,
projects, assignments, findings, and related demo content on a clean database and media directory.