# Deploy a template

Source: https://openpanel.sh/docs/deploy/templates

Deploy a common app or database from the template catalogue as ordinary services, and change what it made.

A template is a common self-hosted app, or a database, set up with what it needs: its image and tag, its ports, its volumes, its variables, and any database it uses. Deploying one makes ordinary [image services](/docs/deploy/images) in your project. After that they are services like any other: you change, redeploy, roll back or delete them the same way.

Templates are deployed from the console. The CLI, the API and MCP make the same services from images.

## The catalogue [#the-catalogue]

| Category | Templates |
|---|---|
| **Databases** | PostgreSQL, MySQL, MariaDB, MongoDB, ClickHouse, Meilisearch |
| **Queues and caches** | Redis, Valkey, RabbitMQ, NATS |
| **Automation** | n8n |
| **Analytics** | Plausible Analytics, Umami, Metabase |
| **Monitoring** | Uptime Kuma, Grafana, Prometheus |
| **Sites and CMS** | Ghost, WordPress, Directus, Nginx |
| **Developer tools** | Gitea, Vaultwarden, NocoDB, Adminer, pgAdmin |
| **Storage** | Nextcloud |

Each template's image, tag, ports, volumes and variables follow the app's own Docker documentation.

## Deploy one [#deploy-one]

<Tabs items={["From Templates","From a project"]}>
<Tab value="From Templates">
<Steps>
<Step>
Open **Templates** in the console's sidebar. Search by name, category or image, or pick a category.
</Step>

<Step>
Click the template. The dialog asks for:

- **Project**: one you can deploy to, or **New project** with its name;
- **Environment**;
- **Servers it may run on** (or **Servers they may run on**, for a template of several services).

**What it makes** lists the services it will create, with their names.
</Step>

<Step>
Click **Deploy**. With no server chosen, the button says **Create service** or **Create services**: they are made now and deploy once you choose a server.
</Step>
</Steps>
</Tab>

<Tab value="From a project">
Open the project, click **New service**, and choose **A template**, or **A database** for the catalogue's databases only. Pick one, tick the servers under **Servers it may run on**, and click **Create service** or **Create services**. Leave **Deploy after creating** ticked to deploy at once.
</Tab>
</Tabs>

You need deploy access to the project, or the right to create projects for a new one. When the organization has exactly one server and its agent is online, it is ticked for you.

## What a template makes [#what-a-template-makes]

- **One service per part**, named after the template's own names, such as `plausible`, `plausible-db` and `plausible-events` for Plausible Analytics. A name the project already uses gets a number added.
- **Databases** get no address: only the project's other services reach them, by name on the project network.
- **Web apps** are public, on an opnl.app address with HTTPS. Prometheus, Adminer and pgAdmin, which have no sign-in of their own, get no public address.
- **Passwords and keys** are generated for you, new for each deploy of the template, and kept as [secret variables](/docs/variables/secrets).
- **References between the parts**, such as an app's `DATABASE_URL`, use [references](/docs/variables/references), so they follow the names the services got.
- **Volumes** for the data each part keeps. A service with a volume runs as one instance. See [The single-instance rule](/docs/volumes/single-instance).

The databases are deployed first and the app last, so the app finds them when it first starts.

## When something fails [#when-something-fails]

If making a service or one of its variables fails, OpenPanel removes what it made in that step and says why: a project made for the template is deleted whole, and services made in an existing project are deleted one by one. If the services were made but a deploy is refused, for example because a server is not ready, they stay, and the console says why; deploy them again from their **Overview** tab.

## Any image from Docker Hub [#any-image-from-docker-hub]

**Deploy an image**, on the Templates page or when a search names an image, deploys any image from Docker Hub by its name, or from another registry by its address. Give it an **HTTP port** to put it on a public opnl.app address; leave it empty for no address, and add ports later in its settings.

## Template as a service source [#template-as-a-service-source]

A service whose source is a template, made through the API with `"source": {"kind": "template", "template": "ghost"}`, cannot be deployed: a deploy answers "A template service deploys once the template catalogue ships." Deploy templates from the console instead, which makes image services, or give the service an image or a repository as its source.