Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ CLI arguments and environment variables are available for all of the fields defi
Additionally the server supports configuration check out the [configuration section](#configuration-and-multi-model-support) for more information and examples.


#### Binding address and port

When you launch with `python3 -m llama_cpp.server`, the process environment variables `HOST` and `PORT` override the corresponding command-line flags or values in a server config file.
If the server reports an unexpected port, check whether your shell or launcher sets `PORT`.
For example, on Linux or macOS, the following command removes the inherited overrides for this invocation only:

```bash
env -u HOST -u PORT python3 -m llama_cpp.server --model model.gguf --host 127.0.0.1 --port 8080
```

If you use `--config_file`, set `host` and `port` in that file and clear any conflicting environment values.
In config-file mode the server reads its settings from the file instead of the corresponding CLI flags.


## Guides

### Code Completion
Expand Down