The single-instance rule
A service with a volume always runs as one instance: one replica, with the load balancer off, on the one server its volume lives on.
Why
A volume is a folder on one server's disk. A second replica on another server would not see it, and two containers writing the same files at once, as a database would, can corrupt them. So OpenPanel never runs two containers on one volume, during a deploy included: the old container stops before the new one starts.
Where it is enforced
The rule lives in OpenPanel's service layer, so the console, the API, the CLI and MCP give the same answer. A change that would break it is refused when you save it:
| You try to | Message |
|---|---|
| Add a volume to a service with replicas or the load balancer | "A service with a volume always runs as one instance. Set replicas to 1 and turn off the load balancer before adding a volume." |
| Raise replicas, or turn on the load balancer, on a service with a volume | "This service has a volume, so it always runs as one instance. Remove the volume to use replicas or the load balancer." |
A deploy checks the rule again, and a rollback runs an earlier image with today's settings, so it never brings back replicas that a volume has since ruled out.
What it means for a deploy
Without a volume, new replicas start beside the old ones and take over once they are ready, with no downtime. With a volume, the old container stops first and the new one starts after, so the service is unreachable for that moment. If the new version does not become ready, the old one starts again only once OpenPanel marks the deployment failed, which can take up to 15 minutes; see Health checks.
What to do instead
Keep state and scale apart:
- Put the data in its own service with the volume, such as a database, and keep the services that need several replicas free of volumes. They reach the database by its name when they run on the same server.
- Or keep the state outside OpenPanel, in a managed database or object storage, and give your service replicas and the load balancer.