SMTP Setup
Setting up an SMTP server for the backend in Paperless-ngx allows you to send emails directly from the system, most commonly for password reset purposes. These environment variables closely mirror the corresponding Django email settings, ensuring easy configuration.
Environment Variables
- PAPERLESS_EMAIL_HOST (default:
localhost
) - PAPERLESS_EMAIL_PORT (default:
25
) - PAPERLESS_EMAIL_HOST_USER (default:
''
) - PAPERLESS_EMAIL_FROM (default: same as PAPERLESS_EMAIL_HOST_USER if not set)
- PAPERLESS_EMAIL_HOST_PASSWORD (default:
''
) - PAPERLESS_EMAIL_USE_TLS (default:
false
) - PAPERLESS_EMAIL_USE_SSL (default:
false
)
To configure these in a Docker environment, simply add them to your docker-compose.yml under the environment
section of the paperless-ngx service. For example:
services:
paperless-ngx:
image: ghcr.io/paperless-ngx/paperless-ngx:latest
environment:
- PAPERLESS_EMAIL_HOST=smtp.yourprovider.com
- PAPERLESS_EMAIL_PORT=587
- PAPERLESS_EMAIL_HOST_USER=youremail@provider.com
- PAPERLESS_EMAIL_HOST_PASSWORD=supersecretpassword
- PAPERLESS_EMAIL_FROM=youremail@provider.com
- PAPERLESS_EMAIL_USE_TLS=true
Once set, Paperless-ngx will use these SMTP settings to send necessary notifications, such as password reset emails. Adjust values as needed based on your email provider’s requirements.
It’s generally best practice to use TLS or SSL for secure email communication. Make sure you enable the correct protocol flags (PAPERLESS_EMAIL_USE_TLS
or PAPERLESS_EMAIL_USE_SSL
) for your provider.
No Comments