Running the iCloud Drive PDS.
Because I saw a Dame post.
˙⋆✮ matt ✮⋆˙ · · 3 min read · Original Page ·
⚠️ You probably shouldn't do this.
So.. you're probably wondering how we got here.
In case you're unaware, a PDS is a "Personal Data Server" for ATProtocol. You can learn more about what a PDS is and how to host one on atproto.com. A PDS is practically just an Express webserver responsible for storing an account's data into an SQLite database. The PDS also communicates with the AppViews of ATProto applications to make actions with said applications.
Running a PDS on iCloud is, pretty silly. But... I did it.
Here's how I did it.
Requirements:
- A device that can run Docker, access iCloud Drive, and accept incoming network requests.
- Any computer running macOS or Windows should be able to meet these requirements.
About:
I'm simply just running the default compose.yaml Docker Compose file from the official bluesky-social/pdsbluesky-social/pds repository, just a bit modified. I'm using OrbStack for running Docker on my Mac.
The main trick here is binding iCloud Drive to Docker. You can see this under volumes:.
Your iCloud Drive is located at /Users/matt/Library/Mobile Documents/com~apple~CloudDocs on your Mac. As you can see, I didn't use that directory in my compose.yamlcompose.yaml. Instead, I used a symlink. I'm unsure if this is really needed, but when I tried using the real directory, it just wasn't working.
I simply created a folder on my iCloud Drive called pds, in there I created a pds.env and then blobs and data folders.
For directing traffic to my Mac, I used Tailscale and Caddy. I had my Mac and my Hetzner VPS on the same Tailscale Tailnet, then used Caddy to just reverse proxy from my Hetzner VPS to my Mac through Tailscale's Tailnet. Then I just ran docker compose up on my Mac within the directory where compose.yaml was located, and it was up!
The following is the exact files I used for the whole setup. Please let me know if I missed anything!