Post

Self Hosting a Personal Data Server (PDS) for BlueSky

Self Host a Personal Data Server (PDS) for your BlueSky Account

Self Hosting a Personal Data Server (PDS) for BlueSky

Self-Hosting a Bluesky PDS

Self-hosting a Bluesky Personal Data Server (PDS) allows you to run your own instance that federates with the wider ATProto network. This guide covers setting up a PDS on a Digital Ocean droplet, configuring DNS, and maintaining your server.

Table of Contents

Preparation for Self-Hosting PDS

Launch a server on a cloud provider such as Digital Ocean or Vultr. Ensure SSH access and root privileges.

Server Requirements

  • Public IPv4 address
  • Public DNS name
  • Inbound access on ports 80/tcp and 443/tcp

| Operating System | Ubuntu 22.04 | |—————–|————-| | RAM | 1 GB | | CPU Cores | 1 | | Storage | 20 GB SSD |

Restrict SSH (port 22) to your IP using ifconfig.me to find it.

Opening Cloud Firewall for HTTP and HTTPS

Ensure the following ports are open:

  • 80/tcp (Used for TLS verification)
  • 443/tcp (Used for app requests)

Configuring DNS on Name.com

  1. Log into your Name.com account.
  2. Navigate to DNS Records.
  3. Add these records, replacing example.com and 12.34.56.78 with your domain and IP:

    NameTypeValueTTL
    example.comA12.34.56.78600
    *.example.comA12.34.56.78600

Verifying DNS

Use DNS Checker to confirm propagation. Run:

1
dig A example.com

Expected output: your server’s IP.

Installing PDS on Ubuntu/Debian

SSH into your server and run:

1
2
wget https://raw.githubusercontent.com/bluesky-social/pds/main/installer.sh
sudo bash installer.sh

Checking PDS Status

Verify your PDS is online:

1
curl https://example.com/xrpc/_health

Expected response:

1
{"version":"0.2.2-beta.2"}

Test WebSocket connectivity:

1
wsdump "wss://example.com/xrpc/com.atproto.sync.subscribeRepos?cursor=0"

Creating an Account

Using pdsadmin

1
sudo pdsadmin account create

Using an Invite Code

1
sudo pdsadmin create-invite-code

Use this code when registering via the Bluesky app.

Using the Bluesky App

  1. Download the app for Web, iPhone, or Android.
  2. Enter your PDS URL (e.g., https://example.com/).

Updating PDS

Keep your PDS up to date:

1
sudo pdsadmin update

Setting Up a Cron Job for Updates

To automate updates, edit the cron jobs:

1
crontab -e

Add the following line to run updates at 1:30 AM on the 1st and 15th of each month:

1
30 1 1,15 * * psadmin update

Getting Help

For troubleshooting:

1
docker logs caddy --tail=50 --follow

Check if the service is running:

1
curl https://example.com/xrpc/_health

If issues persist, restart the service:

1
systemctl restart pds.service

This guide ensures a reliable, self-hosted Bluesky PDS. Happy hosting!

All rights reserved by the author.