Zum Hauptinhalt springen
Version: 4.0

Mail notifications in OpenCloud

This guide shows how to configure your OpenCloud instance to send notification E-Mails by modifying the .env file in your OpenCloud setup

Open the .env File​

Edit the file with your preferred text editor:

nano .env

Or use vim, code, or gedit as you prefer.

Add or modify these Environment Variables​

Adjust the following lines in your .env file according to your SMTP provider and requirements.

SMTP Settings:

SMTP_HOST=YOUR_SMTP_HOST
SMTP_PORT=1025
SMTP_SENDER=noreply@your.text
SMTP_USERNAME=YOUR_USERNAME
SMTP_PASSWORD=YOUR_PASSWORD
SMTP_TRANSPORT_ENCRYPTION=none
SMTP_INSECURE=true
SMTP_AUTHENTICATION=auto

For available configuration options and values, see the Environment Variables section in the developer documentation.

The variables used in the .env file of opencloud-compose are mapped to the corresponding OpenCloud environment variables in docker-compose.yml. Their names are not always identical.

For example, SMTP_TRANSPORT_ENCRYPTION in the .env file maps to NOTIFICATIONS_SMTP_ENCRYPTION in OpenCloud, not NOTIFICATIONS_SMTP_TRANSPORT_ENCRYPTION.

When configuring OpenCloud directly without opencloud-compose, use the environment variable names listed in the developer documentation.

Per default the notifications service is disabled. To send out notifications, the service must be enabled via:

START_ADDITIONAL_SERVICES="notifications"
warnung

In the .env file, values should be written without quotation marks. Do not use 'single quotes' or "double quotes" — just enter the plain value.

Save and exit​

For nano, press Ctrl + O to save and Ctrl + X to exit.

Restart OpenCloud​

Apply the changes by restarting the OpenCloud services:

docker compose down
docker compose up -d

OpenCloud is now successfully configured to deliver notification emails, including those triggered by actions such as file sharing.