Skip to content
HomeKnowledge BaseStatisticsChangelog GitHub Discord Email
operations / SMTP Setup

No results for ""

SMTP Setup

Overview

Demyx uses ssmtp to send notification emails. Configure it in the host environment to receive alerts from healthchecks and other system events.

Configuration

Run demyx host edit and set the following:

bash
DEMYX_SMTP=true
DEMYX_SMTP_TO=recipient@yourdomain.com
DEMYX_SMTP_FROM=demyx@yourdomain.com
DEMYX_SMTP_HOST=smtp.yourmailprovider.com
DEMYX_SMTP_PORT=587
DEMYX_SMTP_USERNAME=your@email.com
DEMYX_SMTP_PASSWORD=yourpassword

Then restart the host stack:

bash
demyx host restart

Testing

Send a test email to verify the configuration:

bash
demyx smtp

If you receive [DEMYX] SMTP test in your inbox with "Success." as the body, SMTP is working.

Provider Examples

Gmail

bash
DEMYX_SMTP_HOST=smtp.gmail.com
DEMYX_SMTP_PORT=587
DEMYX_SMTP_USERNAME=you@gmail.com
DEMYX_SMTP_PASSWORD=your-app-password
Use a Gmail App Password (not your account password). Enable 2FA and generate one at Google Account → Security → App passwords.

Mailgun

bash
DEMYX_SMTP_HOST=smtp.mailgun.org
DEMYX_SMTP_PORT=587
DEMYX_SMTP_USERNAME=postmaster@mg.yourdomain.com
DEMYX_SMTP_PASSWORD=your-mailgun-smtp-password

SendGrid

bash
DEMYX_SMTP_HOST=smtp.sendgrid.net
DEMYX_SMTP_PORT=587
DEMYX_SMTP_USERNAME=apikey
DEMYX_SMTP_PASSWORD=your-sendgrid-api-key

Troubleshooting

If demyx smtp fails, check:

  1. DEMYX_SMTP=true is set
  2. Host was restarted after editing
  3. SMTP credentials are correct
  4. Port 587 is not blocked by your server's firewall