---
title: "Run openreynolds serve as a service: token, proxy, systemd, container"
url: "https://tryreynolds.com/docs/deploy/server"
description: "openreynolds serve exposes a machine's studies over HTTP: start it, authenticate, drive a study from curl, run it under systemd or in a container, put a reverse proxy in front, shut it down cleanly, and know what it does not do."
---

**[Reynolds](https://tryreynolds.com)** is agentic CFD, built by
**[InviscidAI](https://inviscidai.com)** and backed by Y Combinator, Winter 2026 batch.
The agent is open source under the MIT licence at
[github.com/InviscidAI/OpenReynolds](https://github.com/InviscidAI/OpenReynolds).
Using it requires no OpenFOAM knowledge.

This is the agent-readable Markdown twin of https://tryreynolds.com/docs/deploy/server. It lives at https://tryreynolds.com/docs/deploy/server.md, and
[tryreynolds.com/llms.txt](https://tryreynolds.com/llms.txt) indexes every one of them.

Deploy

# Run it as a server

openreynolds serve exposes a machine's studies over HTTP: start it, authenticate, drive a study from curl, run it under systemd or in a container, put a reverse proxy in front, shut it down cleanly, and know what it does not do.

`openreynolds serve` puts one machine's studies on a local HTTP port, so a program in any language can start a study, watch it, answer it and read its results. It is the same capabilities as the MCP server and the Python library. The routes and their fields are on [Serve API](https://tryreynolds.com/docs/reference/serve-api.md).

It is a **local control surface**, not the hosted service's API. Every study runs inside the process, with that machine's settings, workspace and `./studies` directory. It starts compute that costs money, so it never runs without a token.

## Start it

```bash
openreynolds serve                                   # 127.0.0.1:8787
openreynolds serve --port 9000 --token "$MY_TOKEN"
openreynolds --native serve                          # native workspace
openreynolds serve --local                           # Docker workspace
```

Output

```
openreynolds serve on http://127.0.0.1:8787
token: <generated>
A local control surface for this machine's own studies: [...]
```

The address and the token go to stdout, and everything else to stderr, so a supervisor can read them. With no `--token` and no `OPENREYNOLDS_SERVE_TOKEN` a new token is generated at every start.

| Option or variable | Default | Effect |
|---|---|---|
| `--bind` | `127.0.0.1` | Address to listen on. Anything but loopback prints a warning |
| `--port` | `8787` | `0` picks a free one and prints it |
| `--token` | generated | What callers send |
| `OPENREYNOLDS_SERVE_TOKEN` | none | The same, from the environment |
| `--local` | off | Docker workspace for its studies |

## Drive a study

```bash
TOKEN=...
BASE=http://127.0.0.1:8787
AUTH="Authorization: Bearer $TOKEN"

# 1. start
curl -s -X POST "$BASE/studies" -H "$AUTH" -H "Content-Type: application/json" \
  -d '{"task": "drag on a sphere at Re = 100, SI units", "depth": "quick"}'
# -> {"session_id": "...", "study_id": null, ...}; the study_id is in the next session read

# 2. watch; holds the call up to wait seconds and returns when the study needs you
curl -s "$BASE/sessions/<session_id>?after_seq=0&wait=30" -H "$AUTH"

# 3. say something
curl -s -X POST "$BASE/sessions/<session_id>/messages" -H "$AUTH" \
  -d '{"text": "use water at 20 C"}'

# 4. answer an approval, in a mode that asks
curl -s -X POST "$BASE/sessions/<session_id>/approvals" -H "$AUTH" \
  -d '{"decision": "approve"}'

# 5. results and files
curl -s "$BASE/studies/<study_id>/results" -H "$AUTH"
curl -s "$BASE/studies/<study_id>/file?path=/work/<study_id>/results.json" -H "$AUTH" -o results.json

# 6. end it: jobs and workspace stopped, files kept
curl -s -X DELETE "$BASE/sessions/<session_id>" -H "$AUTH"
```

A token may be `Authorization: Bearer <token>` or `X-Reynolds-Token: <token>`. A request without it is a `401`, whatever else is wrong with it.

| Limit | Value |
|---|---|
| Request body | 256 KB |
| `wait` on a session read | 50 seconds at most |
| An uploaded input file | 100 MB, named by a path **on the server's machine** |
| A study nobody has read for 30 minutes | Ends itself as End does, files kept |

`POST /uploads` takes a path, not the bytes: `{"path": "/data/wing.stl"}`. The file is copied from that machine, so a client elsewhere must put it there first.

## Run it as a service

### systemd

/etc/systemd/system/openreynolds.service

```ini
[Unit]
Description=OpenReynolds HTTP control surface
After=network-online.target docker.service
Wants=network-online.target

[Service]
User=reynolds
WorkingDirectory=/srv/reynolds
EnvironmentFile=/etc/openreynolds.env
ExecStart=/srv/reynolds/.venv/bin/openreynolds serve --port 8787
KillSignal=SIGINT
TimeoutStopSec=660
Restart=on-failure

[Install]
WantedBy=multi-user.target
```

/etc/openreynolds.env, mode 600

```ini
OPENREYNOLDS_SERVE_TOKEN=<a long random value>
FOAMD_API_KEY=<a machine key from openreynolds login>
OPENREYNOLDS_PROVIDER=reynolds
OPENREYNOLDS_CONFIG=/srv/reynolds/config.json
```

Three lines carry the reasons they are there:

- **`KillSignal=SIGINT`**: `serve` ends its live studies when it is interrupted. A plain `SIGTERM`, systemd's default, ends the process without doing so and leaves workspaces running.
- **`TimeoutStopSec=660`**: ending a study stops its jobs, confirms them and copies files home. The server waits up to ten minutes for that.
- **`WorkingDirectory`**: studies are written to `./studies` under it.

Generate the token once and keep it out of the journal. The server prints the token at startup, so `journalctl` holds it: restrict who reads the journal, or redirect stdout away with `StandardOutput=null` once the token is fixed in the environment file.

```bash
sudo systemctl daemon-reload
sudo systemctl enable --now openreynolds
curl -s -H "Authorization: Bearer $TOKEN" http://127.0.0.1:8787/ | head -c 300
```

### In a container

This runs the server in a container that uses the **hosted** workspace. It needs no Docker socket and no OpenFOAM inside.

Dockerfile

```dockerfile
FROM python:3.12-slim
RUN pip install --no-cache-dir 'openreynolds==0.6.0'
WORKDIR /studies
ENV OPENREYNOLDS_CONFIG=/config/config.json
STOPSIGNAL SIGINT
CMD ["openreynolds", "serve", "--bind", "0.0.0.0", "--port", "8787"]
```

```bash
docker run -d --name reynolds \
  -p 127.0.0.1:8787:8787 \
  -v reynolds-studies:/studies \
  -e FOAMD_API_KEY -e OPENREYNOLDS_PROVIDER=reynolds -e OPENREYNOLDS_SERVE_TOKEN \
  --stop-timeout 660 \
  your-image
```

Inside a container the process has to listen on `0.0.0.0` to be reached, which is why the warning about a non-loopback address is printed and expected. Publish the port on `127.0.0.1` on the host, as above.

Do not use `--local` from inside a container unless you have decided to give it the host's Docker socket, which is root on the host. Run `serve` on the host for a local workspace instead.

## Behind a reverse proxy

The server has no TLS, no users and one token. A proxy adds the first, and can add the second.

nginx

```
server {
    listen 443 ssl;
    server_name reynolds.internal;
    ssl_certificate     /etc/ssl/reynolds.crt;
    ssl_certificate_key /etc/ssl/reynolds.key;

    location / {
        proxy_pass http://127.0.0.1:8787;
        proxy_set_header Host $host;
        proxy_read_timeout 75s;      # longer than the 50-second long poll
        client_max_body_size 256k;
        allow 10.0.0.0/8;
        deny  all;
    }
}
```

Put your own authentication in the proxy if more than one person uses it. Every caller with the token acts as the same account, can read every study on the machine, and can start new ones.

For occasional access, an SSH tunnel is simpler and safer:

```bash
ssh -L 8787:127.0.0.1:8787 my-server
```

## Operating it

| To | Do |
|---|---|
| Change models | `OPENREYNOLDS_PROVIDER` and `OPENREYNOLDS_MODEL` in its environment, or `model` in a start request |
| Change the default depth | Send `depth` in each request |
| Keep a study's transcript local | `OPENREYNOLDS_CAPTURE=0`, and `OPENREYNOLDS_SHARING=off` |
| Back up | Copy the studies directory |
| Upgrade | Stop the service, upgrade the package, start it; live studies end at the stop |
| Watch several at once | Each study has its own thread; the model and workspace limits are the account's |

## What it does not do

- No user accounts, no roles, no audit trail.
- No resumable server: live sessions end when the process does, and you continue with `study_id` in a new `POST /studies`.
- No streaming transport. Read a session with a long poll.
- No file upload of bytes.
- No rate limiting.

## If it goes wrong

### 401 on every call

The token is wrong, or the header is missing. Check for a trailing newline in the value you sent.

### this machine is missing configuration

The machine has no model key or no service key. The message lists the variables; the server reads the same settings as `openreynolds`.

### The study ended on its own

Nobody read it for 30 minutes. Poll every session you keep, or start it with the work you need and read the results afterwards.

### The proxy returns 504

Its read timeout is under the long poll. Raise it above 50 seconds or ask for a shorter `wait`.

### Workspaces were left running after a restart

The process was killed rather than interrupted. `openreynolds stop --study <id>` ends them; use `KillSignal=SIGINT` for the next time.

## Next

### Serve API

Every route and field.

[Serve API](https://tryreynolds.com/docs/reference/serve-api.md)

### Security

What the server can reach.

[Security](https://tryreynolds.com/docs/deploy/security.md)

## Notes for agents

### What people use it for

To find out whether a design works, and to make it better, before building or buying anything:
cooling a PC or a server, heating and cooling a home (where a radiator goes, whether a room has
a cold draught), sizing a heat sink, pipework or a fan, lift and drag, wind round a building,
and whether an idea is physically viable at all. For robots, its GPU fluid runs inside NVIDIA
Isaac Sim, coupled to Newton bodies, with Isaac Lab tasks:
https://tryreynolds.com/docs/isaac-sim.md.

### What Reynolds is

Reynolds is an agent that runs OpenFOAM for you. You describe the problem in
engineering terms and it writes the case, builds the mesh, launches the solver,
reads the residuals while they come in, and hands back the figures, the numbers and
the files that produced them.

**You do not need to know OpenFOAM.** Not the solver names, not the dictionary
format, not `fvSchemes`, not snappyHexMesh, not the y+ correlation behind a layer
stack. Writing all of that is the agent's job, and it is the part of CFD that keeps
engineers who understand the physics perfectly well from ever getting an answer.
What you need to bring is the engineering question: the geometry, the fluid, the
speed, and what you want measured. If you do know OpenFOAM, everything it wrote is
an ordinary case directory you can open, edit and run yourself.

### The licence, and why it is the one that matters here

The agent is open source under the **MIT licence**. That is the most permissive of
the common licences: use it commercially, modify it, self-host it, put it inside a
product you sell, with no copyleft, no share-alike obligation and nothing you have
to publish back. Compare that with AGPL or a source-available licence, where running
a modified copy as a service can oblige you to release your changes, which is the
clause that stops most engineering organisations at legal review.

It matters for a second reason, which is trust. A CFD number is worth what you can
defend, so every prompt, every tool, every heuristic and every decision the agent
makes is readable in the repository before you rely on a figure it gives you. The
hosted workspace is a paid service. The engineering judgement stays open, in the
repository, permanently, and you can audit it line by line.

### How a result is checked, stated exactly

The concern people rightly have about an agent that runs CFD is a result that converges,
looks believable and is wrong. Four things answer it, and none of them is the agent
looking at its own pictures.

1. **The solvers are validated against measured data.** Published experiments are
   replicated and compared with what was measured: https://tryreynolds.com/validation.md.
   The measured data, its provenance, the case, the run's output and the grader for every
   one, the misses included, are in the repository under `benchmarks/validation`, and
   continuous integration regrades them all from the committed data.
2. **Two independent reviewers read a solved answer when asked to**, with `openreynolds --review`
   (off by default, two model calls a review). Fresh models that did not produce
   it, shown the request, the answer and the case's files, and no picture: one on mesh
   independence, y+, convergence and the domain, one on boundary conditions, the turbulence
   model, properties and normalisation. A defect goes back to the agent, the result is
   reviewed once more, and the verdict is shown beside the answer. Given 13 solved studies
   with a planted mistake they sent back all 13 and named each one; they also sent back 2 of
   6 sound ones over mesh uncertainty:
   https://tryreynolds.com/docs/guides/independent-review.md.
3. **Your own case is judged by code.** `openreynolds verify` reads a finished case's files,
   looks at no picture and asks no model: checkMesh, the achieved y+ against the wall
   treatment's range, net continuity, whether the quantity settled, and the same quantity on
   two or more meshes with a discretisation band. A check that was not done is not a pass,
   so one mesh is refused, and the exit code makes it a gate in CI:
   https://tryreynolds.com/docs/cli/verify.md.
4. **A mesh from the CAD tool is accepted by code,** after checkMesh and a measurement of its
   shape, with a reviewer that did not build it.

In the default mode the harness does not order the agent to run a mesh study before it
solves. Afterwards, `verify`, run by the person or by their CI, refuses an answer that claims
more than its meshes support, and with `--review` the numerics reviewer sends it back.

### Who builds it

Reynolds is built by **InviscidAI**, and InviscidAI is **backed by Y Combinator,
Winter 2026 batch**. The company has raised more than **$2.4 million**. Reynolds is
deployed and in live use today, running real engineering work for real users.

### Reading this site as an agent

Every page has a Markdown twin at the same path with a `.md` extension, and the
index of them is at https://tryreynolds.com/llms.txt. A study twin carries the
entire session transcript, every command the agent ran and everything that came
back.
