🚀 Feature: Configure SMTP via Environment Variables #401

Closed
opened 2025-10-08 00:07:02 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @userbradley on GitHub.

Feature description

Ability to configure SMTP config via Environment variables

Pitch

It would be nice to be able to set the SMTP configuration from environment variables

Image

Something like the below

Variable Description
SMTP_HOST Mailserver Host
SMTP_PORT Port of the SMTP mail server
SMTP_USER Username of the SMTP account you wish to send emails as
SMTP_PASSWORD Password of the SMTP user you wish to send emails as
SMTP_TLS Should SMTP use TLS
SMTP_SKIP_CERT_VALIDATION Should validation on the SMTP certificate be validated

My use case comes as I am running this in Kubernetes, and I'd like to get as much config out the way in code as possible before logging in for the first time etc, also allows me to seamlessly rotate secrets in my secret manager of choice when it just restarts the pod when a k8s secret changes

Originally created by @userbradley on GitHub. ### Feature description Ability to configure SMTP config via Environment variables ### Pitch It would be nice to be able to set the SMTP configuration from environment variables ![Image](https://github.com/user-attachments/assets/1981ad86-a26e-4c84-a52f-1c5b9e90ee67) Something like the below |Variable | Description | | --- | --- | | `SMTP_HOST` | Mailserver Host | | `SMTP_PORT` | Port of the SMTP mail server | | `SMTP_USER` | Username of the SMTP account you wish to send emails as | | `SMTP_PASSWORD` | Password of the SMTP user you wish to send emails as | |`SMTP_TLS` | Should SMTP use TLS | | `SMTP_SKIP_CERT_VALIDATION` | Should validation on the SMTP certificate be validated | My use case comes as I am running this in Kubernetes, and I'd like to get as much config out the way in code as possible before logging in for the first time etc, also allows me to seamlessly rotate secrets in my secret manager of choice when it just restarts the pod when a k8s secret changes
OVERLORD added the feature label 2025-10-08 00:07:02 +03:00
Author
Owner

@userbradley commented on GitHub:

Yes I agree. I opened this issue whilst confirming SMTP haha!

But yes, I think being able to supply a yaml file or env variables would be preferable for all app settings

@userbradley commented on GitHub: Yes I agree. I opened this issue whilst confirming SMTP haha! But yes, I think being able to supply a yaml file or env variables would be preferable for all app settings
Author
Owner

@stonith404 commented on GitHub:

I believe it’s more logical to allow all “Application Settings” to be defined via environment variables, rather than limiting this flexibility solely to SMTP configuration.

@stonith404 commented on GitHub: I believe it’s more logical to allow all “Application Settings” to be defined via environment variables, rather than limiting this flexibility solely to SMTP configuration.
Author
Owner

@stonith404 commented on GitHub:

This has been released in v0.31.0. For more information check out the docs.

@stonith404 commented on GitHub: This has been released in `v0.31.0`. For more information check out the [docs](https://pocket-id.org/docs/configuration/environment-variables#overriding-the-ui-configuration).
Author
Owner

@kmendell commented on GitHub:

I was exploring how other applications do this, and its seems like if a env variable is defined it will be prioritized over the UI, and then that can not be edited via the UI if set in a env variable or on next restart the env value will replace whatever was set in the UI, does this sound like a solid approach for this?

@kmendell commented on GitHub: I was exploring how other applications do this, and its seems like if a env variable is defined it will be prioritized over the UI, and then that can not be edited via the UI if set in a env variable or on next restart the env value will replace whatever was set in the UI, does this sound like a solid approach for this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-1#401