Configuration
Server-side knobs only. CLI flags on the entry point and one environment variable. Client config lives under Use from Python.
Server-side knobs only: a handful of CLI flags on the neops-remote-lab entry point and a single environment variable that toggles Netlab subprocess streaming. Client-side configuration (REMOTE_LAB_URL plus the three timeouts) lives on its own page under Use from Python → Configuration.
Server CLI flags
The neops-remote-lab entry point is defined in neops_remote_lab/__main__.py:main() and parses the following flags via argparse.
| Flag | Default | Description |
|---|---|---|
--host <addr> |
0.0.0.0 |
Interface to bind. The default binds on all interfaces — only appropriate on trusted networks (see Security model). |
--port <int> |
8000 |
TCP port. |
--log-level <level> |
INFO |
Python logging level applied to the remote-lab loggers. Case-insensitive (DEBUG, INFO, WARNING, ERROR). |
--log-config <path> |
logging_config.yaml |
Path to a YAML logging config. If the path does not exist, the packaged default is used (neops_remote_lab/logging_config.yaml). |
--debug |
off | Enables debug logging and streams Netlab output (see below). |
--version |
— | Print version and exit. |
The --debug shortcut
--debug performs two side effects on top of normal startup:
- Overrides
--log-leveltoDEBUG. - Exports
NEOPS_NETLAB_STREAM_OUTPUT=1into the process environment, so Netlab subprocess output streams to the log in real time.
Equivalent to:
Launch examples
DEBUG logging plus live Netlab output. Useful when a topology fails to come up and you want to watch netlab up in the server log.
Bind to a specific interface — preferred when the host has a public NIC you do not want the server reachable on.
Server environment variable
NEOPS_NETLAB_STREAM_OUTPUT
When set to the string "1", run_netlab unconditionally enables line-by-line streaming of Netlab subprocess output into the server log at DEBUG level.
| Value | Effect |
|---|---|
"1" |
Stream Netlab stdout/stderr live to the logger |
| unset or anything else | Capture Netlab output and log only on non-zero exit code |
The server sets this automatically when you launch it with --debug. Export it manually for one-off investigations without changing the log level.
Server startup prerequisites
The entry point performs two pre-flight checks before binding the HTTP port:
- Single-instance lock — see Administration → Single-instance filelock.
- Netlab CLI on PATH — if
shutil.which("netlab")returnsNonethe server logs the install URL and exits withSystemExit(1)before starting. Install Netlab on the host before starting the server — see Netlab host setup.
What you almost never need to change
- Server cleanup cadence — hard-coded in
server.py:_SESSION_CLEANUP_INTERVAL = 5,_WAITING_SESSION_TIMEOUT = 600,_ACTIVE_SESSION_STALE = 300. These are not exposed as flags because changing them shifts the FIFO contract that clients depend on; see Session Queue for the reasoning. - Netlab instance name — the server always uses the
defaultNetlab instance and cleans up stale defaults at startup.
If you believe you need to change one of these, open an issue — the one-size-fits-all defaults are deliberate.
Client-side configuration
Client environment variables (REMOTE_LAB_URL plus the three timeout overrides) live on their own page: Use from Python → Configuration. The pytest fixture and RemoteLabClient read those at setup time on the test-runner host, not on the server.
See also
- REST API — endpoints served on
--host:--port. - Operator runbook — install, systemd, stale-lock recovery, stuck-lab cleanup.
- Security model — the threat model the
--hostrecommendation above is built on top of. - Client config — client environment variables (
REMOTE_LAB_URLand the three timeout overrides).