{"id":17644408,"url":"https://github.com/bluesky-social/pds","last_synced_at":"2025-05-13T23:10:41.753Z","repository":{"id":175401406,"uuid":"635030098","full_name":"bluesky-social/pds","owner":"bluesky-social","description":"Bluesky PDS (Personal Data Server) container image, compose file, and documentation","archived":false,"fork":false,"pushed_at":"2025-05-09T01:56:34.000Z","size":505,"stargazers_count":2057,"open_issues_count":110,"forks_count":226,"subscribers_count":36,"default_branch":"main","last_synced_at":"2025-05-11T11:14:19.743Z","etag":null,"topics":["atproto","bluesky","self-hosted"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bluesky-social.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-01T20:08:15.000Z","updated_at":"2025-05-11T07:11:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"663ce4ea-0a0e-44ae-bc80-cb96a20d1c8b","html_url":"https://github.com/bluesky-social/pds","commit_stats":{"total_commits":164,"total_committers":19,"mean_commits":8.631578947368421,"dds":0.6036585365853658,"last_synced_commit":"9ac9461ce2e4ed7ac66889bb1017662a2f846c98"},"previous_names":["bluesky-social/pds"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluesky-social%2Fpds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluesky-social%2Fpds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluesky-social%2Fpds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluesky-social%2Fpds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluesky-social","download_url":"https://codeload.github.com/bluesky-social/pds/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254042329,"owners_count":22004901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atproto","bluesky","self-hosted"],"created_at":"2024-10-23T10:02:09.016Z","updated_at":"2025-05-13T23:10:36.733Z","avatar_url":"https://github.com/bluesky-social.png","language":"Shell","funding_links":[],"categories":["Selfhosting","Shell","self-hosted"],"sub_categories":["Web"],"readme":"# PDS\n\nWelcome to the repository for the official Bluesky PDS (Personal Data Server). This repository includes container images and documentation designed to assist technical people with hosting a Bluesky PDS.\n\nHead over to the [AT Protocol PDS Admins Discord](https://discord.gg/e7hpHxRfBP) to chat with other folks hosting instances and get important updates about the PDS distribution!\n\n## Table of Contents\n\n\u003c!-- markdown-toc -i README.md --\u003e\n\n\u003c!-- toc --\u003e\n\n- [FAQ](#faq)\n  * [What is Bluesky?](#what-is-bluesky)\n  * [What is AT Protocol?](#what-is-at-protocol)\n  * [Where is the code?](#where-is-the-code)\n  * [What is the current status of federation?](#what-is-the-current-status-of-federation)\n- [Self-hosting PDS](#self-hosting-pds)\n  * [Preparation for self-hosting PDS](#preparation-for-self-hosting-pds)\n  * [Open your cloud firewall for HTTP and HTTPS](#open-your-cloud-firewall-for-http-and-https)\n  * [Configure DNS for your domain](#configure-dns-for-your-domain)\n  * [Check that DNS is working as expected](#check-that-dns-is-working-as-expected)\n  * [Installer on Ubuntu 20.04/22.04 and Debian 11/12](#installer-on-ubuntu-20042204-and-debian-1112)\n  * [Verifying that your PDS is online and accessible](#verifying-that-your-pds-is-online-and-accessible)\n  * [Creating an account using pdsadmin](#creating-an-account-using-pdsadmin)\n  * [Creating an account using an invite code](#creating-an-account-using-an-invite-code)\n  * [Using the Bluesky app with your PDS](#using-the-bluesky-app-with-your-pds)\n  * [Setting up SMTP](#setting-up-smtp)\n  * [Updating your PDS](#updating-your-pds)\n\n\u003c!-- tocstop --\u003e\n\n## FAQ\n\n### What is Bluesky?\n\nBluesky is a social media application built on AT Protocol.\n\nPlease visit the [Bluesky website](https://bsky.social/) for more information.\n\n### What is AT Protocol?\n\nThe Authenticated Transfer Protocol, aka atproto, is a protocol for large-scale distributed social applications.\n\nPlease visit the [AT Protocol docs](https://atproto.com/guides/overview) for additional information.\n\n### Where is the code?\n\n* [TypeScript code](https://github.com/bluesky-social/atproto/tree/main/packages/pds)\n* [Go code](https://github.com/bluesky-social/indigo)\n\n### What is the current status of federation?\n\nAs of Spring 2024, the AT Protocol network is open to federation!\n\n✅ Federated domain handles (e.g. `@nytimes.com`)\n\n✅ Federated feed generators (custom algorithms)\n\n✅ Federated relays (event firehose)\n\n✅ Federated app views (API service)\n\n✅ Federated data (PDS hosting)\n\n✅ Federated moderation (labeling)\n\n## Self-hosting PDS\n\nSelf-hosting a Bluesky PDS means running your own Personal Data Server that is capable of federating with the wider Bluesky social network.\n\n### Preparation for self-hosting PDS\n\nLaunch a server on any cloud provider, [Digital Ocean](https://digitalocean.com/) and [Vultr](https://vultr.com/) are two popular choices.\n\nEnsure that you can ssh to your server and have root access.\n\n**Server Requirements**\n* Public IPv4 address\n* Public DNS name\n* Public inbound internet access permitted on port 80/tcp and 443/tcp\n\n**Server Recommendations**\n|                  |              |\n| ---------------- | ------------ |\n| Operating System | Ubuntu 22.04 |\n| Memory (RAM)     | 1 GB         |\n| CPU Cores        | 1            |\n| Storage          | 20 GB SSD    |\n| Architectures    | amd64, arm64 |\n| Number of users  | 1-20         |\n\n**Note:** It is a good security practice to restrict inbound ssh access (port 22/tcp) to your own computer's public IP address. You can check your current public IP address using [ifconfig.me](https://ifconfig.me/).\n\n### Open your cloud firewall for HTTP and HTTPS\n\nOne of the most common sources of misconfiguration is not opening firewall ports correctly. Please be sure to double check this step.\n\nIn your cloud provider's console, the following ports should be open to inbound access from the public internet.\n\n* 80/tcp (Used only for TLS certification verification)\n* 443/tcp (Used for all application requests)\n\n**Note:** there is no need to set up TLS or redirect requests from port 80 to 443 because the Caddy web server, included in the Docker compose file, will handle this for you.\n\n### Configure DNS for your domain\n\nFrom your DNS provider's control panel, set up a domain with records pointing to your server.\n\n| Name            | Type | Value         | TTL |\n| --------------- | ---- | ------------- | --- |\n| `example.com`   | `A`  | `12.34.56.78` | 600 |\n| `*.example.com` | `A`  | `12.34.56.78` | 600 |\n\n**Note:**\n* Replace `example.com` with your domain name.\n* Replace `12.34.56.78` with your server's IP address.\n* Some providers may use the `@` symbol to represent the root of your domain.\n* The wildcard record is required when allowing users to create new accounts on your PDS.\n* The TTL can be anything but 600 (10 minutes) is reasonable\n\n### Check that DNS is working as expected\n\nUse a service like [DNS Checker](https://dnschecker.org/) to verify that you can resolve domain names.\n\nExamples to check (record type `A`):\n* `example.com`\n* `random.example.com`\n* `test123.example.com`\n\nThese should all return your server's public IP.\n\n### Installer on Ubuntu 20.04/22.04 and Debian 11/12\n\nOn your server via ssh, download the installer script using wget:\n\n```bash\nwget https://raw.githubusercontent.com/bluesky-social/pds/main/installer.sh\n```\n\nor download it using curl:\n\n```bash\ncurl https://raw.githubusercontent.com/bluesky-social/pds/main/installer.sh \u003einstaller.sh\n```\n\nAnd then run the installer using bash:\n\n```bash\nsudo bash installer.sh\n```\n\n### Verifying that your PDS is online and accessible\n\n\u003e [!TIP]\n\u003e 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.\n\nYou can check if your server is online and healthy by requesting the healthcheck endpoint.\n\nYou can visit `https://example.com/xrpc/_health` in your browser. You should see a JSON response with a version, like:\n\n```\n{\"version\":\"0.2.2-beta.2\"}\n```\n\nYou'll also need to check that WebSockets are working, for the rest of the network to pick up content from your PDS. You can test by installing a tool like `wsdump` and running a command like:\n\n```bash\nwsdump \"wss://example.com/xrpc/com.atproto.sync.subscribeRepos?cursor=0\"\n```\n\nNote 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.\n\n### Creating an account using pdsadmin\n\nUsing ssh on your server, use `pdsadmin` to create an account if you haven't already.\n\n```bash\nsudo pdsadmin account create\n```\n\n### Creating an account using an invite code\n\nUsing ssh on your server, use `pdsadmin` to create an invite code.\n\n```bash\nsudo pdsadmin create-invite-code\n```\n\nWhen creating an account using the app, enter this invite code.\n\n### Using the Bluesky app with your PDS\n\nYou can use the Bluesky app to connect to your PDS.\n\n1. Get the Bluesky app\n    * [Bluesky for Web](https://bsky.app/)\n    * [Bluesky for iPhone](https://apps.apple.com/us/app/bluesky-social/id6444370199)\n    * [Bluesky for Android](https://play.google.com/store/apps/details?id=xyz.blueskyweb.app)\n1. Enter the URL of your PDS (e.g. `https://example.com/`)\n\n_Note: because the subdomain TLS certificate is created on-demand, it may take 10-30s for your handle to be accessible. If you aren't seeing your first post/profile, wait 30s and try to make another post._\n\n### Setting up SMTP\n\nTo be able to verify users' email addresses and send other emails, you need to set up an SMTP server.\n\nOne way to do this is to use an email service. [Resend](https://resend.com/) and [SendGrid](https://sendgrid.com/) are two popular choices.\n\nCreate 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):\n\n```\nPDS_EMAIL_SMTP_URL=smtps://resend:\u003cyour api key here\u003e@smtp.resend.com:465/\nPDS_EMAIL_FROM_ADDRESS=admin@your.domain\n```\n\nIf you prefer to use a standard SMTP server (a local one or from your email provider), put your account's username and password in the URL:\n\n```\nPDS_EMAIL_SMTP_URL=smtps://username:password@smtp.example.com/\n```\n\nAlternatively, if you're running a local sendmail-compatible mail service like Postfix or Exim on the same host, you can configure the PDS to use the sendmail transport by using such URL:\n\n```\nPDS_EMAIL_SMTP_URL=smtp:///?sendmail=true\n```\n\n_Note: Your PDS will need to be restarted with those variables. This varies depending on your setup. If you followed this installation guide, run `systemctl restart pds`. You might need to restart the server or recreate the container, depending on what you are using._\n\n### Logging\n\nBy default, logs from the PDS are printed to `stdout` and end up in Docker's log. You can browse them by running:\n\n```\n[sudo] docker logs pds\n```\n\nNote: these logs are not persisted, so they will be lost after server reboot.\n\nAlternatively, you can configure the logs to be printed to a file by setting `LOG_DESTINATION`:\n\n```\nLOG_DESTINATION=/pds/pds.log\n```\n\nYou can also change the minimum level of logs to be printed (default: `info`):\n\n```\nLOG_LEVEL=debug\n```\n\n### Updating your PDS\n\nIt 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.\n\n```bash\nsudo pdsadmin update\n```\n\n## License\n\nThis project is dual-licensed under MIT and Apache 2.0 terms:\n\n- MIT license ([LICENSE-MIT.txt](https://github.com/bluesky-social/pds/blob/main/LICENSE-MIT.txt) or http://opensource.org/licenses/MIT)\n- Apache License, Version 2.0, ([LICENSE-APACHE.txt](https://github.com/bluesky-social/pds/blob/main/LICENSE-APACHE.txt) or http://www.apache.org/licenses/LICENSE-2.0)\n\nDownstream projects and end users may choose either license individually, or both together, at their discretion. The motivation for this dual-licensing is the additional software patent assurance provided by Apache 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluesky-social%2Fpds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluesky-social%2Fpds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluesky-social%2Fpds/lists"}