···4455## Table of Contents
6677-* [FAQ](#faq)
88- * [What is Bluesky?](#what-is-bluesky)
99- * [What is AT Protocol?](#what-is-at-protocol)
1010- * [How can developers get invite codes?](#how-can-developers-get-invite-codes)
1111- * [Where is the code?](#where-is-the-code)
1212- * [What is the current status of federation?](#what-is-the-current-status-of-federation)
1313- * [What should I know about running a PDS in the developer sandbox?](#what-should-i-know-about-running-a-pds-in-the-developer-sandbox)
1414-* [Self\-hosting PDS](#self-hosting-pds)
1515- * [Preparation for self\-hosting PDS](#preparation-for-self-hosting-pds)
1616- * [Open your cloud firewall for HTTP and HTTPS](#open-your-cloud-firewall-for-http-and-https)
1717- * [Configure DNS for your domain](#configure-dns-for-your-domain)
1818- * [Check that DNS is working as expected](#check-that-dns-is-working-as-expected)
1919- * [Automatic install on Ubuntu 20\.04/22\.04 or Debian 11/12](#automatic-install-on-ubuntu-20042204-or-debian-1112)
2020- * [Installing manually on Ubuntu 22\.04](#installing-manually-on-ubuntu-2204)
2121- * [Open ports on your Linux firewall](#open-ports-on-your-linux-firewall)
2222- * [Install Docker](#install-docker)
2323- * [Uninstall old versions](#uninstall-old-versions)
2424- * [Set up the repository](#set-up-the-repository)
2525- * [Install Docker Engine](#install-docker-engine)
2626- * [Verify Docker Engine installation](#verify-docker-engine-installation)
2727- * [Set up the PDS directory](#set-up-the-pds-directory)
2828- * [Create the Caddyfile](#create-the-caddyfile)
2929- * [Create the PDS env configuration file](#create-the-pds-env-configuration-file)
3030- * [Start the PDS containers](#start-the-pds-containers)
3131- * [Download the Docker compose file](#download-the-docker-compose-file)
3232- * [Create the systemd service](#create-the-systemd-service)
3333- * [Start the service](#start-the-service)
3434- * [Verify your PDS is online](#verify-your-pds-is-online)
3535- * [Obtain your PDS admin password](#obtain-your-pds-admin-password)
3636- * [Generate an invite code for your PDS](#generate-an-invite-code-for-your-pds)
3737- * [Connecting to your server](#connecting-to-your-server)
3838- * [Manually updating your PDS](#manually-updating-your-pds)
3939-* [PDS environment variables](#pds-environment-variables)
77+- [PDS](#pds)
88+ - [Table of Contents](#table-of-contents)
99+ - [FAQ](#faq)
1010+ - [What is Bluesky?](#what-is-bluesky)
1111+ - [What is AT Protocol?](#what-is-at-protocol)
1212+ - [How can developers get invite codes?](#how-can-developers-get-invite-codes)
1313+ - [Where is the code?](#where-is-the-code)
1414+ - [What is the current status of federation?](#what-is-the-current-status-of-federation)
1515+ - [What should I know about running a PDS in the developer sandbox?](#what-should-i-know-about-running-a-pds-in-the-developer-sandbox)
1616+ - [Self-hosting PDS](#self-hosting-pds)
1717+ - [Preparation for self-hosting PDS](#preparation-for-self-hosting-pds)
1818+ - [Open your cloud firewall for HTTP and HTTPS](#open-your-cloud-firewall-for-http-and-https)
1919+ - [Configure DNS for your domain](#configure-dns-for-your-domain)
2020+ - [Check that DNS is working as expected](#check-that-dns-is-working-as-expected)
2121+ - [Automatic install on Ubuntu 20.04/22.04 or Debian 11/12](#automatic-install-on-ubuntu-20042204-or-debian-1112)
2222+ - [Installing manually on Ubuntu 22.04](#installing-manually-on-ubuntu-2204)
2323+ - [Open ports on your Linux firewall](#open-ports-on-your-linux-firewall)
2424+ - [Install Docker](#install-docker)
2525+ - [Uninstall old versions](#uninstall-old-versions)
2626+ - [Set up the repository](#set-up-the-repository)
2727+ - [Install Docker Engine](#install-docker-engine)
2828+ - [Verify Docker Engine installation](#verify-docker-engine-installation)
2929+ - [Set up the PDS directory](#set-up-the-pds-directory)
3030+ - [Create the Caddyfile](#create-the-caddyfile)
3131+ - [Create the PDS env configuration file](#create-the-pds-env-configuration-file)
3232+ - [Start the PDS containers](#start-the-pds-containers)
3333+ - [Download the Docker compose file](#download-the-docker-compose-file)
3434+ - [Create the systemd service](#create-the-systemd-service)
3535+ - [Start the service](#start-the-service)
3636+ - [Verify your PDS is online](#verify-your-pds-is-online)
3737+ - [Obtain your PDS admin password](#obtain-your-pds-admin-password)
3838+ - [Generate an invite code for your PDS](#generate-an-invite-code-for-your-pds)
3939+ - [Connecting to your server](#connecting-to-your-server)
4040+ - [Manually updating your PDS](#manually-updating-your-pds)
4141+ - [PDS environment variables](#pds-environment-variables)
404241434244## FAQ
···250252PDS_HOSTNAME="example.com"
251253PDS_JWT_SECRET="$(openssl rand --hex 16)"
252254PDS_ADMIN_PASSWORD="$(openssl rand --hex 16)"
253253-PDS_REPO_SIGNING_KEY_K256_PRIVATE_KEY_HEX="$(openssl ecparam --name secp256k1 --genkey --noout --outform DER | tail --bytes=+8 | head --bytes=32 | xxd --plain --cols 32)"
254255PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX="$(openssl ecparam --name secp256k1 --genkey --noout --outform DER | tail --bytes=+8 | head --bytes=32 | xxd --plain --cols 32)"
255256256257cat <<PDS_CONFIG | sudo tee /pds/pds.env
257258PDS_HOSTNAME=${PDS_HOSTNAME}
258259PDS_JWT_SECRET=${PDS_JWT_SECRET}
259260PDS_ADMIN_PASSWORD=${PDS_ADMIN_PASSWORD}
260260-PDS_REPO_SIGNING_KEY_K256_PRIVATE_KEY_HEX=${PDS_REPO_SIGNING_KEY_K256_PRIVATE_KEY_HEX}
261261PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX=${PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX}
262262-PDS_DB_SQLITE_LOCATION=/pds/pds.sqlite
263263-PDS_BLOBSTORE_DISK_LOCATION=/pds/blocks
264264-PDS_DID_PLC_URL=https://plc.bsky-sandbox.dev
265265-PDS_BSKY_APP_VIEW_URL=https://api.bsky-sandbox.dev
266266-PDS_BSKY_APP_VIEW_DID=did:web:api.bsky-sandbox.dev
267267-PDS_CRAWLERS=https://bgs.bsky-sandbox.dev
262262+PDS_DATA_DIRECTORY=/pds
263263+PDS_BLOBSTORE_DISK_LOCATION=/pds/blobs
264264+PDS_DID_PLC_URL=https://plc.directory
265265+PDS_BSKY_APP_VIEW_URL=https://api.bsky.app
266266+PDS_BSKY_APP_VIEW_DID=did:web:api.bsky.app
267267+PDS_CRAWLERS=https://bsky.network
268268+PDS_MOD_SERVICE_URL=https://mod.staging.bsky.dev
269269+PDS_MOD_SERVICE_DID=did:plc:kfiaag3o66qk75mfgwebyyns
268270PDS_CONFIG
269271```
270272