Depend on Another Service
When your service needs another StartOS service (e.g., Bitcoin Core for a wallet, or PostgreSQL from a shared instance), declare it as a dependency. You can require it to be installed, running, or healthy, and optionally pin a version range.
Solution
In setupDependencies(), return an object mapping dependency package IDs to their requirements: kind: 'running' (must be running and healthy), kind: 'exists' (just installed), a versionRange, and healthChecks specifying which of the dependency’s health checks must pass. Read the dependency’s connection info in setupMain either via sdk.serviceInterface.get() or directly as http://<package-id>.startos:<port>.
Reference: Dependencies
Examples
See startos/dependencies.ts in: electrs, fulcrum, jam, lightning-terminal, lnbits, lnd, mempool, open-webui, public-pool, robosats, bitcoin-explorer, helipad, cln, btcpayserver, albyhub, immich, jellyfin, start9-pages, ride-the-lightning