Skip to main content
Resources (CPU, RAM, disk) are allocated per container. Each app and service in your project runs as a separate container within an environment.
This page describes resource initialization on Upsun Flex projects. On Upsun Fixed projects, resources are automatically distributed across your containers, and you cannot configure per-container resources manually. For details, see container sizes in the Upsun Fixed documentation.
By default, when you first deploy your project or add a new container to it, Upsun uses the parent resource initialization strategy, which copies resource allocations from the parent environment. If no parent environment exists, Upsun falls back to preset resource amounts instead. You can also specify a different strategy when branching, merging, activating, or restoring a backup. The strategy applied by default depends on how the environment is created:
  • For standard branching and activation, the default strategy depends on the environment type.
  • For environments created through a source integration, the strategy configured on the integration applies instead.

Default resources

Upsun allocates the following default resources to every container when deployed for the first time: * Only applicable if the app or service requires a disk (for example, databases such as MariaDB or PostgreSQL). To allocate different resources, specify a resource initialization strategy, or adjust resources after deployment.
Changing resource allocation directly affects your costs. Review the Upsun pricing page before increasing resources. You can monitor your current costs in the Console.

Specify a resource initialization strategy

Upsun provides the following resource initialization strategies:
The following table shows the resources Upsun allocates to your containers when you opt for the minimum resource initialization strategy.* The disk size is set to None when the container never uses disk, and to 0 MB when the container doesn’t require disk but can use it.
You can specify a resource initialization strategy when performing the following actions:

First deployment

Resource initialization strategies

Available: parent, default, minimum, manual
Default: parent
You can define which resource initialization strategy Upsun uses to allocate resources when you first deploy your project or add a new container.
If you’re not using a source integration, you can use a Git push option to specify a resource initialization strategy. To do so, run the following command:
Terminal
For example, to use the minimum strategy for your deployment, run the following command:
Terminal
Alternatively, you can use the official Git syntax for push options:
Terminal
You can specify a different resource initialization strategy for each deployment.

Environment branch

Resource initialization strategies

Available: parent, default, minimum
Default: default (staging) / minimum (development)
When using a source integration, defaults are per environment type:
  • default for production and staging environments
  • minimum for development environments
parent is not available for production environments in source integrations.
To override these defaults, use the CLI (development environments only) or the API (all environment types). See the With a source integration tab below.
Use the methods below to specify a different resource initialization strategy.
Regardless of strategy or integration, Upsun applies the parent’s disk size to the child environment if the child’s disk size is smaller. This ensures the branch can be created.
Run the following command:
Terminal
For example, to inherit resources from the parent environment, run the following command:
Terminal

Environment merge

Resource initialization strategies

Available: child, default, minimum, manual
Default: child
When you merge a child environment into its parent, any apps and services that exist on the child but not on the parent are created on the parent environment. These new apps and services are granted resources according to the selected strategy. However, you can specify a different resource initialization strategy.
Apps and services already running on the parent environment keep their existing resources.
Run the following command:
Terminal
For example, to use the manual resource initialization strategy, run the following command:
Terminal

Environment activation

Resource initialization strategies

Available: parent, default, minimum
Default: default if the new environment is of type staging, minimum if the new environment is of type development
When you activate a new environment, the resource initialization strategy applied depends on the environment type: To specify a different strategy, run the following command:
Terminal
For example, to use the parent resource initialization strategy, run the following command:
Terminal
Setting resources on an inactive environment using the Console or the CLI automatically activates it.

Backup restoration

Resource initialization strategies

Available: backup, parent, default, minimum
Default: backup
When you restore a backup using the CLI, you can restore it to your current environment or a different environment.

Restore to your current environment

By default, when you restore a backup using the CLI, it is restored to your current environment. The resources of every container running on the environment revert to the state they were in when the backup was taken.
To skip restoring resources, use the --no-resources option.
If you deleted containers after backing up but before restoring, they are recreated using the backup strategy and granted the same resources as when the backup was taken.
To skip restoring deleted containers, use the --no-code option.
When you restore previously deleted containers, you can specify a different resource initialization strategy for them.

Restore to a different environment

The backup strategy applies by default. All apps and services are initialized as new containers on the environment, and granted the same resources as in the backup. You can specify a different resource initialization strategy for all containers.

Specify a resource initialization strategy

Run the following command:
Terminal
For example, to use the minimum resource initialization strategy, run the following command:
Terminal

Environment sync

Syncing an environment means propagating changes from a parent environment into a child environment (the opposite direction of an environment merge). You can sync:
  • Only the code
  • Only the data (databases, files)
  • Only the resources (CPU and RAM, instances, and disk space)
  • Any combination of the three (code and data, code and resources, data and resources, or all three)
If the child’s disk is smaller than the parent’s, Upsun automatically applies the parent’s disk size before syncing. This ensures the sync can succeed.
Run the following commands depending on your needs:
  • Sync only resources:
    Terminal
  • Sync only code:
    Terminal
  • Sync only data:
    Terminal
  • Sync everything:
    Terminal
    You can adjust the command depending on the exact combination of elements you want to sync.
Last modified on July 14, 2026