bluesky-social / pds

Bluesky PDS (Personal Data Server) container image, compose file, and documentation
Other
1.47k stars 134 forks source link

Error: Must configure either S3 or disk blobstore #139

Closed andrzej-r closed 6 days ago

andrzej-r commented 1 week ago

When starting a docker image (tested both with Dockerfile and compose.yaml) I am getting the following error:

pds         | /app/node_modules/.pnpm/@atproto+pds@0.4.67/node_modules/@atproto/pds/src/config/config.ts:82
pds         |     throw new Error('Must configure either S3 or disk blobstore')
pds         |           ^
pds         | 
pds         | 
pds         | Error: Must configure either S3 or disk blobstore
pds         |     at envToCfg (/app/node_modules/.pnpm/@atproto+pds@0.4.67/node_modules/@atproto/pds/src/config/config.ts:82:11)
pds         |     at main (/app/index.js:14:15)
pds         |     at Object.<anonymous> (/app/index.js:72:1)
pds         |     at Module._compile (node:internal/modules/cjs/loader:1376:14)
pds         |     at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
pds         |     at Module.load (node:internal/modules/cjs/loader:1207:32)
pds         |     at Module._load (node:internal/modules/cjs/loader:1023:12)
pds         |     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
pds         |     at node:internal/main/run_main_module:28:49
pds         | 
pds         | Node.js v20.11.1
pds exited with code 1

Looks like missing dependencies but how to add them?

skorfmann commented 1 week ago

when adding S3 credentials in env it worked for me. But yes, saw exactly the same error message even though I think I had a volume mounted at /pds

johackim commented 1 week ago

Try to add theses two env vars:

indyspike commented 1 week ago

When I had the same issue I had to add the env variables to the compose.yaml, doing it via environmental variables in Portainer did not work.

andrzej-r commented 6 days ago

@johackim thanks. Now I am getting another issue:

pds         | /app/node_modules/.pnpm/@atproto+pds@0.4.67/node_modules/@atproto/pds/src/config/secrets.ts:18
pds         |     throw new Error('Must configure plc rotation key')
pds         |           ^

What is the plc rotation key? I see some references to PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX but what is this key for and how do I get/generate it?

BTW, this is a self-hosted installation (I don't use S3).

johackim commented 6 days ago

Hello @andrzej-r, you can generate this env with this command:

openssl ecparam --name secp256k1 --genkey --noout --outform DER | tail --bytes=+8 | head --bytes=32 | xxd --plain --cols 32

See more details on installer.sh.

indyspike commented 6 days ago

To follow on, all of the env vars in the istaller.sh need to be in you compose.yaml.

andrzej-r commented 6 days ago

Thanks both. I've defined all required env vars and pds is now starting without errors and responds to /xrpc/_health. I didn't know installer.sh applies to docker installation as well.