Quick Diagnostics
Check Service Status
View Logs
Installation Issues
Docker Network Error
Error:network cad_web declared as external, but could not be found
Solution: Create the Docker network before starting containers (production.docker-compose.yml:52-54):
Database Connection Failed
Error:Error: P1001: Can't reach database server
Solution: Verify database configuration in .env.example:4-30:
-
Check database is running:
-
Verify environment variables:
-
Test database connection:
Port Already in Use
Error:bind: address already in use
Solution: Change ports in .env or stop conflicting services:
Node Version Mismatch
Error:The engine "node" is incompatible with this module
Solution: SnailyCAD requires Node.js >= 18.16.0 (package.json:32-34):
PNPM Not Found
Error:pnpm: command not found
Solution: Install pnpm (package.json:54):
Runtime Issues
500 Internal Server Error
Symptoms: White screen or 500 error when accessing the CAD Solutions:-
Check API logs:
-
Verify environment variables:
JWT_SECRETmust be set (.env.example:35)ENCRYPTION_TOKENmust be 32 characters (.env.example:41)CORS_ORIGIN_URLmatches client URL (.env.example:47)
-
Check database migrations:
-
Regenerate Prisma client:
CORS Errors
Error:Access to fetch at '...' from origin '...' has been blocked by CORS policy
Solution: Fix CORS configuration in .env.example:44-59:
Authentication Issues
Symptoms: Can’t login, “Invalid credentials”, or immediately logged out Solutions:-
Check JWT_SECRET:
-
Check cookie settings:
- Clear browser cache and cookies
- Check for clock skew (server time vs. client time)
File Upload Failures
Symptoms: Can’t upload images or files Solutions:-
Check volume permissions (production.docker-compose.yml:34):
-
Verify volume mount:
-
Check disk space:
- Check upload limits in reverse proxy configuration
Database Migration Errors
Error:Migration failed to apply
Solutions:
-
Check migration status:
-
Resolve migration conflicts:
-
Reset database (WARNING: destroys all data):
- Restore from backup and reapply migrations: See Backup & Restore guide.
Performance Issues
Slow Database Queries
Solutions:-
Check database size:
-
Analyze slow queries:
-
Optimize database:
- Add database indexes (check apps/api/prisma/schema.prisma for index opportunities)
High Memory Usage
Solutions:-
Check resource usage:
-
Limit container memory:
production.docker-compose.yml
-
Optimize Node.js memory:
- Check for memory leaks in application logs
Disk Space Full
Solutions:-
Check disk usage:
-
Clean Docker resources:
-
Clean old logs:
-
Clean old backups:
Update Issues
Build Fails After Update
Solutions:-
Clear build cache:
- Check Node version (must be >= 18.16.0)
-
Update pnpm:
- Check for missing environment variables in release notes
Containers Won’t Start After Update
Solutions:-
Check logs:
- Verify environment variables match new requirements
-
Check database migrations:
- Rollback if necessary: See Updating SnailyCAD
Data Loss After Update
Solutions:- Stop all services immediately
- Check if data still exists in database:
- Restore from backup: See Backup & Restore
- Contact support on Discord with detailed logs
Networking Issues
Reverse Proxy Not Working
Symptoms: 502 Bad Gateway, can’t access CAD through domain Solutions:-
Verify containers are running:
-
Check reverse proxy configuration:
- Nginx:
/etc/nginx/sites-available/snailycad - Apache:
/etc/apache2/sites-available/snailycad.conf - Caddy:
/etc/caddy/Caddyfile
- Nginx:
-
Verify proxy passes to correct ports:
- Client: Port from
PORT_CLIENT(.env.example:78) - API: Port from
PORT_API(.env.example:75)
- Client: Port from
-
Check firewall rules:
SSL/TLS Certificate Issues
Symptoms: “Your connection is not private”, SSL errors Solutions:- Verify certificate files exist
- Check certificate validity:
- Renew Let’s Encrypt certificate:
- Update SECURE_COOKIES_FOR_IFRAME (.env.example:70) only when using HTTPS
WebSocket Connection Failed
Symptoms: Real-time updates not working, dispatch/live map issues Solutions:- Check WebSocket configuration in reverse proxy
- Verify Socket.IO connection in browser console
- Check firewall allows WebSocket connections
- Ensure reverse proxy passes WebSocket headers:
Common Error Messages
”JWT_SECRET must be set”
Solution: Set JWT_SECRET in .env.example:35:“ENCRYPTION_TOKEN must be 32 characters”
Solution: Generate and set 32-character token (.env.example:41):“Database does not exist”
Solution: Create the database:“Port is already allocated”
Solution: Change port in .env or stop conflicting service:“Network cad_web not found”
Solution: Create the network:“Permission denied” on file uploads
Solution: Fix permissions:Getting Help
Gathering Information
When seeking help, provide:-
Version information:
-
Error logs:
- Environment (Docker vs Standalone)
- Installation method
- Recent changes (updates, configuration changes)
Support Channels
- Discord: Join Discord - Active community support
- GitHub Issues: Report bugs
- Documentation: docs.snailycad.org
Before Asking for Help
- Check this troubleshooting guide
- Search existing GitHub issues
- Search Discord for similar problems
- Verify you’re on the latest version
- Check your configuration against .env.example
- Review application logs
Preventive Maintenance
Regular Tasks
- Backup regularly - See Backup & Restore
- Update dependencies - Keep Node.js, Docker, and PostgreSQL updated
- Monitor disk space - Ensure adequate free space
- Review logs - Check for warnings or errors
- Test backups - Verify restore procedures work
- Update SnailyCAD - Stay current with latest version
Health Checks
healthcheck.sh
Next Steps
- Updating SnailyCAD - Keep your installation current
- Backup & Restore - Protect your data
- Environment Variables - Configuration reference
- Discord Support - Get help from the community