Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Configure Seafile To Send Emails Through Gmail

You need to configure Seafile to be able to send emails in order to have new users sent their password via email, or for the user to recieve password reset notifications. This tutorial will show you how to configure Seafile to use your existing Gmail account in order to send emails. If you are a business with an AWS account, then you may wish to configure Seafile with SES SMTP instead.


The first thing you need to do is create an app-specific password in your gmail account. That way if your server becomes compromised and a malicious user manages to retrieve your password, you can remove that password from your account and not have to reconfigure the rest of your applications with new a password.

Now edit your configuration file at conf/ and append the lines below. The conf folder will be on the same level as your seafile-server-latest symlink.

EMAIL_HOST_PASSWORD = 'my-app-specific-password'

Make sure to change the values of EMAIL_HOST_USER and EMAIL_HOST_PASSWORD.

Restart Seahub

For the changes to take effect you need to run:

./ stop
./ start

To test that everything is working, execute a password reset. A pop-up will appear and tell you if it managed to send the email or if your configuration is incorrect.


Last updated: 2nd September 2018
First published: 16th August 2018