gptme-server#
gptme server commands.
Usage
gptme-server [OPTIONS] COMMAND [ARGS]...
openapi#
Generate OpenAPI specification without starting server.
Usage
gptme-server openapi [OPTIONS]
Options
- -o, --output <output>#
Output file path
serve#
Starts a server and web UI for gptme.
Usage
gptme-server serve [OPTIONS]
Options
- --debug#
Debug mode
- -v, --verbose#
Verbose output
- --model <model>#
Model to use by default, can be overridden in each request.
- --host <host>#
Host to bind the server to.
- --port <port>#
Port to run the server on.
- --tools <tools>#
Tools to enable (comma separated). Use ‘none’ to disable all tools.
- --cors-origin <cors_origin>#
CORS origin(s) to allow. Use ‘*’ to allow all origins. Pass a comma-separated list to allow multiple origins, e.g. ‘https://chat.gptme.org,tauri://localhost,http://tauri.localhost’. Set this to the origin of the web UI you load (for the hosted UI, ‘https://chat.gptme.org’).
- --allowed-hosts <allowed_hosts>#
Comma-separated hostnames to accept in the Host header, in addition to the built-in localhost/127.0.0.1/[::1] allow-list. Relevant when bearer auth is explicitly disabled with GPTME_DISABLE_AUTH. Can also be set via the GPTME_SERVER_ALLOWED_HOSTS environment variable.
- --webui-dir <webui_dir>#
Directory containing a web UI build to serve instead of the bundled modern UI. Can also be set via the GPTME_WEBUI_DIR environment variable.
- --exit-on-parent-death#
Exit when the parent process dies. Useful when run as a sidecar (e.g. by gptme-tauri) to avoid orphaned servers when the parent exits without cleaning up children (gptme/gptme#2260).
- --watch-pid <watch_pid>#
PID to watch for liveness. If the PID disappears the server exits. Used by gptme-tauri to pass its own PID so PyInstaller-bundled servers can detect Tauri exit even when the bootloader survives reparenting.
- --default-profile <default_profile>#
Default agent profile to apply to new conversations that don’t specify a system prompt. Useful for specialized deployments such as the computer-use Docker container where every session should use the ‘computer-use’ backend-selection policy. Must be a valid profile name (e.g. ‘computer-use’, ‘browser-use’). Can also be set via the GPTME_SERVER_DEFAULT_PROFILE environment variable.
Environment variables
- GPTME_SERVER_HOST
Provide a default for
--host
- GPTME_SERVER_PORT
Provide a default for
--port
- GPTME_SERVER_ALLOWED_HOSTS
Provide a default for
--allowed-hosts
- GPTME_WEBUI_DIR
Provide a default for
--webui-dir
- GPTME_SERVER_DEFAULT_PROFILE
Provide a default for
--default-profile
token#
Display the server authentication token.
Usage
gptme-server token [OPTIONS]