[solved] SMTP settings in config.ini

Hi there,

I’m looking for a way to set my SMTP host with Gitea without writing my password in the config.ini file. Is this possible?

Thanks !

Assuming you are deploying Gitea from a container: yes, with the external environment-to.ini command.
I think that command is run by default in the container deployments (but I’m unsure about that).

If you mean “use external file”, then this one: Add support for file-based environment variables in environment-to-ini by aminosbh · Pull Request #19857 · go-gitea/gitea · GitHub

I’m running Gitea from binary and from what I understand about that command for Docker solution, the .ini file is still used for SMTP settings so my password is still written in a file on my server.

If my server is accessed by someone else, my password could be read.

There is no other password provider at the moment.

Even if there is some password provider, the people with related permission on your server could still read the cleartext password, there is no different indeed.

So, protect your server first. And do not use your personal email account for sending notifications.

Ok! Thank you for your answers :slightly_smiling_face: