If Grafana is run using Docker, the configuration for email notification can be passed in via environment variables
Example if using SendGrid as the SMTP server
export GF_SERVER_ROOT_URL="https://grafana.example.com" export GF_SMTP_FROM_ADDRESS="systemalert@example.com" export GF_SMTP_USER="apikey" export GF_SMTP_PASSWORD="password/apikey" # start grafana docker run -d -p 3000:3000 --name=grafana --restart unless-stopped -v grafana-storage:/var/lib/grafana \ --env GF_SERVER_ROOT_URL \ -e "GF_SMTP_ENABLED=true" \ -e "GF_SMTP_HOST=smtp.sendgrid.net:587" \ -e GF_SMTP_FROM_ADDRESS \ -e GF_SMTP_USER \ -e GF_SMTP_PASSWORD \ grafana/grafana