Skip to main content
The Binary Internals Web Server is configured entirely through environment variables — there is no configuration file to manage. Set variables before starting the process (or pass them with docker run -e) and the server picks them up at startup via WebServer.Config.fromEnv(). Every variable has a sensible default so you can run the server without setting anything at all.

Environment variables

In the Docker image, HOST defaults to 0.0.0.0 so the server accepts connections from outside the container. When running directly on the host with java -jar, HOST defaults to 127.0.0.1 (loopback only). Override it explicitly if you need a different binding in either context.

Running with Docker

Build the image from the repository root, then run it with any overrides you need:

Running with Docker Compose

The supplied docker-compose.yml sets recommended defaults and resource limits in one place:
Edit the environment: block in docker-compose.yml to change settings without retyping docker run flags each time.

Running without Docker

After building with mvn install, start the JAR directly and pass variables in the environment:
Or as a named Java module:

CORS

By default, CORS_ORIGIN=* allows any browser origin to call the API, which is convenient for local development and public read-only deployments. The server adds these headers to every /api/ response when CORS is enabled:
OPTIONS preflight requests receive a 204 No Content response immediately. To restrict access to a single origin, set the exact origin value:
To disable CORS headers entirely (for server-side-only usage), set the variable to an empty string:

Security

The README and the default docker-compose.yml both apply these constraints to limit the blast radius of a malicious or pathological input file:
The docker-compose.yml also drops all Linux capabilities (cap_drop: ALL) and sets no-new-privileges:true for defence in depth.
Binding HOST=0.0.0.0 exposes the server directly on the network. In production, keep HOST=127.0.0.1 and place a reverse proxy (nginx, Caddy, etc.) in front to handle TLS termination, rate limiting, and access control. Never expose the raw server port to the internet without a proxy.