# Check if Sauron is running sudo systemctl status sauron # View recent logs sudo journalctl -u sauron -n 50 # Check port availability sudo netstat -tlnp | grep :443 # Verify domain resolution nslookup your-domain.com # Test SSL certificate openssl s_client -connect your-domain.com:443 -servername your-domain.com
systemctl start sauron fails# Check detailed status sudo systemctl status sauron -l # Check logs for errors sudo journalctl -u sauron --since "10 minutes ago" # Verify binary exists and is executable ls -la /usr/local/bin/sauron
chmod +x /usr/local/bin/sauron# Check certificate files
ls -la tls/cert.pem tls/key.pem
# Verify certificate details
openssl x509 -in tls/cert.pem -text -noout
# Test Cloudflare API
curl -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
"https://api.cloudflare.com/client/v4/user/tokens/verify"
# Check if slug exists in database
sqlite3 config.db "SELECT * FROM user_links WHERE slug='your-slug';"
# Test slug URL directly
curl -v "https://your-domain.com/your-slug"
# Check slug format validation
echo "your-slug" | grep -E "^[A-Za-z0-9_-]{4,16}$"
# Test WebSocket endpoint
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
https://your-domain.com/ws
# Check admin key configuration
echo $ADMIN_KEY
# Check database file permissions ls -la config.db # Verify database integrity sqlite3 config.db "PRAGMA integrity_check;" # Check for database locks lsof config.db
# Check system resources htop free -h df -h # Monitor network connections ss -tulpn | grep :443 # Check service performance sudo systemctl status sauron
Sauron includes secure memory storage that may use significant RAM for credential storage.
# Check memory usage by process ps aux | grep sauron # Monitor memory over time watch -n 5 'free -h && ps aux | grep sauron' # Clear memory caches (if needed) sudo sync && sudo sysctl -w vm.drop_caches=3
# Service logs (systemd) sudo journalctl -u sauron -f # Application logs tail -f logs/system.log tail -f logs/bot.log tail -f logs/emits.log # Error filtering grep -i error logs/system.log grep -i panic logs/system.log
# Stop service sudo systemctl stop sauron # Backup current data cp config.db config.db.backup cp -r logs logs.backup # Reset configuration ./configure-env.sh setup # Reinstall service sudo ./install-production.sh # Restore data if needed cp config.db.backup config.db
# Backup corrupted database mv config.db config.db.corrupted # Create fresh database ./sauron --init-db # Restore data from backup if available sqlite3 config.db < backup.sql
systemctl status saurondf -hfree -h