- ASUS RT-AC68U router with DD-WRT or Asuswrt-Merlin
- USB drive (8GB+ recommended)
- SSH access enabled
# 1. SSH into router
ssh admin@192.168.1.1
# 2. Install Entware (if not already installed)
wget -O - http://bin.entware.net/armv7sf-k3.2/installer/generic.sh | sh
opkg update
# 3. Install packages
opkg install php7-cli php7-cgi php7-mod-sqlite3 php7-mod-fileinfo
opkg install lighttpd lighttpd-mod-fastcgi sqlite3-cli
# 4. Deploy files (from your computer)
chmod +x deploy.sh
./deploy.sh 192.168.1.1 admin
# 5. Done! Open http://192.168.1.1 in browserIMPORTANT: The ASUS RT-AC68U has specific PHP compatibility issues:
Option 1: Switch to DD-WRT (Recommended)
- DD-WRT typically has better PHP package support
- More stable for this use case
- See full installation guide in INSTALLATION.md
Option 2: Use PirateBox Alternative
- If PHP won't install, you can use PirateBox as the backend
- Modify the system to work with PirateBox's infrastructure
- Not ideal but functional
Option 3: Manual PHP Compilation
- Advanced users only
- Time-consuming process
- See: https://www.php.net/manual/en/install.unix.php
Before proceeding, verify PHP is available:
# Check available PHP packages
opkg list | grep php
# Expected output should show php7 or php8 packages
# If nothing appears, PHP is not available in your Entware feed- Group Chat: Anonymous messaging with priority flags
- File Sharing: Upload/download files up to 5GB
- File Linking: Reference files in chat messages
- Offline Operation: No internet needed
- Multi-user: Supports concurrent users
Fix: Your Entware feed doesn't support PHP. Options:
- Switch to DD-WRT firmware
- Try different Entware architecture
- Use alternative backend (NodeJS, Python)
Fix: Check these settings in /opt/etc/php.ini:
upload_max_filesize = 5G
post_max_size = 5GThen restart: /opt/etc/init.d/S80lighttpd restart
"Can't access http://192.168.1.1"
Fix:
- Verify lighttpd is running:
ps | grep lighttpd - Check logs:
tail /opt/var/log/lighttpd/error.log - Restart service:
/opt/etc/init.d/S80lighttpd restart
Fix:
rm /opt/share/data/emergencybox.db
php /opt/share/www/api/init_db.phpRouter filesystem:
/opt/share/www/ ← Web files
/opt/share/www/uploads/ ← Uploaded files
/opt/share/data/ ← SQLite database
/opt/etc/lighttpd.conf ← Web server config
/opt/etc/php.ini ← PHP config
# On router via SSH:
mkdir -p /opt/share/www/uploads/{emergency,media,documents,general}
mkdir -p /opt/share/data
# From your computer:
cd emergencybox
scp -r www/* admin@192.168.1.1:/opt/share/www/
scp config/php.ini admin@192.168.1.1:/opt/etc/php.ini
scp config/lighttpd.conf admin@192.168.1.1:/opt/etc/lighttpd/lighttpd.conf
# Back on router:
chmod -R 755 /opt/share/www
chmod -R 777 /opt/share/www/uploads
php /opt/share/www/api/init_db.php
/opt/etc/init.d/S80lighttpd restartAfter installation, test these features:
- Can access http://192.168.1.1
- Can send a chat message
- Can send a priority message
- Can upload a small file (<10MB)
- Can upload a large file (>100MB)
- Can download a file
- Can link a file to a message
- Can search files
- Can create custom folder
- Messages persist after page refresh
- Files appear in correct categories
Edit /opt/etc/lighttpd/lighttpd.conf:
server.port = 8080
Access at: http://192.168.1.1:8080
-
Edit
/opt/etc/php.ini:upload_max_filesize = 10G post_max_size = 10G
-
Edit
/opt/etc/lighttpd/lighttpd.conf:server.max-request-size = 10737418240 -
Edit
/opt/share/www/api/config.php:define('MAX_FILE_SIZE', 10 * 1024 * 1024 * 1024);
-
Restart:
/opt/etc/init.d/S80lighttpd restart
Edit /opt/etc/php.ini:
memory_limit = 128M # Down from 256MEdit /opt/etc/lighttpd/lighttpd.conf:
server.max-connections = 25 # Down from 50
Create/edit /jffs/scripts/post-mount:
#!/bin/sh
sleep 5
/opt/etc/init.d/S80lighttpd startMake executable:
chmod +x /jffs/scripts/post-mount# From router
scp /opt/share/data/emergencybox.db user@backupserver:/backups/
# Or download to your computer
scp admin@192.168.1.1:/opt/share/data/emergencybox.db ./backup.db# Upload to router
scp backup.db admin@192.168.1.1:/opt/share/data/emergencybox.db- Use USB 3.0 drive (if supported)
- Format USB as ext4, not FAT32
- Don't run unnecessary services on router
- Limit concurrent users to 10-20 for best performance
- Clear old messages periodically
- Delete unused files to save space
# Backup first!
rm -rf /opt/share/www
rm -rf /opt/share/data
rm /opt/etc/lighttpd/lighttpd.conf
# Then redeploy
./deploy.sh# Disk space
df -h
# Memory usage
free
# Running processes
top
# Web server status
/opt/etc/init.d/S80lighttpd status- Router firmware updated and tested
- Entware/Optware installed and working
- All packages installed and verified
- EmergencyBox deployed and tested
- Auto-start configured
- Backup of configuration saved
- Multiple devices tested for connectivity
- Large file upload/download tested
- Storage capacity planned
- WiFi password secured
- Router physically secured
- Backup power supply ready (battery/generator)
- Keep router in central, accessible location
- Protect from weather/water damage
- Monitor storage capacity
- Have backup router pre-configured
- Train coordinators on basic troubleshooting
- Keep documentation accessible (print USAGE.md)
- Check logs:
tail -f /opt/var/log/lighttpd/error.log - Read full INSTALLATION.md for detailed troubleshooting
- Review DEVELOPMENT.md for customization
- GitHub Issues: https://github.com/anthropics/claude-code/issues
Once basic installation works:
- Customize UI: Edit
www/css/style.cssfor branding - Add categories: Create custom file categories
- Security: Set strong WiFi password, change router admin password
- Test at scale: Simulate disaster scenario with multiple users
- Document local setup: Note any router-specific quirks
- Create backup: Full system backup before deployment
Remember: EmergencyBox is designed for offline disaster scenarios. Test thoroughly before actual deployment!