Prerequisites
Before installing Ghost Scout, ensure you have the following:Required Software
Required Software
- Node.js: Version 14 or higher
- npm: Comes with Node.js
- Docker: For running Redis and MarkItDown-API containers
- Git: For cloning the repository
API Keys
API Keys
- 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
- Sign up at anthropic.com
- Obtain API key from console
System Requirements
System Requirements
- 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 Scout2
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 Add the following content to Obtaining API Keys:
.env file in the project root with your API credentials:.env:- Hunter.io
- Anthropic
- Visit hunter.io
- Create an account or sign in
- Navigate to API settings
- Copy your API key
- Paste into
.envfile
4
Start Redis Container
Ghost Scout requires Redis for job queue processing. Start Redis using Docker:Verify Redis is running:Managing Redis Container:
- Basic Redis
- Redis with Persistence
For development/testing (no persistence):This starts a Redis container without data persistence.
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:Managing MarkItDown-API Container:
The MarkItDown-API container will be accessible on port 8490
6
Start Ghost Scout
Start the Ghost Scout application:You should see output indicating the server has started:
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:- Check Services
- Test Database
- Check Logs
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:- Profile generation prompts
- Pretext generation prompts
- Different phishing scenarios
Production Deployment
For production deployments, consider the following enhancements:Process Manager
Process Manager
Use PM2 to manage the Node.js process:PM2 Commands:
Reverse Proxy
Reverse Proxy
Use Nginx as a reverse proxy:
SSL/TLS
SSL/TLS
Use Let’s Encrypt for HTTPS:
Docker Compose
Docker Compose
Consider creating a Docker Compose setup (currently on project TODO list):
Troubleshooting
Port Already in Use
Port Already in Use
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
Redis Connection Failed
Redis Connection Failed
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
API Key Invalid
API Key Invalid
Error:
Invalid API key or Authentication failedSolutions:- Verify API keys in
.envfile - Check for extra spaces or newlines in
.env - Ensure
.envis in the project root directory - Restart Ghost Scout after updating
.env - Verify API keys are active in respective portals
MarkItDown-API Not Responding
MarkItDown-API Not Responding
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
Module Not Found
Module Not Found
Error:
Cannot find module 'package-name'Solutions:- Run
npm installagain - Delete
node_modules/andpackage-lock.json, then runnpm install - Check Node.js version compatibility
- Verify
package.jsonis intact
Database Errors
Database Errors
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:Uninstallation
To completely remove Ghost Scout:1
Stop the Application
2
Stop and Remove Containers
3
Remove Application Files
Security Considerations
API Key Security
API Key Security
- Never commit
.envto version control - Use environment-specific API keys
- Rotate API keys regularly
- Limit API key permissions where possible
- Monitor API usage for anomalies
Network Security
Network Security
- 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)
Access Control
Access Control
- 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