# Services

Source: https://openpanel.sh/docs/concepts/services

What a service is: one thing that runs in a project, from a Docker image or a Git repository, and how it is reached.

A service is one thing that runs in a [project](/docs/concepts/projects): a website, an API, a worker, a database. It runs as Docker containers on the servers you choose, and each deploy rolls out the service as it is set at that moment.

## Where it comes from [#where-it-comes-from]

| Source | What happens at a deploy |
|---|---|
| **Docker image** | The image and tag you set, such as `nginx:1.27`, is pulled on your server. Without a registry in its name it comes from Docker Hub; without a tag, `latest`. See [Deploy an image](/docs/deploy/images). |
| **Git repository** | A repository and branch in one of your organization's [Git accounts](/docs/git), optionally one folder of it. It is built on one of your servers, with its Dockerfile or with a detected build. See [Deploy from Git](/docs/deploy/git) and [How builds work](/docs/builds). |
| **Template** | Not a source of its own: a template from the console's catalogue makes ordinary image services. See [Deploy a template](/docs/deploy/templates). |

## How it is reached [#how-it-is-reached]

A service's **address** setting decides who can reach its ports.

| Address | Who reaches it |
|---|---|
| **Public** | The internet, through OpenPanel's edge. Each HTTP port is reached at an [opnl.app address](/docs/domains/opnl-app) and at [your own domains](/docs/domains/own-domain), with HTTPS. Each TCP or UDP port gets its own [public port on the edge](/docs/tcp-udp). |
| **Private** | Meant for your organization's private network only. Today each port is reached only on its server's `127.0.0.1`, at a port OpenPanel picks; carrying it into the private network is being built. See [Private addresses](/docs/network/private-addresses). |
| **None** | Nobody from outside. The default. |

Whatever the address, the project's other services on the same server reach it by its name. Your servers open no port for any of this: public traffic reaches a container through the connection the server's [agent](/docs/servers/agent) keeps to OpenPanel, and Docker never publishes a port.

## Replicas and the load balancer [#replicas-and-the-load-balancer]

A service runs one replica unless you ask for more. A public service runs several replicas only with the **load balancer** on; then OpenPanel's edge sends each request to the ready replica with the fewest requests in flight. A private service runs one replica. A service with no address can run several replicas without the balancer. See [Load balancer on or off](/docs/load-balancing).

## Servers [#servers]

You choose the servers a service may run on. Its replicas are spread over them in turn, in a fixed order, so the same settings always place the same way. A service with no server chosen cannot be deployed. See [Replicas](/docs/load-balancing/replicas).

## Volumes [#volumes]

A volume keeps a folder of the container on disk across deploys. Its data lives on one server, so **a service with a volume always runs as one instance**: no replicas and no load balancer. See [Volumes](/docs/volumes).

## Settings take effect at the next deploy [#settings-take-effect-at-the-next-deploy]

Changing a setting saves it; nothing changes on your servers until you deploy. Each deployment keeps the settings it was made with, so what runs is always one deployment's settings, never half of a change. A [rollback](/docs/deploy/rollbacks) runs an earlier deployment's image with today's settings.

## Its name [#its-name]

A service's name is up to 32 lowercase letters, digits and hyphens, starting with a letter, and unique in its environment. It is also its host name on the project's network, so `api` is reached at `api` by the project's other services on the same server, and it begins its first opnl.app address.

<Cards>
<Card href="/docs/projects/add-service" title="Add a service" description="From an image or a repository, in the console, with the CLI or the API." />

<Card href="/docs/projects/settings" title="Service settings" description="Every setting, its limits and the rules between them." />
</Cards>