Network Diagrams
How Hrida.ai reaches your model server depends on where each one runs. Find your layout below to see the network path and the URL to enter in Admin › Settings › Connections. Use these diagrams to plan a deployment or to debug a connection that fails.
The examples use vLLM as the model server. Any other OpenAI-compatible server works the same way with its own port.
Pick Your Layout
| Layout | Where things run | URL in Hrida.ai | Status |
|---|---|---|---|
| Compose stack | Hrida.ai and vLLM in one Docker Compose stack | http://vllm:8000/v1 | ✅ Recommended |
| Model server on the host | vLLM on the host, Hrida.ai in a container | http://host.docker.internal:8000/v1 | ✅ Works (Linux needs one flag) |
| Separate GPU server | vLLM on another machine | http://<gpu-server>:8000/v1 | ✅ Common in production |
| Production with a reverse proxy | Users reach Hrida.ai over HTTPS; vLLM on a private network | http://<gpu-server>:8000/v1 | ✅ Recommended for teams |
| Host network | Hrida.ai with --network=host | http://localhost:8000/v1 | ⚠️ Linux only |
| Separate Docker networks | Each container on its own network | — | ❌ Cannot connect |
Reading the Diagrams
- Boxes are the user's browser, Hrida.ai and the model server. Zones are where they run: a machine, Docker, or a network.
- Arrows show who connects to whom. Above each arrow is what travels on it; below it is the URL used. A red dashed arrow is a connection that fails.
- Hrida.ai listens on port
8080inside its container. The examples publish it as port3000on the host (-p 3000:8080), so users openhttp://localhost:3000. - vLLM listens on port
8000and serves the OpenAI API under/v1. - Every model call is made by the Hrida.ai backend, not by the user's browser. The URL must work from inside the Hrida.ai container. That is why
localhostusually fails there: inside a container, it means the container itself.
Compose Stack
Hrida.ai and vLLM run as two services in the same Docker Compose stack. Compose puts them on a shared network where each service is reachable by its name. This is the simplest layout and works the same on every OS.
URL in Hrida.ai: http://vllm:8000/v1, where vllm is the service name in docker-compose.yaml. See the Compose example.
Model Server on the Host
vLLM runs directly on the host, for example with pip install vllm, and Hrida.ai runs in a container. The container reaches the host through the special name host.docker.internal.
vLLM must listen on all interfaces (--host 0.0.0.0), not only on 127.0.0.1.
- macOS / Windows
- Linux
Docker Desktop runs containers in a Linux VM and provides host.docker.internal automatically.
Docker Engine on Linux does not define host.docker.internal by default. Add it when you start Hrida.ai with --add-host=host.docker.internal:host-gateway, or in Compose with extra_hosts: ["host.docker.internal:host-gateway"].
URL in Hrida.ai: http://host.docker.internal:8000/v1.
Separate GPU Server
vLLM runs on a dedicated GPU machine, and Hrida.ai runs on another server or VM. This is the usual layout when the GPUs live in a separate cluster.
URL in Hrida.ai: http://<gpu-server>:8000/v1, using a host name or IP address the Hrida.ai server can resolve.
- Start vLLM with
--api-key, and enter the same key in the connection. - Allow port
8000from the Hrida.ai server only (firewall or security group), not from the internet. - vLLM's API has no TLS of its own. If traffic crosses an untrusted network, put a TLS proxy in front of vLLM and use
https://in the URL.
Production with a Reverse Proxy
Users reach Hrida.ai over HTTPS through a reverse proxy (Nginx, Caddy, Traefik or a cloud load balancer). vLLM stays on a private network that only Hrida.ai can reach.
URL in Hrida.ai: the private address of vLLM, for example http://vllm:8000/v1.
- The proxy must forward WebSocket upgrades to Hrida.ai. See HTTPS & Reverse Proxies.
- Never expose vLLM through the public proxy. Users never call it directly.
Host Network
Hrida.ai is started with --network=host, so it shares the host's network instead of getting its own.
- macOS / Windows
- Linux
This does not work as expected. On Docker Desktop the "host" network is the Linux VM's network, not your machine's. Users cannot reach Hrida.ai on localhost, and Hrida.ai cannot reach a model server on your machine through localhost. Use a Compose stack or published ports instead.
On Linux, both Hrida.ai and vLLM use the host's network directly, so localhost works. There is no port mapping: users open port 8080.
URL in Hrida.ai: http://localhost:8000/v1.
Separate Docker Networks
Hrida.ai and vLLM run as containers on two different Docker networks, for example because they were started from two separate Compose projects. Containers on different networks cannot reach each other, so every model call fails.
To fix it, do one of these:
- Put both services in one Compose file (Compose stack).
- Attach one container to the other's network:
docker network connect <network-b> hrida-ai, then usehttp://vllm:8000/v1. - Publish vLLM's port on the host (
-p 8000:8000) and use the host layout.
Other Model Servers
The same layouts apply to any model server. Only the port and the connection type change:
| Server | Default port | Connection in Hrida.ai | URL path |
|---|---|---|---|
| vLLM | 8000 | OpenAI | /v1 |
| LocalAI | 8080 | OpenAI | /v1 |
| LM Studio | 1234 | OpenAI | /v1 |
| Ollama (optional) | 11434 | Ollama (OLLAMA_BASE_URL) | none |
Still stuck? See Connection Errors.