A minimal AT Protocol Personal Data Server written in JavaScript.
atproto pds

fix: rename RELAY_HOST to RELAY_URL for consistency

Aligns with APPVIEW_URL naming convention since the value is a URL.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+11 -11
+1 -1
.env.example
··· 15 # APPVIEW_DID=did:web:api.bsky.app 16 17 # Optional: Relay for firehose 18 - # RELAY_HOST=https://bsky.network 19 20 # Cloudflare-specific (not needed for Node.js) 21 # CLOUDFLARE_API_TOKEN=your_api_token_here
··· 15 # APPVIEW_DID=did:web:api.bsky.app 16 17 # Optional: Relay for firehose 18 + # RELAY_URL=https://bsky.network 19 20 # Cloudflare-specific (not needed for Node.js) 21 # CLOUDFLARE_API_TOKEN=your_api_token_here
+1 -1
README.md
··· 51 | HOSTNAME | No | Public hostname for the PDS | 52 | APPVIEW_URL | No | AppView URL for proxying | 53 | APPVIEW_DID | No | AppView DID for service auth | 54 - | RELAY_HOST | No | Relay URL for firehose notifications | 55 56 ## Deploy: Node.js 57
··· 51 | HOSTNAME | No | Public hostname for the PDS | 52 | APPVIEW_URL | No | AppView URL for proxying | 53 | APPVIEW_DID | No | AppView DID for service auth | 54 + | RELAY_URL | No | Relay URL for firehose notifications | 55 56 ## Deploy: Node.js 57
+3 -3
docs/plans/2026-01-11-e2e-local-relay-integration.md
··· 4 5 **Goal:** Integrate local PLC and relay from docker-compose into e2e tests for debugging sync issues and comprehensive federation testing. 6 7 - **Architecture:** Tests use a hybrid docker management approach - check if services are running, start them if not, reset volumes for clean state. The Node.js PDS is configured with `relayHost` to notify the local relay after commits. New test suite verifies events flow through the relay correctly. 8 9 **Tech Stack:** Docker Compose, Vitest, Node.js `child_process` for docker management, WebSocket for firehose tests. 10 ··· 175 **Files:** 176 - Modify: `test/helpers/node-server.js` 177 178 - **Step 1: Add USE_LOCAL_INFRA constant and relayHost config** 179 180 Replace the entire file with: 181 ··· 206 hostname: USE_LOCAL_INFRA ? 'host.docker.internal:3000' : `localhost:${TEST_PORT}`, 207 password: 'test-password', 208 // Use local relay when docker infrastructure is available 209 - relayHost: USE_LOCAL_INFRA ? 'localhost:2470' : undefined, 210 // Keep appview pointing to production (for proxy tests) 211 appviewUrl: 'https://api.bsky.app', 212 appviewDid: 'did:web:api.bsky.app',
··· 4 5 **Goal:** Integrate local PLC and relay from docker-compose into e2e tests for debugging sync issues and comprehensive federation testing. 6 7 + **Architecture:** Tests use a hybrid docker management approach - check if services are running, start them if not, reset volumes for clean state. The Node.js PDS is configured with `relayUrl` to notify the local relay after commits. New test suite verifies events flow through the relay correctly. 8 9 **Tech Stack:** Docker Compose, Vitest, Node.js `child_process` for docker management, WebSocket for firehose tests. 10 ··· 175 **Files:** 176 - Modify: `test/helpers/node-server.js` 177 178 + **Step 1: Add USE_LOCAL_INFRA constant and relayUrl config** 179 180 Replace the entire file with: 181 ··· 206 hostname: USE_LOCAL_INFRA ? 'host.docker.internal:3000' : `localhost:${TEST_PORT}`, 207 password: 'test-password', 208 // Use local relay when docker infrastructure is available 209 + relayUrl: USE_LOCAL_INFRA ? 'localhost:2470' : undefined, 210 // Keep appview pointing to production (for proxy tests) 211 appviewUrl: 'https://api.bsky.app', 212 appviewDid: 'did:web:api.bsky.app',
+5 -5
docs/plans/2026-01-11-subscribe-repos-websocket.md
··· 61 hostname, 62 appviewUrl, 63 appviewDid, 64 - relayHost, 65 password, 66 webSocket, // Add this 67 }) { ··· 71 this.hostname = hostname; 72 this.appviewUrl = appviewUrl || BSKY_APPVIEW_URL; 73 this.appviewDid = appviewDid; 74 - this.relayHost = relayHost; 75 this.password = password; 76 this.webSocket = webSocket; // Add this 77 this.lastCrawlNotify = 0; ··· 253 hostname: env.HOSTNAME, 254 appviewUrl: env.APPVIEW_URL, 255 appviewDid: env.APPVIEW_DID, 256 - relayHost: env.RELAY_HOST, 257 password: env.PDS_PASSWORD, 258 }); 259 } ··· 339 hostname, 340 appviewUrl, 341 appviewDid, 342 - relayHost, 343 password, 344 }) { 345 const Database = (await import('better-sqlite3')).default; ··· 361 hostname, 362 appviewUrl, 363 appviewDid, 364 - relayHost, 365 password, 366 }); 367
··· 61 hostname, 62 appviewUrl, 63 appviewDid, 64 + relayUrl, 65 password, 66 webSocket, // Add this 67 }) { ··· 71 this.hostname = hostname; 72 this.appviewUrl = appviewUrl || BSKY_APPVIEW_URL; 73 this.appviewDid = appviewDid; 74 + this.relayUrl = relayUrl; 75 this.password = password; 76 this.webSocket = webSocket; // Add this 77 this.lastCrawlNotify = 0; ··· 253 hostname: env.HOSTNAME, 254 appviewUrl: env.APPVIEW_URL, 255 appviewDid: env.APPVIEW_DID, 256 + relayUrl: env.RELAY_URL, 257 password: env.PDS_PASSWORD, 258 }); 259 } ··· 339 hostname, 340 appviewUrl, 341 appviewDid, 342 + relayUrl, 343 password, 344 }) { 345 const Database = (await import('better-sqlite3')).default; ··· 361 hostname, 362 appviewUrl, 363 appviewDid, 364 + relayUrl, 365 password, 366 }); 367
+1 -1
examples/node/.env.example
··· 12 # APPVIEW_DID=did:web:api.bsky.app 13 14 # Optional: Relay for firehose 15 - # RELAY_HOST=wss://bsky.network 16 17 # Optional: Password for createSession 18 # PDS_PASSWORD=
··· 12 # APPVIEW_DID=did:web:api.bsky.app 13 14 # Optional: Relay for firehose 15 + # RELAY_URL=wss://bsky.network 16 17 # Optional: Password for createSession 18 # PDS_PASSWORD=