Set up email functionality for your self-hosted Formbricks instance
By default, Formbricks doesn’t include an SMTP server for sending emails. However, you can easily configure your self-hosted instance to use your own email provider through environment variables.
# Enable SMTP_SECURE_ENABLED for TLS (port 465)SMTP_SECURE_ENABLED=0# If set to 0, the server won't require authenticationSMTP_AUTHENTICATED=1# Verify the SMTP server certificate against trusted CAs (default and recommended)SMTP_REJECT_UNAUTHORIZED_TLS=1
Do not set SMTP_REJECT_UNAUTHORIZED_TLS=0 in production. It disables SMTP server certificate verification
and makes encrypted connections vulnerable to an active man-in-the-middle attack. If your SMTP server uses a
private certificate authority, mount that CA certificate into the Formbricks container and add it to Node.js’
trust store instead.
Store the CA certificate as a PEM file, mount it read-only, and set NODE_EXTRA_CA_CERTS to the path inside the
container. Keep SMTP_REJECT_UNAUTHORIZED_TLS=1.For Docker Compose, add the following to the Formbricks service:
By default, email verification and password reset features are disabled in Formbricks. To enable these features:
# Set to 0 to enable email verification (requires working SMTP)EMAIL_VERIFICATION_DISABLED=0# Set to 0 to enable password reset functionality (requires working SMTP)PASSWORD_RESET_DISABLED=0# Optional: configure the password reset link lifetime in minutes (5-120, default 30)PASSWORD_RESET_TOKEN_LIFETIME_MINUTES=30