---
title: "CLI & command-line options"
description: "PreFormServer command-line options, such as --port and --scene-cache-size, how to start the server, and the DISABLE_PREFORMSERVER_TELEMETRY variable."
url: https://developer.formlabs.com/resources/preform-server-cli/
---

# CLI & command-line options

`PreFormServer` is a command-line application. It serves the PreForm API on the
port you pass, and `--help` lists its options.

## Options

PreForm Server accepts the following options:

| Option | Effect |
| --- | --- |
| `-p`, `--port <port>` | The port to serve the PreForm API on. Required. |
| `--scene-cache-size <size>` | The maximum number of scenes the server keeps. When the limit is exceeded, the server deletes the least recently used scene. The default is 30, and the maximum is 10000. |
| `--export-support-bundle` | Bundle the structured diagnostic logs and text logs into one archive for Formlabs support, then exit. |
| `-v`, `--version` | Print the version. |
| `-h`, `--help` | Print the options. |

## Start the server

Start the server on port 44388:

**macOS:**

```bash
/Applications/PreFormServer.app/Contents/MacOS/PreFormServer --port 44388
```

**Windows:**

```powershell
C:\PreFormServer\PreFormServer.exe --port 44388
```

The server prints `READY FOR INPUT` when it accepts requests. The SDK's `launch()`
method passes `--port` and waits for that line.

## Environment variables

PreForm Server reads the following variable:

| Variable | Effect |
| --- | --- |
| `DISABLE_PREFORMSERVER_TELEMETRY` | Set to `1` to turn off telemetry. The server reports the telemetry state on its first line of output. |

To pass variables to a server the SDK starts, use the `env` argument of `launch()`.

## What's next

- [Headless PreForm Server](https://developer.formlabs.com/guides/headless-preform-server.md)
