A self-hosted network scanner and monitoring tool inspired by Shodan. Built with Go, PostgreSQL, and React.
- Automated Network Scanning: Schedule scans with cron expressions
- Service Detection: Identify open ports, services, and versions
- OS Fingerprinting: Detect operating systems running on devices
- Risk Assessment: Automatically flag dangerous open ports
- Real-time Dashboard: Beautiful visualizations of your network
- Historical Data: Track changes over time
- REST API: Full API access to all data
- Docker Ready: Complete Docker setup included
βββββββββββββββ
β Frontend β React + Tailwind + Recharts
β (Port 3000)β
ββββββββ¬βββββββ
β
ββββββββΌβββββββ
β API Server β Go + Fiber
β (Port 8080)β
ββββββββ¬βββββββ
β
ββββββββΌβββββββ
β PostgreSQL β Database
β (Port 5432)β
ββββββββ¬βββββββ
β
ββββββββΌβββββββ
β Scanner β Go + Nmap (Scheduler)
βββββββββββββββ
- Docker & Docker Compose
- Nmap installed on host (for scanner container)
- 2GB RAM minimum
- Linux/macOS (Windows WSL2 supported)
- Clone the repository
git clone https://github.com/yourusername/shodan-home.git
cd shodan-home- Configure environment
cp .env.example .env
# Edit .env with your network range- Start all services
make up- Access the dashboard
- Frontend: http://localhost:3000
- API: http://localhost:8080
- Health check: http://localhost:8080/health
make build # Build all containers
make up # Start all services
make down # Stop all services
make logs # View all logs
make logs-api # View API logs
make logs-scanner # View scanner logs
make clean # Remove everything
make scan # Run manual scan
make stats # Show network stats
make db-shell # Access PostgreSQL shell| Variable | Default | Description |
|---|---|---|
SCAN_TARGET |
192.168.1.0/24 |
Network to scan (CIDR notation) |
SCAN_SCHEDULE |
0 3 * * * |
Cron expression (3 AM daily) |
WORKERS |
10 |
Concurrent scan workers |
DATABASE_URL |
postgres://... |
PostgreSQL connection string |
PORT |
8080 |
API server port |
# Every day at 3 AM
SCAN_SCHEDULE="0 3 * * *"
# Every 6 hours
SCAN_SCHEDULE="0 */6 * * *"
# Every Monday at midnight
SCAN_SCHEDULE="0 0 * * 1"
# Every 30 minutes (for testing)
SCAN_SCHEDULE="*/30 * * * *"GET /api/v1/devices # List all devices
GET /api/v1/devices/:ip # Get device details
GET /api/v1/devices/:ip/ports # Get device ports
GET /api/v1/devices?service=ssh # Filter by service
GET /api/v1/devices?active=true # Only active devicesGET /api/v1/stats # Network statistics
GET /api/v1/search?q=192.168 # Search devices
GET /api/v1/alerts # Get unread alerts# Get all devices
curl http://localhost:8080/api/v1/devices | jq '.'
# Find SSH servers
curl http://localhost:8080/api/v1/devices?service=ssh | jq '.'
# Get network stats
curl http://localhost:8080/api/v1/stats | jq '.'Automatically detects and flags:
- Critical: Telnet (23), FTP (21)
- High: SMB (445), RDP (3389), MySQL (3306), MSSQL (1433)
- Medium: PostgreSQL (5432), Redis (6379)
The system creates alerts for:
- New devices detected
- Risky ports opened
- Service version changes
- Devices going offline
- Start PostgreSQL
docker-compose up -d postgres- Run API
make dev-api- Run Scanner
make dev-scanner- Run Frontend
cd web && npm install && npm run devmake build-all # Build all binaries
./bin/api # Run API
./bin/scanner # Run scanner
./bin/scheduler # Run schedulermake test # Run tests
make test-coverage # Tests with coverageshodan-home/
βββ cmd/
β βββ api/ # API server
β βββ scanner/ # Scanner CLI
β βββ scheduler/ # Cron scheduler
βββ internal/
β βββ api/ # API handlers
β βββ database/ # Database layer
β βββ scanner/ # Scan logic
βββ web/ # React frontend
βββ migrations/ # SQL migrations
βββ docker-compose.yml
βββ Makefile
βββ README.md
# Ensure network_mode: host in docker-compose.yml
# Or run scanner directly on host:
make dev-scanner# Scanner needs NET_ADMIN and NET_RAW capabilities
# Already configured in docker-compose.yml# Check PostgreSQL is running
docker-compose ps postgres
# View logs
docker-compose logs postgres- CVE Detection (match versions with vulnerability databases)
- Email/Slack notifications
- Network topology visualization
- Custom scan profiles
- Export reports (PDF/CSV)
- Integration with Censys/VirusTotal APIs
β Star this repo if you find it useful!
