Skip to content
Skip to Content

Add a service

Add a service to a project from a Docker image or a Git repository, choose its servers, and deploy it.

A service is made with its settings and nothing runs until its first deploy. You need deploy access to the project, and at least one connected server for the service to run on.

Find your server

A service runs only on the servers you choose for it. List yours to get their names and ids:

In New service, Servers it may run on lists the organization's servers with the state of each one's agent. When the organization has one server and its agent is online, it is ticked for you.

From a Docker image

Open the project and click New service. Choose A Docker image, type the image, such as nginx:1.27, set its ports under Networking, tick a server, and click Create service.

An image without a registry in its name comes from Docker Hub, and one without a tag uses latest. See Deploy an image.

From a Git repository

The repository must be reachable through one of your organization's Git accounts. openpanel git lists them with their ids.

Open the project and click New service. Choose A Git repository, then the Git account, the Repository, the Branch and, for a monorepo, the Folder. Under Build and start, keep Auto or choose Dockerfile. Tick a server and click Create service.

The branch defaults to main. At each deploy the repository is built on one of your servers. See Deploy from Git and How builds work.

A service from a template cannot be deployed yet: the template catalogue has not shipped.

What a new service starts with

Settings you leave out take these values. Each one can be changed later; see Service settings.

SettingDefault
AddressNone: nobody from outside reaches it
PortsNone
Replicas1, with the load balancer off
ServersNone, so it cannot be deployed until you choose one
Start commandThe image's own
Health checkNone
ResourcesNo limits
EnvironmentThe project's production environment

A public service with an HTTP port gets its opnl.app address as soon as it is saved. openpanel domains --project shop shows it.

Deploy it

Leave Deploy after creating ticked in New service, and the service deploys as soon as it is made. Later, click Deploy on the service's Overview tab.

See Deploy for what happens next.

What can go wrong

MessageWhat it means
"A service name is up to 32 lowercase letters, digits and hyphens, starting with a letter."Choose another name, such as web or api-v2.
"A service named web is already in this environment."Names are unique in an environment.
"A service named web is in production. A project's environments share one private network for now, …"A name is used once in a project, across its environments; add the environment to it, such as web-staging.
"Enter an image such as nginx, bitnami/redis or ghcr.io/org/app."The image name has characters Docker does not allow. Put the tag after a colon.
"That Git account was not found."The account id is wrong, or it is another member's own Git account.
"Choose at least one server for this service before deploying."Add a server with --server or serverIds.