Lightweight IPFS hot node service that provides temporary high-speed storage for video uploads, automatically migrates content to supernode within 7 days, and provides operators with an admin dashboard for monitoring and manual intervention.
- π Automatic log parsing and pin tracking
- β MongoDB validation against Traffic Director
- π¦ Automatic migration to supernode (4-7 day window)
- π§Ή Automatic cleanup and garbage collection
- π Real-time monitoring dashboard with authentication
- π Health check API for Traffic Director integration
- π Discord notifications for critical events
- ποΈ Manual intervention via web UI
- π Password-protected admin controls
- ~50 videos/day
- HLS structures with recursive pins
- 7-day migration window (strict)
- Ubuntu 20.04+ (or Debian-based Linux)
- Node.js v20+
- Kubo IPFS v0.30+
- nginx v1.18+
- SQLite3
- 4GB RAM minimum
- 500GB+ disk space
# Clone the repository
cd /opt
sudo git clone <repository-url> ipfs-hotnode
cd ipfs-hotnode
# Run the installation script (as root)
sudo bash scripts/install.sh# Install dependencies
npm install
# Initialize database
npm run init-db
# Configure environment variables
cp .env.example .env
nano .env
# Set your admin password and other settings
# Required: ADMIN_PASSWORD, SUPERNODE_API
# Optional: MONGODB_URI (for video validation)
# Start the service
npm start# Enable and start the service
sudo systemctl enable ipfs-hotnode
sudo systemctl start ipfs-hotnode
# Check status
sudo systemctl status ipfs-hotnode
# View logs
sudo journalctl -u ipfs-hotnode -fAll configuration is done via environment variables in the .env file.
Copy .env.example to .env and configure:
# Required
ADMIN_PASSWORD=your_secure_password_here
SUPERNODE_API=https://ipfs.3speak.tv
# Optional
MONGODB_URI=mongodb://username:password@host:port/database
HOTNODE_NAME=HotNode-01
HOTNODE_PORT=3101
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
# Migration Settings
MIGRATION_START_AFTER_DAYS=4
MIGRATION_DELETE_AFTER_DAYS=7
# Cleanup Settings
CLEANUP_INVALID_RETENTION_DAYS=2
# Health Thresholds
HEALTH_DISK_WARNING_PERCENT=80
HEALTH_DISK_CRITICAL_PERCENT=90See .env.example for all available options with descriptions.
Access the web UI at: http://your-server:3101
The dashboard is view-only by default. To perform administrative actions:
- Click π Login in the top-right corner
- Enter your admin password (from
.env) - All controls become enabled
Protected Actions:
- Toggle enable/disable hotnode
- Add/remove pins manually
- Trigger migrations or garbage collection
- Modify settings
See AUTHENTICATION.md for details.
- Dashboard: System status, pin statistics, repo usage
- Pins: Browse/search pins, manual pin management
- Stats: Traffic graphs and bandwidth analytics
- Settings: Configuration, manual worker triggers
The Traffic Director polls the health check endpoint:
GET http://your-server:3100/healthResponse includes:
- Enabled status
- Disk usage percentage
- Bandwidth metrics (24h)
- Pin counts (total, pending, overdue)
The service runs several background workers:
- MongoDB Validator (every 30 minutes) - Validates CIDs against Traffic Director
- Migration Worker (every 12 hours) - Migrates old content to supernode
- Cleanup Worker (daily at 2 AM) - Unpins migrated content, runs GC
- Stats Aggregator (hourly) - Collects bandwidth and repo statistics
Encoder β nginx:5001 β Kubo IPFS β Hot Node Service β Supernode
β β
access.log SQLite DB
β
Admin Dashboard
β
Traffic Director
- 5001: IPFS API (nginx proxy for uploads)
- 8080: IPFS Gateway (public content access)
- 4001: IPFS Swarm (p2p networking)
- 3101: Admin Dashboard & API
- β Password-protected admin dashboard (session-based auth)
β οΈ No authentication on IPFS API (open contribution model)- β MongoDB validator prevents abuse
β οΈ Admin dashboard should be internal/VPN/firewalled- β
Sensitive credentials in
.env(not committed to git) - β Regular GC prevents disk exhaustion
Important: Never commit .env to version control!
- β Cleanup worker runs
- β Stats aggregated
- β Health check responding
- Review migration success rate
- Check for overdue pins
- Review disk usage trends
- Verify supernode connectivity
sudo systemctl status ipfs-hotnode
sudo journalctl -u ipfs-hotnode -n 100ipfs id
ipfs pin ls --type=recursive | wc -l
ipfs repo stattail -f /var/log/nginx/ipfs-access.log
tail -f /var/log/nginx/ipfs-error.logsqlite3 database/hotnode.db "SELECT status, COUNT(*) FROM pins GROUP BY status;"
sqlite3 database/hotnode.db "SELECT * FROM pins WHERE migrated=0 ORDER BY added_at DESC LIMIT 10;"# Run in development mode
npm run dev
# Initialize fresh database
npm run init-db
# Test individual workers
npm run worker:validate # MongoDB validator
npm run worker:migrate # Migration worker
npm run worker:cleanup # Cleanup & GC
npm run worker:stats # Stats aggregator- README.md - This file (overview)
- QUICKSTART.md - Get running in 5 minutes
- AUTHENTICATION.md - Admin auth setup
- DEPLOYMENT.md - Production deployment guide
- DEVELOPMENT.md - Developer documentation
- PROJECT_STRUCTURE.md - Code organization
- PROJECT_SUMMARY.md - Technical overview
MIT
For issues and questions, contact: [email protected]