Skip to main content
Optional in single-runtime and composable images. To allow containers in your project to communicate with one another, you need to define relationships between them. You can define a relationship between an app and a service, or between two apps. The quickest way to define a relationship between your app and a service is to use the service’s default endpoint.
However, some services allow you to define multiple databases, cores, and/or permissions. In these cases, you can’t rely on default endpoints. Instead, you can explicitly define multiple endpoints when setting up your relationships.
App containers don’t have a default endpoint like services. To connect your app to another app in your project, you need to explicitly define the http endpoint as the endpoint to connect both apps.
For more information, see how to define relationships between your apps.

Availability

New syntax (default and explicit endpoints) described below is supported by most, but not all, image types (Relationship 'SERVICE_NAME' of application 'app' ... targets a service without a valid default endpoint configuration.). This syntax is currently being rolled out for all images. If you encounter this error, use the “legacy” Upsun configuration noted at the bottom of this section.
To define a relationship between your app and a service:
Use the following configuration:The SERVICE_NAME is the name of the service as defined in its configuration. It is used as the relationship name, and associated with a null value. This instructs Upsun to use the service’s default endpoint to connect your app to the service.For example, if you define the following configuration:Upsun looks for a service named mariadb in your .upsun/config.yaml file, and connects your app to it through the service’s default endpoint.For reference, the equivalent configuration using explicit endpoints would be the following:You can define any number of relationships in this way:

Tip

An even quicker way to define many relationships is to use the following single-line configuration:

Legacy

The following legacy syntax for specifying relationships is still supported by Upsun:
For example:Feel free to use this until the default and explicit endpoint syntax is supported on all images.
Last modified on March 11, 2026