service blocks in specific.hcl, each with a build step, a start command, and environment variables connecting it to other services and resources.
Public and internal endpoints
Services with a public endpoint are accessible over the internet via HTTPS. The URL is assigned automatically during deployment and shown in the terminal output.Inter-service communication
Services can reference each other to communicate over a private network. This is useful for backend-to-backend calls where traffic should stay internal.service.<name>.private_url— Internal URL (host and port), only reachable by other servicesservice.<name>.public_url— Public URL, only available for services withpublic = trueservice.<name>.host— Internal hostnameservice.<name>.port— Internal port
public_url instead of private_url since the browser cannot reach internal addresses:
Workers
Services without any endpoint act as background workers. They are deployed the same way as other services but don’t receive HTTP traffic. Workers are common for queue consumers, scheduled jobs, or other background processing.Multiple endpoints
A single service can expose multiple named endpoints on different ports. Each endpoint can be independently public or internal.service.<name>.endpoint.<endpoint>.private_url.
Environment variables
All connection details — database URLs, storage credentials, secrets — are automatically injected as environment variables. Your coding agent wires these up in theenv block, and the same references resolve to the correct values in both local development and production.