Mirror from bluesky-social/pds

table format

dholms 15b3d102 703e57a7

+26 -28
+26 -28
README.md
··· 148 148 curl https://raw.githubusercontent.com/bluesky-social/pds/main/postgres-compose.yaml >compose.yaml 149 149 ``` 150 150 151 - #### Edit your compose.yaml file 152 151 153 - You will need to customize various settings configured through the PDS environment variables. 152 + #### Generate keys 154 153 155 - | Environment Variable | Value | 156 - | --------------------- | --------------------------------------------- | 157 - | PDS_HOSTNAME | example.com | 158 - | PDS_DB_POSTGRES_URL | postgresql://user:password@host:port/database | 159 - | PDS_JWT_SECRET | jwt-secret | 160 - | PDS_ADMIN_PASSWORD | admin-pass | 161 - | ... | ... | 154 + Your PDS will need two secp256k1 private keys provided as hex strings. You can securely generate these keys using `openssl` with the following command: 155 + ```bash 156 + openssl ecparam -name secp256k1 -genkey -noout -outform DER | tail -c +8 | head -c 32 | xxd -p -c 32 157 + ``` 162 158 163 - You _should_ provide values to the following variables: 164 - - `PDS_HOSTNAME` 165 - - `PDS_DB_POSTGRES_URL` or `PDS_DB_SQLITE_LOCATION` depending on which database you intend to use 166 - - `PDS_JWT_SECRET` 167 - - `PDS_ADMIN_PASSWORD` 168 - - `LOG_ENBALED` - defaults to `true` and outputs structured logs to stdout 159 + This will output a 64-char hex string. Please generate two keys in preperation for the next step. 169 160 170 - You _should not_ update the following value unless you also update the mounted volumes for your docker image: 171 - - `PDS_BLOBSTORE_DISK_LOCATION` 161 + #### Edit your compose.yaml file 172 162 173 - You will need to provide key material to the following variables. We've included a utility to generate keys for you with openssl 174 - Once these are set, you _should not_ adjust them - as you will break any repositories that you are currently hosting. 175 - - `PDS_REPO_SIGNING_KEY_K256_PRIVATE_KEY_HEX` 176 - - `PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX` 177 - 178 - You _should not_ adjust the following variables if you intend to federate with the Bluesky federation sandbox: 179 - - `PDS_DID_PLC_URL="plc.bsky-sandbox.dev"` 180 - - `PDS_BSKY_APP_VIEW_ENDPOINT="api.bsky-sandbox.dev"` 181 - - `PDS_BSKY_APP_VIEW_DID="did:web:api.bsky-sandbox.dev"` 182 - - `PDS_CRAWLERS="bgs.bsky-sandbox.dev"` 163 + You will need to customize various settings configured through the PDS environment variables. See the below table to find the variables you'll need to set. 164 + 165 + | Environment Variable | Value | Should update? | Notes | 166 + | ----------------------------------------- | --------------------------------------------- | -------------- |------ | 167 + | PDS_HOSTNAME | example.com | ✅ | Public domain you intend to deploy your service at | 168 + | PDS_DB_POSTGRES_URL | postgresql://user:password@host:port/database | ✅ | Or use `PDS_DB_SQLITE_LOCATION` depending on which database you intend to use | 169 + | PDS_JWT_SECRET | jwt-secret | ✅ | Use a secure high-entropy string | 170 + | PDS_ADMIN_PASSWORD | admin-pass | ✅ | Use a secure high-entropy string | 171 + | PDS_REPO_SIGNING_KEY_K256_PRIVATE_KEY_HEX | 3ee68... | ✅ | See above Generate Keys section - once set, do not change | 172 + | PDS_REPO_SIGNING_KEY_K256_PRIVATE_KEY_HEX | e049f... | ✅ | See above Generate Keys section - once set, do not change | 173 + | LOG_ENABLED | true | ❔ | Outputs structured logs to stdout | 174 + | PDS_BLOBSTORE_DISK_LOCATION | blobs | ❌ | Only update if you update the mounted volume for your docker image as well | 175 + | PDS_DID_PLC_URL | plc.bsky-sandbox.dev | ❌ | Do not adjust if you intend to federate with the Bluesky federation sandbox | 176 + | PDS_BSKY_APP_VIEW_ENDPOINT | api.bsky-sandbox.dev | ❌ | Do not adjust if you intend to federate with the Bluesky federation sandbox | 177 + | PDS_BSKY_APP_VIEW_DID | did:web:api.bsky-sandbox.dev | ❌ | Do not adjust if you intend to federate with the Bluesky federation sandbox | 178 + | PDS_CRAWLERS | bgs.bsky-sandbox.dev | ❌ | Do not adjust if you intend to federate with the Bluesky federation sandbox | 179 + | ... | ... | | 183 180 184 181 There are additional environment variables that can be tweaked depending on how you're running your service. For instance, storing blobs in AWS S3, keys in AWS KMS, or setting up an email service. 185 182 186 - Feel free to explore these [Here](https://github.com/bluesky-social/atproto/blob/simplify-pds/packages/pds/src/config/env.ts). However, we will not be providing support for more advanced configurations. 183 + Feel free to explore those [Here](https://github.com/bluesky-social/atproto/blob/simplify-pds/packages/pds/src/config/env.ts). However, we will not be providing support for more advanced configurations. 184 + 187 185 188 186 #### Run docker compose 189 187