Applies to v1.3.18

Deployment Topology

AI API Mapper is supported as a single-host Docker Compose deployment, the one the installer writes and starts (Installing AI API Mapper). This page describes what runs on that host, how requests move through it, and what it needs from the network around it.


Topology diagram

                          ┌───────────────────────────────────────────────────────────┐
   External traffic       │                       Docker host                         │
   ────────────────       │                                                           │
                          │  ┌─────────────────────────────────────┐                  │
   HTTPS :8443 ──────────►│  │  portal-web  (nginx, Portal SPA)    │                  │
   (admin browsers)       │  └─────────────────────────────────────┘                  │
                          │                                                           │
   HTTPS :5253 ──────────►│  ┌─────────────────────────────────────┐                  │
   (AI clients, MCP, A2A, │  │  gateway  (YARP reverse proxy)      │                  │
    SDKs, webhooks, and   │  └──────┬─────────────────────┬────────┘                  │
    the Portal SPA's API  │         │ /portal/*           │ /runtime/*                │
    calls)                │         ▼                     ▼                           │
                          │  ┌────────────────┐    ┌────────────────┐                 │
                          │  │  portal-api    │    │  runtime-host  │                 │
                          │  │  (admin REST)  │    │  (tools, MCP)  │                 │
                          │  └───────┬────────┘    └───────┬────────┘                 │
                          │          └──────────┬──────────┘                          │
                          │                     │        ┌──────────────────────────┐ │
                          │                     │        │  jobs-worker  (x N)      │ │
                          │                     │        │  (Quartz + MassTransit)  │ │
                          │                     │        └────────────┬─────────────┘ │
                          │  ─── Compose network (not published) ─────┼────────────── │
                          │                     ▼                     ▼               │
                          │  ┌──────────────────┐  ┌──────────┐  ┌──────────┐         │
                          │  │ postgres         │  │ rabbitmq │  │  valkey  │         │
                          │  │ (platform DB)    │  │  (AMQP)  │  │  (cache) │         │
                          │  └──────────────────┘  └──────────┘  └──────────┘         │
                          └───────────────────────────────────────────────────────────┘
Service Role Listens on Published on the host
portal-web Serves the Portal single-page application 8443 (HTTPS) PORTAL_HTTPS_PORT, default 8443
gateway The single ingress for every API call: routes /portal/* to Portal API and /runtime/* to Runtime Host 5253 (HTTPS) GATEWAY_HTTPS_PORT, default 5253
portal-api Administration REST API 5179 no
runtime-host Tool discovery and invocation, MCP, A2A, hosted agents 5065 no
jobs-worker Background and scheduled work: enrichment, AISI indexing, hosted-agent schedules, audit delivery, retention 5188 no; runs as JOBS_WORKER_REPLICAS replicas
postgres The platform database (PostgreSQL 17) 5432 no
rabbitmq The message broker between the services 5672 no
valkey The distributed cache (Redis protocol) 6379 no
database-migrator Creates and upgrades the database schema; runs only on demand — no

Both published ports carry TLS. The certificate in apimapper/certs is used by the Gateway and by Portal Web alike; replacing it is described in After the installation.

The data lives in named Docker volumes: postgres-data, rabbitmq-data, valkey-data, and one data-protection key volume per .NET service (portal-api-dataprotection, runtime-host-dataprotection, jobs-worker-dataprotection, gateway-dataprotection). The certificate and the license are folders next to the installation's docker-compose.yml (certs/, license/), mounted read-only. Back up the volumes and apimapper/.env together: the encryption keys of the stored secrets are in .env.


Bring your own observability backend

The installation contains no collector, metrics store, trace store or dashboard. Every .NET service exports traces and metrics over OTLP to a collector you run, and exposes a Prometheus-compatible /metrics endpoint on the Compose network. How to point the services at your collector is in Observability.


Data flow: AI tool invocation

AI client
    │  HTTPS :5253
    ▼
Gateway ──routes /runtime/*──► Runtime Host
                                    │
                                    ├── Resolve the tool definition (configuration snapshot, cached in memory and Valkey)
                                    ├── Authenticate the caller and evaluate the tool's access policies
                                    ├── Resolve downstream credentials (authentication profile + secret store)
                                    ├── Write the audit record (platform database)
                                    └── Call the downstream API, SQL procedure or remote MCP server
                                                 │
                                                 └── Transform the response and return it to the AI client

The Jobs Worker later delivers audit events to any external audit targets you configure; the call itself never waits for that delivery.

Data flow: admin API onboarding

Admin browser
    │  HTTPS :8443                       HTTPS :5253
    ├──► Portal Web (loads the SPA)
    └──────────────────────────────────► Gateway ──routes /portal/*──► Portal API
                                                                           │
                                                                           ├── Import the definition (OpenAPI, WSDL,
                                                                           │   stored-procedure catalog, MCP server)
                                                                           ├── Create the mapping draft
                                                                           └── Queue semantic enrichment, when requested
                                                                               (→ RabbitMQ)
                                                                                     │
                                                                                     ▼
                                                                               Jobs Worker
                                                                                     │
                                                                                     └── LLM enrichment, result stored
                                                                                         with the mapping

Admin reviews and publishes ──► Portal API commits the change ──► Runtime Host picks up the new snapshot

The browser loads the Portal from port 8443 and calls the API through the Gateway on port 5253, so both ports must be reachable from administrators' browsers.


Networking

All services share the network Compose creates for the installation. Only the two HTTPS ports above are published; PostgreSQL, RabbitMQ, Valkey and the internal ports of the .NET services are reachable from the Compose network only. Behind the Gateway the services speak plain HTTP to each other, which is why every .NET service is configured with TransportSecurity__TrustedUpstreamTlsTermination=true: outside Development a service refuses to start with a cleartext listener unless this is declared.

What the host needs:

Direction What Notes
Inbound 8443 and 5253 (or the ports you chose) from administrators' browsers and from AI clients Change them with --portal-port and --gateway-port
Inbound, optional /portal/hooks/aisi/{inboundId} and /runtime/hooks/agents/{id} on the Gateway port, from the internet Only when you use AISI push notifications or hosted-agent webhook triggers
Outbound The downstream APIs, databases and MCP servers your tools call; LLM providers; identity providers; audit targets; AISI storage and destinations Outbound hosts are checked against the Outbound Allowlist; see Configuration reference
Outbound https://license.apimapper.ai, for the evaluation registration only, and the image registry During installation and upgrades

Where outbound traffic must go through a forward proxy, see Behind a corporate proxy.

To put your own load balancer or TLS-terminating ingress in front of the host, forward both ports to it over HTTPS and read the next section.

Trusted proxies and client-address attribution

Every control the platform keys on the caller's address — per-IP rate limiting, login brute-force protection, the addresses recorded on audit records — depends on the address being the client, not whatever proxy last forwarded the request. Behind a gateway, ingress controller or load balancer that is only true when forwarded headers (X-Forwarded-For, X-Forwarded-Proto, X-Forwarded-Host) are honoured, and each service honours them only from proxies it has been told to trust.

Each service reads this from its TransportSecurity settings:

Setting Meaning
TransportSecurity__KnownNetworks__<n> CIDR networks whose forwarded headers are trusted
TransportSecurity__KnownProxies__<n> Individual proxy addresses whose forwarded headers are trusted
TransportSecurity__ForwardLimit How many proxies between the client and the service are read. Default 1

The installer sets KnownNetworks on every .NET service to the private ranges 172.16.0.0/12, 192.168.0.0/16 and 10.0.0.0/8, which covers the Compose network and the Gateway in front of Portal API and Runtime Host. Two consequences are worth knowing:

  • A proxy in front of the Gateway. A load balancer on a private address is trusted as it is. With more than one proxy in front of the Gateway, set TransportSecurity__ForwardLimit on the gateway service to the number of hops, counting any cloud load balancer ahead of your own ingress. With too low a limit the address resolved is the first proxy, not the client, and per-IP rate limits then treat many callers as one.
  • Clients on a private network. A client that connects to the Gateway directly from a private address is trusted as a proxy too, so the address it puts in X-Forwarded-For is the one recorded. Where clients reach the Gateway directly from your internal network and that matters, put a proxy you control in front of it and name only that proxy in KnownProxies on the gateway service.

Set these in a compose file of your own next to apimapper/docker-compose.yml, the same way as the files in Installing AI API Mapper: the installer writes its own file again on every run.


AISI on the Jobs Worker

AISI, the AI Storage Indexer, adds no container: the Jobs Worker reads the storage and writes the indexes, and Portal API stores its configuration and runs connection tests. What it needs from the host:

Need Where Notes
No share mounts — AISI reaches every storage over the network and never reads a folder on the platform's disks; do not mount document shares into its containers
Spool on the Jobs Worker, a volume at Aisi__Processing__SpoolDirectory, writable by uid 1654 Files are copied there while hashed and extracted, up to Aisi__Processing__MaxSpoolBytes (10 GB) per worker. Without it the spool is the container's temporary folder, on Docker's disk
OCR languages for a language beyond the shipped ones, a Jobs Worker image built from the shipped one adding tesseract-ocr-<code>, and the full list in Aisi__Ocr__Tesseract__AllowedLanguages__<n> on Portal API and the Jobs Worker The image ships and allows eng, deu, fra, ita, spa, por, nld, pol, ces and rus. A configured list replaces that set
Outbound access the Outbound Allowlist Storage services, destination databases and clusters are ordinary outbound hosts. A private address can be allowlisted unless OUTBOUNDSECURITY__ALLOWPRIVATENETWORKHOSTS is false
Push notifications the Gateway route /portal/hooks/aisi/{inboundId}, reachable from the internet Optional, off by default; see AISI — push and queue notifications

The spool volume and the OCR settings go in a compose file of your own, as shown in Indexing file storage with AISI; every AISI setting is in the Configuration reference.

More Jobs Worker replicas index more documents at once; they share the work through the database without further configuration (AISI — operations). AISI can also run on workers of its own: see AISI on workers of its own. To turn AISI off, set Aisi__Enabled: "false" on portal-api and jobs-worker, and AISI_ENABLED: "false" on portal-web.

Minimum host requirements

Resource Minimum Recommended
vCPU 4 8
RAM 8 GB 16 GB
Disk 50 GB 100 GB
OS Ubuntu 22.04 LTS Ubuntu 24.04 LTS
Docker 24.0+ latest stable
Docker Compose 2.20+ latest stable

The installer itself needs 10 GB of free disk space to install; the figures above leave room for the database, the broker, logs and, with AISI, the spool. The images are built for linux/amd64; see Before you start for the hosts the installer supports.