Tinkerer Journal: Hosting my own ATProto server with a Custom Domain and Google's SMTP server
I'm about to host my own ATProto server. It's 01:09am my time, but I want to do this now, before bed, so that it doesn't distract me from important work tomorrow. If you don't know what this is visit:
I have my first issue. The issue is that my domain name needs to point to a server which I have SSH access to. However, at the moment, my domain names point to hashnode. So I have to set up my own server which redirects to hashnode. Then install an ATProto PDS on this sever.
In other words, I'm going to bed and will continue when next I feel like procrastinating.
I feel like procrastinating so I'm back to setting up my personal data server for the ATProto network. The first step I'm taking is setting up my server. Bluesky recommends setting up a server with the following specs:
I have decided to use Amazon's EC2 service to set up my ATProto PDS. The major factor for me was cost, and @awscloud still provides a 12 month free tier for EC2 containers. So I decided to go with them over the only other provider I considered, which was Heroku.
I encountered an email issue. The issue is: I do not receive aws verification emails sent to my personal work email. Why? My email is associated with the domain I just transferred from @squarespace to @Cloudflare, so I suspect faulty MX records. You can see more about that transfer here.
I have confirmed the cause of my email issue. Post email migration, I did not reset-up my gmail account to work with my new domain manager.
I already see benefits in switching to Cloudflare! While setting up my MX records for my Google workspace email, I noticed they have a simple 2 click integration with Google to get me set up seamlessly:
1: <Sign in to Cloudflare>
2: <Authorize>
And afterwards I was all set up.
I have launched my EC2 instance for my ATProto PDS. I stuck with the exact specs recommended for an ATProto PDS. Now, the next step is to install the ATProto server as recommended here:
For anyone new to aws billing practices. If you decide to use aws to set up anything, please note that aws does not automatically activate safety features, so be sure to set up the following on your ATProto server:
- EBS backups
- Billing alerts
- Spend Budget
My PDS has been up for a bit now, but with issues:
1. My usernames show up as invalid.username on Bluesky
2. pdsadmin cannot set my domain name as my username (I suspect I need to do this via bluesky's TXT records)
3. My PDS needs an smtp server to send verification emails
I've decided to solve the issues with my Bluesky PDS when next I want to procrastinate. In the meantime:
1. I found another fediverse tinkerer who documented how they set up their smtp server.
2. I'll ask the Bluesky discord folks for help with issues 1 and 2 above.
I followed this tinkerer's guide and used gmail's smtp server instead. I had a moment when I couldn't locate the env file, but the file was exactly where it should have been.
I had another issue with using my own domain name. This happened because I deleted an account where I'd set it up, then tried to set it up on a new account. The fix was to use the admin api 'com.atproto.admin.updateAccountHandle'
I also had an annoying invalid.handle issue with my pds handle. This happened because Squarespace doesn't support subdomains properly. This issue went away when I switched to a domain on Cloudflare.
I have documented these issues and will update the bluesky docs to help others avoid them. What's amazing to me is how important good documentation is for any project. Working through my issues drove home how a simple good doc can easily save 100s of hours of developer time.
Done. And it’s my second open source contribution of the year lol.
I’m all set up on Bluesky! Follow me at nnadozie[dot]com