---
title: "Requirements"
description: "What a TRUSTIVAN deployment needs: the two dependencies, the toolchain, and the network access the scanner relies on."
---

<Note>
**Self-hosting is by agreement.** The container images (`ghcr.io/trustivan/*`)
and the source repository are private: they are provided to customers who run
TRUSTIVAN on their own infrastructure. To evaluate TRUSTIVAN, use the hosted
service from the [quickstart](/getting-started/quickstart), or [contact
us](https://trustivan.com/contact/) about self-hosting.
</Note>

TRUSTIVAN is a Go backend with two dependencies: PostgreSQL and Redis. Everything
else in the deployment is a choice about how many processes you run.

## The dependencies

| Component | Version | Why |
|---|---|---|
| PostgreSQL | 16 | The system of record. Scans, findings, schedules and job state all live here |
| Redis | 7 | The scan wakeup queue, and nothing else |

The division is deliberate and worth understanding before you plan capacity.
**PostgreSQL holds the job; Redis carries a wakeup.** A queue whose only record
of a job is in a cache is not durable, whatever the cache is configured to
persist, so job state was never put there. Losing Redis entirely costs latency
(the dispatcher finds every queued scan in PostgreSQL and republishes them) and
never costs work.

That also sets the backup boundary: PostgreSQL is the thing to back up. Redis
and the scanner cache can both be discarded and rebuilt.

## Running with Docker

The supported installation path is Docker Compose. You need:

- Docker Engine with Compose v2
- Roughly 2&nbsp;GB of free disk for the vulnerability database and image blob
  cache
- Outbound HTTPS to the registries you intend to scan, and to
  `ghcr.io`/`mirror.gcr.io` for the vulnerability database

See [Docker Compose](/installation/docker-compose) for the stack itself.

## Building from source

Two constraints, neither of them chosen, come from the vendored scanning
engine:

| Constraint | Source |
|---|---|
| Go ≥ 1.26.6 | The `go.mod` directive, set by the backend's dependencies. A lower toolchain cannot compile the dependency at all |
| `GOEXPERIMENT=jsonv2` | The scanner imports `encoding/json/v2`, which Go gates behind that experiment |

Without the experiment the build fails with an error naming
`encoding/json/v2` in the Go standard library and saying nothing about the
cause. [From source](/installation/from-source) covers how the Makefile,
the Dockerfile and the preflight check each set it so you do not have to
remember.

## Network access the scanner needs

Images are resolved from **remote registries only**. The worker does not use a
Docker socket, a container runtime, or any access to a local image store, so
there is nothing to mount and no daemon to install.

This is a security property rather than a simplification. Mounting a runtime
socket into the process that handles untrusted input would be root on the host,
and consulting a local image store would let a caller-supplied reference resolve
to another tenant's image.

Two consequences for your network plan:

- Registries must be reachable from the worker over the public internet by
  default. Registries on loopback or private addresses are refused unless you
  deliberately change that, and link-local addresses are refused always. See
  [Scanning](/configuration/scanning). Registry and git connections made
  for a scan do not use `HTTP_PROXY` or `HTTPS_PROXY`.
- Registries requiring **authentication** need a stored credential, which is a
  Pro and Enterprise capability. The two settings are independent: an internal
  registry that is both privately addressed and password-protected needs the
  network permission above *and* a credential.

## Resource shape

Requests are milliseconds; scans are minutes. Size the two independently.

| Process | Bounded by | Notes |
|---|---|---|
| API | Request concurrency | Stateless beyond its database and Redis connections |
| Worker | `SCAN_CONCURRENCY` (default 2) | Each concurrent scan unpacks an image to disk and holds it while matching |

Worker concurrency is bounded on purpose: the scanning engine shares an on-disk
cache, so raising it without limit produces lock contention rather than
throughput. [Scaling](/deployment/scaling) covers when to add a replica
instead.

## Ports

| Service | Port |
|---|---|
| API | 8080 |
| Metrics | 9090, on loopback by default |
| PostgreSQL | 5432 |
| Redis | 6379 |

8080 is canonical: it is what the Dockerfile exposes, what the compose file
publishes, and what every OAuth redirect URI assumes. Changing it means
reconfiguring every OAuth application registered against those URIs, which is
why the one value with an external dependency won.
