Troubleshooting
Diagnose and resolve common issues with your self-hosted Documenso instance, organized by component.
General Debugging
Checking Application Logs
Application logs are your primary source of debugging information.
docker logs documensodocker compose logs -f documensokubectl logs -l app.kubernetes.io/name=documenso -n documenso -fFiltering Logs
Filter logs to find specific errors:
# Docker - find errors
docker logs documenso 2>&1 | grep -i error
# Docker - find warnings
docker logs documenso 2>&1 | grep -i warn
# Show last 100 lines
docker logs --tail 100 documensoHealth Checks
Documenso exposes a health endpoint to verify the application is running:
curl http://localhost:3000/api/healthA healthy response returns HTTP 200. If the health check fails:
Check application logs for startup errors
Verify database connectivity
Confirm environment variables are set correctly
Container Status
Check if containers are running and healthy:
docker ps -a | grep documensodocker compose pskubectl get pods -n documenso -o wideEnvironment Variable Verification
Verify environment variables are set correctly inside the container:
docker exec documenso printenv | grep NEXTdocker compose exec documenso printenv | grep NEXTBe cautious when printing environment variables as they may contain sensitive information like passwords and API keys.
Application Issues
Container Fails to Start
Symptoms: Container exits immediately or enters a crash loop.
Check the exit code:
docker inspect documenso --format='{{.State.ExitCode}}'| Exit Code | Meaning |
|---|---|
| 0 | Normal exit |
| 1 | Application error |
| 137 | Out of memory (OOM killed) |
| 139 | Segmentation fault |
| 143 | Terminated by SIGTERM |
Common causes and solutions:
| Cause | Solution |
|---|---|
| Missing required env variable | Check logs for "required environment variable" errors |
| Database connection failure | Verify database URL and connectivity |
| Port already in use | Change the port mapping or stop conflicting services |
| Insufficient memory | Increase container memory limits |
| Invalid certificate | Check certificate path and passphrase |
Application Crashes After Startup
Symptoms: Application starts but crashes during operation.
Check for memory issues:
# Docker
docker stats documenso
# Kubernetes
kubectl top pod -n documensoSolutions:
Increase memory limits in Docker or Kubernetes configuration
Check for memory leaks in custom integrations
Review application logs around the time of crash
Startup Timeout in Kubernetes
Symptoms: Pod marked as unhealthy, enters CrashLoopBackOff.
Cause: Startup probe fails before the application is ready.
Solution: Increase startup probe timeout in your deployment:
startupProbe:
httpGet:
path: /api/health
port: 3000
failureThreshold: 60
periodSeconds: 5This allows up to 5 minutes (60 x 5 seconds) for startup.
Port Conflicts
Symptoms: "Port already in use" error.
Find what's using the port:
# Linux/macOS
lsof -i :3000
# Or using netstat
netstat -tlnp | grep 3000Solutions:
Stop the conflicting service
Change Documenso's port mapping: -p 3001:3000
Database Issues
Connection Refused
Error: connect ECONNREFUSED 127.0.0.1:5432Causes:
- PostgreSQL not running
- Incorrect host in connection string
- Firewall blocking connection
- Database container not started yet
Solutions:
Verify PostgreSQL is running:
# Direct PostgreSQL
pg_isready -h localhost -p 5432
# Docker Compose
docker compose ps databaseCheck connection string host matches database location
For Docker Compose, ensure the database service is defined and started
Verify network connectivity between containers
Authentication Failed
Error: password authentication failed for user "documenso"Causes:
- Incorrect password
- Password contains unescaped special characters
- User does not exist
Solutions:
URL-encode special characters in password (@ becomes %40, # becomes %23)
Verify credentials match database configuration
Reset the password:
ALTER USER documenso WITH PASSWORD 'newpassword';Database Does Not Exist
Error: database "documenso" does not existSolution: Create the database:
CREATE DATABASE documenso;
GRANT ALL PRIVILEGES ON DATABASE documenso TO documenso;Too Many Connections
Error: too many connections for role "documenso"Causes:
- Connection pool exhausted
- Multiple instances without connection pooling
- Connections not being released
Solutions:
Reduce connection pool size in connection string:
postgresql://user:password@host:5432/documenso?connection_limit=5Increase PostgreSQL max_connections
Implement connection pooling with PgBouncer
Migration Failures
Symptoms: Application fails to start with migration errors.
Check migration status:
SELECT * FROM _prisma_migrations WHERE finished_at IS NULL;Common causes:
| Cause | Solution |
|---|---|
| Database locked | Wait for other processes to complete |
| Insufficient disk | Free up disk space on database server |
| Permission denied | Grant schema modification permissions to user |
| Connection through pooler | Use direct database connection for migrations |
Retry failed migration:
Fix the underlying issue
Mark migration as rolled back:
UPDATE _prisma_migrations SET rolled_back_at = NOW() WHERE migration_name = 'failed_migration';Restart the application
SSL Required
Error: SSL/TLS requiredSolution: Add SSL mode to connection string:
postgresql://user:password@host:5432/documenso?sslmode=requireEmail Issues
Emails Not Sending
Symptoms: No emails received, no errors in logs.
Diagnostic steps:
Check email configuration:
docker exec documenso printenv | grep SMTPVerify all required variables are set:
| Variable | Required |
|---|---|
NEXT_PRIVATE_SMTP_TRANSPORT | Yes |
NEXT_PRIVATE_SMTP_FROM_ADDRESS | Yes |
NEXT_PRIVATE_SMTP_FROM_NAME | Yes |
Test SMTP connectivity:
# Test connection to SMTP server
telnet smtp.example.com 587SMTP Connection Timeout
Error: Connection timeoutCauses:
- Incorrect SMTP hostname or port
- Firewall blocking outbound SMTP
- SMTP server unreachable
Solutions:
Verify hostname and port match provider documentation
Check outbound firewall rules for ports 25, 465, 587
Test connectivity from the container:
docker exec documenso nc -zv smtp.example.com 587SMTP Authentication Failed
Error: Invalid login or authentication failedCauses:
- Incorrect username or password
- Account requires app-specific password
- Account security restrictions
Solutions:
Double-check credentials
For Gmail/Microsoft with 2FA, generate an app password
Check provider for security alerts or blocked sign-ins
Emails Going to Spam
Causes:
- Missing SPF record
- Missing DKIM signature
- No DMARC policy
- Poor sender reputation
Solutions:
Configure SPF record for your domain
Set up DKIM signing with your email provider
Add a DMARC policy
Use a reputable email provider
Test deliverability at mail-tester.com
From Address Not Authorized
Error: Sender address rejectedCause: The NEXT_PRIVATE_SMTP_FROM_ADDRESS is not authorized to send from your email provider.
Solutions:
Verify the domain in your email provider's settings
Use an email address from a verified domain
Check provider-specific sender authorization requirements
Signing Issues
No Certificate Found
Error: No certificate found for local signingCauses:
- Certificate path not configured
- Certificate file not mounted
- Environment variable not set
Solutions:
Verify certificate configuration:
docker exec documenso printenv | grep SIGNINGCheck file exists at configured path:
docker exec documenso ls -la /opt/documenso/cert.p12Ensure either NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH or NEXT_PRIVATE_SIGNING_LOCAL_FILE_CONTENTS is set
Certificate Permission Denied
Error: EACCES: permission denied, open '/opt/documenso/cert.p12'Cause: Application cannot read the certificate file.
Solution: Fix file permissions:
# On host before mounting
sudo chown 1001 certificate.p12
chmod 400 certificate.p12Invalid Certificate Password
Error: mac verify failureCause: Incorrect passphrase for the certificate.
Solutions:
Verify NEXT_PRIVATE_SIGNING_PASSPHRASE matches the certificate password
Check for trailing whitespace or encoding issues
Test the password:
openssl pkcs12 -in certificate.p12 -nooutFailed to Get Private Key
Error: Failed to get private key bagsCause: Certificate has no password or incompatible encryption.
Solution: Re-create the certificate with a password and compatible encryption:
openssl pkcs12 -export -out certificate.p12 -inkey private.key -in certificate.crt \
-keypbe PBE-SHA1-3DES \
-certpbe PBE-SHA1-3DES \
-macalg sha1You must set a non-empty password when creating the certificate. Certificates without passwords will fail.
Certificate Expired
Error: Certificate has expiredSolution:
Check expiration date:
openssl pkcs12 -in certificate.p12 -nokeys | openssl x509 -noout -datesGenerate a new certificate or obtain a renewed one from your CA
Update the certificate file and restart Documenso
Base64 Decode Error
Error: Invalid base64 in NEXT_PRIVATE_SIGNING_LOCAL_FILE_CONTENTSCause: Incorrect base64 encoding or line breaks in the value.
Solution: Encode without line breaks:
# macOS
base64 -i certificate.p12 | tr -d '\n'
# Linux
base64 -w 0 certificate.p12Storage Issues
S3 Access Denied
Error: Access DeniedCauses:
- Incorrect IAM credentials
- Bucket policy doesn't allow operations
- CORS not configured
Solutions:
Verify IAM user has required permissions:
{
"Effect": "Allow",
"Action": ["s3:PutObject", "s3:GetObject", "s3:DeleteObject"],
"Resource": "arn:aws:s3:::your-bucket/*"
}Configure CORS for presigned URL uploads
Verify credentials are correct and not expired
S3 Bucket Not Found
Error: The specified bucket does not existCauses:
- Bucket name typo
- Bucket in different region
- Bucket doesn't exist
Solutions:
Verify bucket exists:
aws s3 ls s3://your-bucketCheck NEXT_PRIVATE_UPLOAD_REGION matches bucket region
Create the bucket if it doesn't exist
Signature Mismatch
Error: SignatureDoesNotMatchCauses:
- Incorrect secret access key
- Clock skew between server and S3
Solutions:
Verify credentials are correct
Synchronize server time using NTP:
# Check time
date
# Sync time (Linux)
sudo ntpdate pool.ntp.orgPath-Style Access Required
Error: The bucket you are attempting to access must be addressed using the specified endpointCause: S3-compatible service requires path-style URLs.
Solution: Enable path-style access:
NEXT_PRIVATE_UPLOAD_FORCE_PATH_STYLE=trueFile Upload Timeout
Symptoms: Large file uploads fail or timeout.
Causes:
- Upload size exceeds limit
- Network timeout
- Reverse proxy timeout
Solutions:
Check configured upload limit: NEXT_PUBLIC_DOCUMENT_SIZE_UPLOAD_LIMIT
Increase reverse proxy timeout (nginx client_body_timeout)
For very large files, verify S3 multipart upload is working
Performance Issues
Slow Response Times
Diagnostic steps:
Check container resource usage:
docker stats documensoMonitor database performance:
SELECT query, calls, mean_time
FROM pg_stat_statements
ORDER BY mean_time DESC
LIMIT 10;Check for memory pressure or CPU throttling
Common causes and solutions:
| Cause | Solution |
|---|---|
| Insufficient memory | Increase container memory limits |
| Database slow | Add indexes, increase database resources |
| Network latency | Move database closer to application |
| Large documents | Enable S3 storage instead of database storage |
High Memory Usage
Symptoms: Container OOM killed, slow response times.
Solutions:
Increase memory limits:
# Docker Compose
services:
documenso:
deploy:
resources:
limits:
memory: 2GIf using database storage, switch to S3 for large files
Review and optimize any custom integrations
Database Performance Degradation
Symptoms: Slow queries, timeouts.
Diagnostic queries:
-- Check table sizes
SELECT relname, pg_size_pretty(pg_total_relation_size(relid))
FROM pg_catalog.pg_statio_user_tables
ORDER BY pg_total_relation_size(relid) DESC;
-- Find long-running queries
SELECT pid, now() - pg_stat_activity.query_start AS duration, query
FROM pg_stat_activity
WHERE state != 'idle'
ORDER BY duration DESC;Solutions:
Run VACUUM ANALYZE to update statistics:
VACUUM ANALYZE;Check for missing indexes on frequently queried columns
Consider upgrading database resources
Archive old documents and audit logs
Slow Document Signing
Symptoms: Document completion takes a long time.
Causes:
- Timestamp server latency
- Large PDF files
- Certificate issues
Solutions:
Use a faster timestamp server or one geographically closer
Optimize PDF file sizes before upload
Verify certificate is valid and not causing retries
Network Issues
Cannot Reach Application
Diagnostic steps:
Verify container is running and port is exposed:
docker ps | grep documensoCheck port binding:
netstat -tlnp | grep 3000Test local connectivity:
curl http://localhost:3000/api/healthReverse Proxy Issues
Symptoms: 502 Bad Gateway, connection refused through proxy.
Solutions:
Verify upstream is reachable from the proxy
Check proxy configuration points to correct port
Ensure headers are forwarded correctly:
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;WebSocket Connection Failures
Symptoms: Real-time updates not working.
Solution: Configure reverse proxy for WebSocket support:
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}DNS Resolution Failures
Error: getaddrinfo ENOTFOUND hostnameCauses:
- Incorrect hostname
- DNS not configured in container
- Network isolation
Solutions:
Verify hostname is correct
Check DNS configuration:
docker exec documenso cat /etc/resolv.confFor Docker Compose, use service names for inter-container communication
Getting Help
Before Asking for Help
Gather this information before seeking support:
Documenso version:
docker inspect documenso --format='{{.Config.Image}}'Deployment method: Docker, Docker Compose, Kubernetes, or other
Relevant logs: Filter to show errors around the issue
Steps to reproduce: What actions trigger the problem
Environment: Cloud provider, OS, database type
Community Support
- GitHub Discussions
- Discord: Join the Documenso community Discord
- GitHub Issues: For confirmed bugs, open an issue
Reporting Bugs
When reporting bugs, include:
Clear description of the expected vs actual behavior
Steps to reproduce
Documenso version
Relevant logs (redact sensitive information)
Environment details
Security Issues
For security vulnerabilities, do not open a public issue. Contact security@documenso.com directly.
Troubleshooting Checklist
Use this checklist when diagnosing issues:
See Also
- Backups - Backup and restore procedures
- Upgrades - Upgrade procedures
- Database Configuration - Database setup reference
- Email Configuration - Email troubleshooting
- Signing Certificate - Certificate troubleshooting
- Storage Configuration - Storage troubleshooting