Using Proton Mail as Email Server in Bluesky PDS
This week, Bluesky launched its early access federation for self-hosters. It lets you set up a Personal Data Server to host your data. Setting up a PDS is super easy. You need to follow the steps documented in their bluesky-social/pds repo.
The email server is the only thing that doesn't work out of the box. Since I already use Protonmail, I decided to use their STMP submission feature, which is available to Proton for business subscribers.
The steps to set up Proton Mail are pretty straightforward:
Create an SMTP submission token in your Proton account's settings
SSH into your Bluesky PDS instance
Go to
/pds
and open thepds.env
file with your editor of choiceAdd the following environment variables:
PDS_EMAIL_SMTP_URL=smtps://[USERNAME]:[
SMTP_TOKEN]@smt
p.protonmail.ch:465
PDS_EMAIL_FROM_ADDRESS=no-reply@[HOST]
Where
[USERNAME]
is your SMTP username (the email address),[SMTP_TOKEN]
is the token you generated in step 1, and[HOST]
is either the usual email domain you use in Proton Mail, or the domain where you're running your PDS (which you should add as domain to Proton Mail anyways).
Restart the PDS service by running
systemctl restart pds
Once you've completed these five steps, your PDS instance should be ready to send emails. A quick way to test it is by creating a new account and ensuring you receive the email verification email in your inbox.
Subscribe to my newsletter
Read articles from Mauricio Schneider directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by