| Next revision | Previous revision |
| lwc:networking:social_networking:pds_blue_sky [2025/01/31 07:19] – created John Harrison | lwc:networking:social_networking:pds_blue_sky [2025/01/31 09:09] (current) – John Harrison |
|---|
| ===== Setting up a local PDS Server ===== | ===== Setting up a local PDS Server ===== |
| //Completed on Digital Ocean Ubuntu 22.04 droplet// | //Completed on Digital Ocean Ubuntu 22.04 droplet running nginx and letsencrypt.// |
| ==== Overview ==== | |
| The | |
| |
| ==== Assumptions ==== | |
| * NGINX, Letsencrypt installed, working, happy | |
| * | |
| ==== Install PDS ==== | ==== Install PDS ==== |
| [[https://github.com/bluesky-social/pds|The installer]] assumes ports 80 and 443 are available and launches a Docker instance of ''Caddy'' to serve. This will conflict with NGINX but the installer still gets us started: | [[https://github.com/bluesky-social/pds|The installer]] assumes ports 80 and 443 are available and launches a Docker instance of ''Caddy'' to serve. This will conflict with NGINX but the installer still gets us started: |
| docker ps | docker ps |
| docker stop <instance> | docker stop <instance> |
| docker kill <instance> | docker rm <instance> |
| </code> | </code> |
| To get things to work correctly we are going to need to replace ''compose.yaml'' with something that doesn't start ''Caddy''. Here's a modification of the one found [[https://cprimozic.net/notes/posts/notes-on-self-hosting-bluesky-pds-alongside-other-services/|here]]. For a standard install you'll put ''compose.yaml'' in ''/pds'' | To get things to work correctly we are going to need to replace ''compose.yaml'' with something that doesn't start ''Caddy''. Here's a modification of the one found [[https://cprimozic.net/notes/posts/notes-on-self-hosting-bluesky-pds-alongside-other-services/|here]]. For a standard install you'll put ''compose.yaml'' in ''/pds'' |
| </code> | </code> |
| should return something close to:''{"version":"0.4.74"}'' | should return something close to:''{"version":"0.4.74"}'' |
| | === Get email working for pdsadmin === |
| | * I didn't have an email server already set up on the server that was available to pdsadmin so I set up an SMTP server on AWS using their SES. |
| | * Then I added these lines to ''/pds/pds.env'' |
| | <code> |
| | PDS_EMAIL_SMTP_URL=smtps://<SES USER>:<SES PW>@email-smtp.us-east-2.amazonaws.com:465/ # change AWS email server as needed |
| | PDS_EMAIL_FROM_ADDRESS=<YOUR EMAIL ADDRESS> |
| | </code> |
| | * Restart with ''docker compose up -d'' |
| | * Check the logs: ''sudo docker logs -f pds'' |
| |
| ==== Get NGINX reverse proxy working ==== | ==== Get NGINX reverse proxy working ==== |
| </code> | </code> |
| * on the local PDS server get an invite code: ''pdsadmin create-invite-code'' | * on the local PDS server get an invite code: ''pdsadmin create-invite-code'' |
| * Now comes the magical ''migrate'' command. Here's an example ripped from [[https://hyprlab.co/migrate-your-bluesky-account/here]]: | * Now comes the magical ''migrate'' command. Here's the format and an example unabashedly ripped from [[https://hyprlab.co/migrate-your-bluesky-account/|here]]: |
| <code> | <code> |
| | # format |
| | goat account migrate \ |
| | --pds-host $NEWPDSHOST \ |
| | --new-handle $NEWHANDLE \ |
| | --new-password $NEWPASSWORD \ |
| | --new-email $NEWEMAIL \ |
| | --plc-token $NEWPLCTOKEN \ |
| | --invite-code $INVITECODE |
| | |
| | # example |
| goat account migrate \ | goat account migrate \ |
| --pds-host https://blueskydemo.hyprlab.co \ | --pds-host https://blueskydemo.hyprlab.co \ |
| pdsadmin account delete $YOURDID | pdsadmin account delete $YOURDID |
| </code> | </code> |
| | ==== Get bsky.app to recognize your local PDS ==== |
| | * log out of Bluesky |
| | * log back in: |
| | * ''Sign in'' --> ''Other account'' |
| | * under ''Hosting provider'' select ''Custom'' |
| | * Enter domain name for your PDS |
| | At this point my profile showed "invalid handle." To fix: |
| | * In ''Settings'' go through the email verification process. |
| | * After verification is complete, you will have a new option: ''change handle'' in ''settings'' |
| | * When choosing ''change handle'' you have the option ''I have my own domain.'' It's probably optional if you are already happy with the domain of your PDS but I didn't want the pds subdomain for my domain in my handle so I went through this process |
| | * Choose your new handle |
| |
| ==== References ==== | ==== References ==== |
| * [[https://cprimozic.net/notes/posts/notes-on-self-hosting-bluesky-pds-alongside-other-services/|Self-hosing Bluesky using NGINX as a proxy]] | * [[https://cprimozic.net/notes/posts/notes-on-self-hosting-bluesky-pds-alongside-other-services/|Self-hosing Bluesky using NGINX as a proxy]] |
| * [[https://hyprlab.co/migrate-your-bluesky-account/|Migrate Bluesky to another PDS]] | * [[https://hyprlab.co/migrate-your-bluesky-account/|Migrate Bluesky to another PDS]] |
| | * [[https://medium.com/@MszPro/self-host-federated-bluesky-instance-pds-with-cloudflare-tunnel-6c56cbca8852|(where I learned how to get the logs for pds)]] |
| | * [[https://bmannconsulting.com/notes/migrating-pds-account-with-goat/|Migrating a PDS account with GOAT]] |
| | * [[https://rafaeleyng.github.io/self-hosting-a-bluesky-pds-and-using-your-domain-as-your-handle]] |