···1717 - [What is AT Protocol?](#what-is-at-protocol)
1818 - [Where is the code?](#where-is-the-code)
1919 - [What is the current status of federation?](#what-is-the-current-status-of-federation)
2020- - [Self-hosting PDS](#self-hosting-pds)
2121- - [Preparation for self-hosting PDS](#preparation-for-self-hosting-pds)
2020+ - [Self-hosting a PDS](#self-hosting-a-pds)
2121+ - [Deploying a PDS onto a VPS](#deploying-a-pds-onto-a-vps)
2222 - [Open your cloud firewall for HTTP and HTTPS](#open-your-cloud-firewall-for-http-and-https)
2323 - [Configure DNS for your domain](#configure-dns-for-your-domain)
2424 - [Check that DNS is working as expected](#check-that-dns-is-working-as-expected)
2525- - [Installer on Ubuntu 20.04/22.04/24.04 and Debian 11/12](#installer-on-ubuntu-200422042404-and-debian-1112)
2525+ - [Installing on Ubuntu 20.04/22.04/24.04 and Debian 11/12/13](#installing-on-ubuntu-200422042404-and-debian-111213)
2626 - [Verifying that your PDS is online and accessible](#verifying-that-your-pds-is-online-and-accessible)
2727 - [Creating an account using pdsadmin](#creating-an-account-using-pdsadmin)
2828 - [Creating an account using an invite code](#creating-an-account-using-an-invite-code)
···56565757### What is the current status of federation?
58585959-As of Spring 2024, the AT Protocol network is open to federation!
5959+The AT Protocol network is open to federation!
60606161✅ Federated domain handles (e.g. `@nytimes.com`)
6262···70707171✅ Federated moderation (labeling)
72727373-## Self-hosting PDS
7373+## Self-hosting a PDS
74747575Self-hosting a Bluesky PDS means running your own Personal Data Server that is capable of federating with the wider Bluesky social network.
76767777-### Preparation for self-hosting PDS
7777+### Deploying a PDS onto a VPS
78787979-Launch a server on any cloud provider, [Digital Ocean](https://digitalocean.com/) and [Vultr](https://vultr.com/) are two popular choices.
7979+This README provides instructions for deploying a PDS using our install script onto a Virtual Private Server. [Digital Ocean](https://digitalocean.com/) and [Vultr](https://vultr.com/) are two popular choices for VPS hosting.
80808181Ensure that you can ssh to your server and have root access.
8282···135135136136These should all return your server's public IP.
137137138138-### Installer on Ubuntu 20.04/22.04/24.04 and Debian 11/12
138138+### Installing on Ubuntu 20.04/22.04/24.04 and Debian 11/12/13
139139+140140+Note that this script assumes a relatively "fresh" VPS that is not also concurrently hosting a web server or anything else on port 80/443. If you intend to run a PDS alongside an existing webserver on the same VPS, you will not want to use this install script.
139141140140-On your server via ssh, download the installer script using wget:
142142+On your server, download the install script using `curl`:
141143142144```bash
143143-wget https://raw.githubusercontent.com/bluesky-social/pds/main/installer.sh
145145+curl https://raw.githubusercontent.com/bluesky-social/pds/main/installer.sh > installer.sh
144146```
145147146146-or download it using curl:
148148+And then run the installer using `bash`. You will need `sudo` permissions to continue:
147149148150```bash
149149-curl https://raw.githubusercontent.com/bluesky-social/pds/main/installer.sh >installer.sh
151151+sudo bash installer.sh
152152+```
153153+154154+The install script is interactive and will prompt for input during the install process. You will need to provide your public DNS address, an admin email address (which does not need to be from the same domain), and be prompted to create a PDS user account with its own email address and handle. If you plan to reuse an existing AT handle, you can skip user account creation, though if it is your first time deploying a PDS you may want to create an account using your domain like `account.your-domain.net` for testing purposes.
155155+156156+Upon completion of a successful installation, you'll receive output similar to the following:
157157+158158+```
159159+========================================================================
160160+PDS installation successful!
161161+------------------------------------------------------------------------
162162+163163+Check service status : sudo systemctl status pds
164164+Watch service logs : sudo docker logs -f pds
165165+Backup service data : /pds
166166+PDS Admin command : pdsadmin
167167+168168+Required Firewall Ports
169169+------------------------------------------------------------------------
170170+Service Direction Port Protocol Source
171171+------- --------- ---- -------- ----------------------
172172+HTTP TLS verification Inbound 80 TCP Any
173173+HTTP Control Panel Inbound 443 TCP Any
174174+175175+Required DNS entries
176176+------------------------------------------------------------------------
177177+Name Type Value
178178+------- --------- ---------------
179179+your-domain.net A your-ip-address
180180+*.your-domain.net A your-ip-address
181181+182182+Detected public IP of this server: your-ip-address
183183+184184+To see pdsadmin commands, run "pdsadmin help"
185185+186186+========================================================================
150187```
151188152152-And then run the installer using bash:
189189+And, following account creation:
153190154154-```bash
155155-sudo bash installer.sh
191191+```
192192+Account created successfully!
193193+-----------------------------
194194+Handle : handle.your-domain.net
195195+DID : did:plc:your-did
196196+Password : your-password
197197+-----------------------------
198198+Save this password, it will not be displayed again.
156199```
157200158201### Verifying that your PDS is online and accessible
159202160203> [!TIP]
161161-> The most common problems with getting PDS content consumed in the live network are when folks substitute the provided Caddy configuration for nginx, apache, or similar reverse proxies. Getting TLS certificates, WebSockets, and virtual server names all correct can be tricky. We are not currently providing tech support for other configurations.
204204+> The most common problems with getting PDS content consumed in the live network usually result from users trying to port the provided Caddy configuration to Nginx, Apache, or other reverse proxies. Getting TLS certificates, WebSockets, and virtual server names provisioned can be challenging. We are not currently providing tech support for other configurations.
162205163163-You can check if your server is online and healthy by requesting the healthcheck endpoint.
206206+After installation, your PDS should be live and accessible on the web. You can check if your server is online and healthy by making a request to `https://your-domain.net/xrpc/_health` (the healthcheck endpoint). You should see a JSON response with a version, like:
164207165165-You can visit `https://example.com/xrpc/_health` in your browser. You should see a JSON response with a version, like:
208208+Visit `https://your-domain.net/xrpc/_health` in your browser. You should see a JSON response with a version, like:
166209167210```
168211{"version":"0.2.2-beta.2"}
···174217wsdump "wss://example.com/xrpc/com.atproto.sync.subscribeRepos?cursor=0"
175218```
176219177177-Note that there will be no events output on the WebSocket until they are created in the PDS, so the above command may continue to run with no output if things are configured successfully.
220220+Note that there will be no events output on the WebSocket until they are created in the PDS, so the above command may continue to run with no output immediately post-installation.
178221179222### Creating an account using pdsadmin
180223181181-Using ssh on your server, use `pdsadmin` to create an account if you haven't already.
224224+You'll now have access to some additional command line tools on this server. Use `pdsadmin` to create an account if you haven't already:
182225183226```bash
184227sudo pdsadmin account create
···186229187230### Creating an account using an invite code
188231189189-Using ssh on your server, use `pdsadmin` to create an invite code.
232232+If needed, use `pdsadmin` to create an invite code:
190233191234```bash
192235sudo pdsadmin create-invite-code
···210253211254To be able to verify users' email addresses and send other emails, you need to set up an SMTP server.
212255213213-One way to do this is to use an email service. [Resend](https://resend.com/) and [SendGrid](https://sendgrid.com/) are two popular choices.
256256+As an alternative to running your own SMTP server, you can use an email service. [Resend](https://resend.com/) and [SendGrid](https://sendgrid.com/) are two popular choices.
214257215215-Create an account and API key on an email service, ensure your server allows access on the required ports, and set these variables in `/pds/pds.env` (example with Resend):
258258+Create an account and API key on an email service, ensure your server allows access on the required ports, and then you can add these configuration variables to `/pds/pds.env` on your server (example with Resend):
216259217260```
218261PDS_EMAIL_SMTP_URL=smtps://resend:<your api key here>@smtp.resend.com:465/
···265308266309### Updating your PDS
267310268268-It is recommended that you keep your PDS up to date with new versions, otherwise things may break. You can use the `pdsadmin` tool to update your PDS.
311311+It is recommended that you keep your PDS up to date with new versions. You can use the `pdsadmin` tool to update your PDS.
269312270313```bash
271314sudo pdsadmin update
+4-1
installer.sh
···105105 elif [[ "${DISTRIB_CODENAME}" == "bookworm" ]]; then
106106 SUPPORTED_OS="true"
107107 echo "* Detected supported distribution Debian 12"
108108+ elif [[ "${DISTRIB_CODENAME}" == "trixie" ]]; then
109109+ SUPPORTED_OS="true"
110110+ echo "* Detected supported distribution Debian 13"
108111 fi
109112 fi
110113111114 if [[ "${SUPPORTED_OS}" != "true" ]]; then
112112- echo "Sorry, only Ubuntu 20.04, 22.04, 24.04, Debian 11 and Debian 12 are supported by this installer. Exiting..."
115115+ echo "Sorry, only Ubuntu 20.04, 22.04, 24.04, and Debian 11, 12, and 13 are supported by this installer. Exiting..."
113116 exit 1
114117 fi
115118