Troubleshooting
Solutions to common issues with Inboxorcist.
Startup Issues
Container Won't Start
Symptoms: Docker container exits immediately or shows "exited" status.
Check logs:
docker compose logs inboxorcistCommon causes:
-
Missing environment variables
Error: Missing required environment variable: GOOGLE_CLIENT_IDSolution: Ensure all required variables are set in
.env -
Invalid JWT_SECRET
Error: JWT_SECRET must be at least 32 charactersSolution: Generate a longer secret:
openssl rand -base64 32 -
Invalid ENCRYPTION_KEY
Error: ENCRYPTION_KEY must be 64 hex charactersSolution: Generate correctly:
openssl rand -hex 32 -
Invalid APP_URL
Error: APP_URL must be a valid URLSolution: Ensure it starts with
http://orhttps://
Port Already in Use
Symptoms: Error about port binding.
# Find what's using the port
sudo lsof -i :6616
# Kill the process or change ports in docker-compose.ymlDatabase Connection Failed
Symptoms: PostgreSQL connection errors.
# Check if postgres container is running
docker compose ps postgres
# View postgres logs
docker compose logs postgres
# Verify connection string format
echo $DATABASE_URLOAuth Issues
"Access blocked: This app's request is invalid"
Cause: Redirect URI mismatch.
Solution:
- Go to Google Cloud Console
- Edit your OAuth client
- Ensure Authorized redirect URIs includes your exact URL
- Must match
${APP_URL}/auth/google/callbackexactly
"Error 400: redirect_uri_mismatch"
Cause: Same as above - URI doesn't match.
Checklist:
- Protocol matches (
httpvshttps) - Port number matches
- Path matches exactly (
/auth/google/callback) - No trailing slash differences
"This app isn't verified"
Cause: OAuth app is in testing mode.
Solution: This is expected for self-hosted apps. To proceed:
- Click Advanced
- Click Go to [App Name] (unsafe)
"Authorization Error"
Cause: Various OAuth issues.
Try:
- Clear browser cookies for Google
- Try incognito mode
- Check server logs for specific error
- Ensure test user is added in OAuth consent screen
Token Refresh Failed
Symptoms: Was working, suddenly stopped.
Causes:
- Google credentials were revoked
- Refresh token expired (rare)
- Server clock is significantly wrong
Solution:
- Disconnect Gmail in Inboxorcist
- Reconnect through OAuth flow
Connection Issues
Can't Reach Web UI
Check:
- Container is running:
docker compose ps - Port is exposed: Check
docker-compose.ymlports - Firewall allows traffic:
sudo ufw status - Correct URL and port
API Returns 502 Bad Gateway
With nginx:
- Check API is running:
curl http://localhost:6616/health - Check nginx config:
sudo nginx -t - View nginx logs:
sudo tail -f /var/log/nginx/error.log
WebSocket Connection Failed
Symptoms: Real-time progress updates don't work.
Check nginx config includes:
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';Gmail API Issues
Rate Limit Exceeded
Symptoms: Deletion slows down or pauses.
This is normal. Inboxorcist handles rate limits automatically:
- Uses exponential backoff
- Resumes when limits reset
- No action needed
Quota Exceeded
Symptoms: API errors about quota.
For personal use: Very unlikely to hit.
If you do:
- Wait for daily quota reset (midnight Pacific Time)
- Consider applying for quota increase in Google Cloud Console
Emails Not Being Deleted
Check:
- Gmail connection is valid
- View job status for errors
- Check server logs:
docker compose logs -f inboxorcist
Job Issues
Job Stuck at 0%
Causes:
- Gmail connection lost
- API errors
- Server restart during job
Solution:
- Check server logs for errors
- Verify Gmail is still connected
- Cancel and restart the job
Job Disappeared
Cause: In-memory queue doesn't persist across restarts.
Solution: Use Redis for job persistence:
docker compose --profile full up -dDuplicate Deletions
This shouldn't happen. Inboxorcist tracks message IDs to prevent duplicates.
If you suspect duplicates:
- Check server logs
- Report as bug with logs
Performance Issues
Slow Deletion Speed
Normal factors:
- Gmail API rate limits
- Large number of emails
- Network latency to Google
To improve:
- Ensure stable internet connection
- Deploy closer to Google's servers (US regions)
- Use PostgreSQL instead of SQLite for large mailboxes
High Memory Usage
Causes:
- Processing large batches
- Many concurrent jobs
Solutions:
- Limit concurrent jobs
- Increase container memory limit
- Use Redis to offload job state
SQLite Locking
Symptoms: Database locked errors.
Cause: Multiple processes accessing SQLite.
Solution: Switch to PostgreSQL:
docker compose --profile postgres up -dSSL/TLS Issues
Certificate Errors
With Let's Encrypt:
# Renew certificate
sudo certbot renew
# Check certificate status
sudo certbot certificatesWith self-signed:
Add certificate to trusted store or use --insecure for testing only.
Mixed Content Warnings
Cause: Loading HTTP resources on HTTPS page.
Solution: Ensure APP_URL uses https://
Getting Help
If you can't resolve your issue:
-
Check logs:
docker compose logs -f -
Search existing issues: GitHub Issues
-
Open a new issue with:
- Error message
- Relevant logs (redact secrets!)
- Steps to reproduce
- Environment (Docker, OS, deployment method)
Health Check Endpoint
Use the health endpoint to verify the API is running:
curl http://localhost:6616/healthExpected response:
{"status": "ok"}If health check fails:
- API is not running
- API is still starting
- Port is different than expected
