From f090a8c44541cbfbef2a8a95cc156474ba0fe7cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20R=C3=B6thke?= Date: Fri, 25 Sep 2026 18:42:44 +0200 Subject: [PATCH 1/2] Allow the listening socket to be set using the LISTEN_ADDRESS variable crosspoint-sync listens on all interfaces without a way to change this, add a LISTEN_ADDRESS env var to configure the listening socket. --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 9537f0a..758c655 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,6 +9,7 @@ import { autoPause } from './models/pause.js'; const DATABASE_PATH = process.env.DATABASE_PATH ?? '/data/crosspoint.db'; const PORT = Number(process.env.PORT ?? 8080); +const ADDRESS = process.env.LISTEN_ADDRESS ?? 'localhost'; const db = openDatabase(DATABASE_PATH); migrate(db); @@ -28,11 +29,12 @@ if (connectorsEnabled) { // Daily: pause books with no progress for 30 days (reads also check lazily). startFanInWorker(db, 24 * 60 * 60_000, async (d) => autoPause(d)); -serve({ fetch: app.fetch, port: PORT }, (info) => { +serve({ fetch: app.fetch, port: PORT, hostname: ADDRESS }, (info) => { console.log( JSON.stringify({ msg: 'crosspoint-sync listening', port: info.port, + address: info.address, db: DATABASE_PATH, connectors: connectorsEnabled ? 'enabled' : 'disabled (no TOKEN_ENC_KEY)', }) From a0b864105f91f8b797e93de01eb4497129ba5a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20R=C3=B6thke?= Date: Sun, 4 Oct 2026 12:19:29 +0200 Subject: [PATCH 2/2] Update docker compose files for the new listening address default The listening address was changed to default to localhost which won't do for docker, this changes the listen address back to the old value in the docker-compose files. --- docker-compose.dev.yml | 2 ++ docker-compose.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index a9edb9e..5afde2e 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -8,6 +8,8 @@ services: environment: # Set to "true" on private instances once your accounts exist. REGISTRATION_DISABLED: "false" + # Set Listen Address so the service is accessible from outside the container + LISTEN_ADDRESS: "::" restart: unless-stopped volumes: diff --git a/docker-compose.yml b/docker-compose.yml index c0e6823..f67413c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,8 @@ services: environment: # Set to "true" on private instances once your accounts exist. REGISTRATION_DISABLED: "false" + # Set Listen Address so the service is accessible from outside the container + LISTEN_ADDRESS: "::" restart: unless-stopped volumes: