Private Networking
Apps and add-ons in the same phase talk over the private network. Attach them on the canvas — there is no private-DNS settings page.
Same-phase attach
From the phase canvas, connect a database or other add-on to the app (or add it from the app Add-ons tab). Connected apps get the add-on’s connection variables injected on the Variables tab. Commit those changes on the canvas so the app restarts with the new values.
Reach a sibling app
Use the other app’s name as the hostname (the name you gave it when you created it). There is no extra DNS form to fill in.
# Web API named "api"
http://api:8080
# Worker named "background-worker"
http://background-worker:3000Listen on the port from PORT (default 8080) unless you changed it on Settings.
Add-on connection strings
Prefer the injected variables after you attach — they include host, port, and credentials. Typical ports if you assemble a URL yourself:
- •PostgreSQL:
5432 - •MySQL / MariaDB:
3306 - •Redis / Valkey:
6379 - •MongoDB:
27017
Example: API calling a worker
const response = await fetch('http://worker:3000/process', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ jobId: '123', payload: data }),
})
const result = await response.json()Who can reach what
Private traffic stays inside the phase. Another project cannot use these hostnames. For a public caller, use the app’s *.stackblaze.app URL (or a custom domain) and authenticate in your app.
Shared secrets
Do not use the public hostname for databases
*.stackblaze.app. That hostname is for web apps exposed to the internet.