---
title: Run Human Plugin in your infrastructure
description: What running Human Plugin involves — one container and your PostgreSQL database — and the order of a deployment.
canonical: https://developer.unico.io/human-plugin/self-hosting/overview
locale: en
generated_by: markdown-export
---

# Run Human Plugin in your infrastructure

One container and one PostgreSQL database in your network, and you are connected to Unico.

```mermaid
flowchart LR
  A[Your back-end] --> B[Human Plugin container]
  B --> C[(Your PostgreSQL, dedicated)]
```

## Requirements

| Requirement | Detail |
| --- | --- |
| Container runtime | Docker, Docker Compose or Kubernetes. The image is built for `linux/amd64` and `linux/arm64` and runs as non-root |
| PostgreSQL | Version 16 or later. A database used only by Human Plugin, reachable with a user and password. SSL is required by default |
| Outbound HTTPS | To Unico. See [Networking and security](/human-plugin/self-hosting/networking-and-security) |
| Inbound | Port `8080`, plain HTTP, only from your back-end |
| Secrets | Your access key and the database password |

## Hardware requirements

The minimum to run Human Plugin with up to **1,500 transactions per minute**, with selfies of up to 800 KB.

### Human Plugin

| Resource | Minimum |
| --- | --- |
| CPU | 1 vCPU per replica |
| Memory | 1 GB per replica |

For more volume, add one replica for every 1,500 transactions per minute. We also suggest running more than one replica, so Human Plugin stays available while one restarts.

### PostgreSQL

| Resource | Minimum |
| --- | --- |
| Version | 16 |
| CPU | 2 vCPU |
| Memory | 4 GB |
| Disk | SSD |

To estimate disk space, count about 1.7 KB per process × processes per day × the days you keep, plus 30%.

### Network

Outbound HTTPS (port 443) to Unico. See [Networking and security](/human-plugin/self-hosting/networking-and-security).

## The image

Human Plugin is published as `pkg.unico.run/human-plugin-api:latest`. Always run the `latest` tag, which is the current release. Pull it with the registry credentials (username and token) Unico gives you. See [Prerequisites and access](/human-plugin/get-started/prerequisites).

## Deployment order

1. Create the dedicated database and a role for Human Plugin.
2. Set the [configuration](/human-plugin/self-hosting/configuration), with the secrets from your secret store.
3. Start the container with [Docker Compose](/human-plugin/self-hosting/docker-compose) or [Kubernetes](/human-plugin/self-hosting/kubernetes), with a stop timeout of at least 60 seconds.
4. Wait for `GET /health/ready` to answer `200` before routing traffic. See [Health and monitoring](/human-plugin/self-hosting/health-and-monitoring).
5. Restrict access to your back-end. See [Networking and security](/human-plugin/self-hosting/networking-and-security).
6. Run the [Quickstart](/human-plugin/get-started/quickstart#3-create-a-process) create request against it.

## What happens at startup

Human Plugin downloads the [attribute catalog](/human-plugin/additional-resources/attribute-catalog), connects to PostgreSQL and prepares its tables, then opens the port. It stops with an error, before it listens, when:

- a required setting is missing or invalid;
- the attribute catalog cannot be downloaded;
- PostgreSQL is unreachable, or the role cannot create tables.

The log states the reason. See [Troubleshooting](/human-plugin/additional-resources/troubleshooting).

## Several instances

Human Plugin keeps no request state in memory, so several containers can share one database. Containers that start at the same time coordinate through the database, so you can roll out replicas together.

## Going to production

- Keep the stop timeout at 60 seconds or more.
- Route traffic to a container only after `/health/ready` answers `200`.
- Never expose Human Plugin outside your private network.
- Back up the database: it holds your intelligence. See [Operations](/human-plugin/self-hosting/operations).