Skip to main content

Prerequisites

Before installing Ghost Scout, ensure you have the following:
  • Node.js: Version 14 or higher
  • npm: Comes with Node.js
  • Docker: For running Redis and MarkItDown-API containers
  • Git: For cloning the repository
  • Hunter.io API Key: Required for contact discovery
    • Sign up at hunter.io
    • Obtain API key from account settings
  • Anthropic API Key: Required for AI profile and pretext generation
  • Operating System: Linux, macOS, or Windows
  • RAM: Minimum 2GB, 4GB recommended
  • Disk Space: At least 500MB for application and dependencies
  • Network: Internet connection for API access

Installation Steps

1

Clone the Repository

Clone the Ghost Scout repository to your local machine:
Replace <repository-url> with the actual Git repository URL for Ghost Scout
2

Install Dependencies

Install all required Node.js packages:
This will install all dependencies specified in package.json, including:
  • Fastify (web framework)
  • Socket.io (real-time updates)
  • Bee-Queue (job processing)
  • SQLite3 (database)
  • Alpine.js (frontend framework)
  • And other required packages
3

Configure Environment Variables

Create a .env file in the project root with your API credentials:
Add the following content to .env:
Never commit your .env file to version control. Ensure it’s listed in .gitignore
Obtaining API Keys:
  1. Visit hunter.io
  2. Create an account or sign in
  3. Navigate to API settings
  4. Copy your API key
  5. Paste into .env file
4

Start Redis Container

Ghost Scout requires Redis for job queue processing. Start Redis using Docker:
For development/testing (no persistence):
This starts a Redis container without data persistence.
Verify Redis is running:
Managing Redis Container:
5

Start MarkItDown-API Container

Ghost Scout uses MarkItDown-API for HTML to Markdown conversion. Start the container:
Verify MarkItDown-API is running:
Test the API:
The MarkItDown-API container will be accessible on port 8490
Managing MarkItDown-API Container:
6

Start Ghost Scout

Start the Ghost Scout application:
You should see output indicating the server has started:
For production deployments, consider using a process manager like PM2
7

Access the Application

Open your web browser and navigate to:
You should see the Ghost Scout web interface.

Verification

Verify your installation is working correctly:
Ensure all services are running:

Post-Installation Configuration

Database Setup

Ghost Scout automatically initializes the SQLite database on first run. The database includes:
  • Domain - Target company domains
  • SourceDomain - Domains where source data is found
  • Target - Target individuals (prospects)
  • SourceData - URLs where target data was found
  • TargetSourceMap - Many-to-many relationship between targets and sources
  • Prompt - LLM prompts for pretext generation
  • Pretext - Generated phishing messages
No manual database initialization is required

Prompt Library

Ghost Scout includes a prompt library for AI generation:
These YAML files contain templates for:
  • Profile generation prompts
  • Pretext generation prompts
  • Different phishing scenarios
You can customize these templates to fit your specific use cases.

Production Deployment

For production deployments, consider the following enhancements:
Use PM2 to manage the Node.js process:
PM2 Commands:
Use Nginx as a reverse proxy:
Use Let’s Encrypt for HTTPS:
Consider creating a Docker Compose setup (currently on project TODO list):

Troubleshooting

Error: Port 3000 is already in useSolutions:
  • Stop the process using port 3000: lsof -ti:3000 | xargs kill -9
  • Change the port in Ghost Scout configuration
  • Identify and stop conflicting service
Error: Cannot connect to RedisSolutions:
  • Verify Redis container is running: docker ps | grep redis
  • Check Redis logs: docker logs redis
  • Ensure port 6379 is not blocked by firewall
  • Restart Redis container: docker restart redis
Error: Invalid API key or Authentication failedSolutions:
  • Verify API keys in .env file
  • Check for extra spaces or newlines in .env
  • Ensure .env is in the project root directory
  • Restart Ghost Scout after updating .env
  • Verify API keys are active in respective portals
Error: Cannot connect to MarkItDown-APISolutions:
  • Verify container is running: docker ps | grep markitdown-api
  • Check logs: docker logs markitdown-api
  • Test endpoint: curl http://localhost:8490/health
  • Restart container: docker restart markitdown-api
  • Ensure port 8490 is available
Error: Cannot find module 'package-name'Solutions:
  • Run npm install again
  • Delete node_modules/ and package-lock.json, then run npm install
  • Check Node.js version compatibility
  • Verify package.json is intact
Error: SQLite database errorsSolutions:
  • Ensure db/ directory exists and is writable
  • Check disk space availability
  • Verify SQLite3 module is installed
  • Delete database and let Ghost Scout recreate it

Updating Ghost Scout

To update Ghost Scout to the latest version:
If using PM2:
Always backup your database before updating

Uninstallation

To completely remove Ghost Scout:
1

Stop the Application

2

Stop and Remove Containers

3

Remove Application Files

Security Considerations

Protect your Ghost Scout installation and API keys
  • Never commit .env to version control
  • Use environment-specific API keys
  • Rotate API keys regularly
  • Limit API key permissions where possible
  • Monitor API usage for anomalies
  • Use firewall rules to restrict access
  • Deploy behind VPN for production use
  • Use HTTPS in production (SSL/TLS)
  • Restrict database access
  • Secure Redis with password (Redis AUTH)
  • Implement authentication for web interface
  • Use role-based access control
  • Audit user actions and data access
  • Restrict to authorized users only
  • Use separate instances per client/campaign

Next Steps

Overview

Learn about Ghost Scout features

Usage Guide

Practical usage and workflows

Hunter.io Docs

Hunter.io API documentation