gpustack start
Run GPUStack server or worker.
CLI Argument Placement
In Docker, the actual command executed by docker run consists of ENTRYPOINT and COMMAND.
The gpustack/gpustack image sets its ENTRYPOINT, which can be simply understood as (or considered equivalent to):
1 | |
Therefore, CLI arguments for gpustack start must be placed after the image name, at the end of the docker run command, rather than as options to docker run itself.
Example:
1 | |
In Kubernetes, these arguments should be specified using the args field in the container specification.
Configurations
Common Options
Flag | Default | Description |
|---|---|---|
--advertise-address value | (empty) | The IP address to expose for external access. If not set, the system will auto-detect a suitable local IP address. |
--config-file value | (empty) | Path to the YAML config file. |
-d value, --debug value | False | To enable debug mode, the short flag -d is not supported in Windows because this flag is reserved by PowerShell for CommonParameters. |
--data-dir value | (empty) | Directory to store data. Default is OS specific. |
--cache-dir value | (empty) | Directory to store cache (e.g., model files). Defaults to |
--huggingface-token value | (empty) | User Access Token to authenticate to the Hugging Face Hub. Can also be configured via the HF_TOKEN environment variable. |
--insecure-tls | False | Skip TLS verification on GPUStack's own HTTPS connections (worker to server, server to external-auth IdP). For trusted networks where the server certificate cannot be verified otherwise. |
--bin-dir value | (empty) | Directory to store additional binaries, e.g., versioned backend executables. |
--pipx-path value | (empty) | Path to the pipx executable, used to install versioned backends. |
--system-default-container-registry value | docker.io | Default container registry for GPUStack to pull system and inference images. Keep all GPUStack business images under the gpustack namespace; if a multi-level namespace is required, keep gpustack as the last level, e.g. awesome.com/amazing-group/amazing-subgroup/gpustack. Then set this flag (or the server/worker system_default_container_registry config key, or the GPUSTACK_SYSTEM_DEFAULT_CONTAINER_REGISTRY environment variable) to the parent path, e.g. awesome.com/amazing-group/amazing-subgroup.If the images cannot stay under the gpustack namespace (e.g. gpustack-ai), adjust --image-repo and --benchmark-image-repo accordingly. |
--image-repo value | gpustack/gpustack | Override the default image repository for the GPUStack container. Do not include the tag in the value; GPUStack appends the version tag automatically. If the image gpustack/gpustack:<tag> lives outside the gpustack namespace, e.g. awesome.com/amazing-group/amazing-subgroup/gpustack-ai/gpustack:<tag>, first point --system-default-container-registry=awesome.com/amazing-group/amazing-subgroup to the registry with the parent namespace, then set this flag (or the server/worker image_repo config key, or the GPUSTACK_IMAGE_REPO environment variable) to gpustack-ai/gpustack. |
--gateway-mode value | auto | Gateway running mode. Options: embedded, in-cluster, external, disabled, or auto (default). |
--gateway-kubeconfig value | (empty) | Path to the kubeconfig file for gateway. Only useful for external gateway-mode. |
--gateway-namespace value | higress-system | The namespace where the gateway component is deployed. |
--service-discovery-name value | (empty) | The name of the service discovery service in DNS. Only useful when deployed in Kubernetes with service discovery. |
--namespace value | (empty) | Kubernetes namespace for GPUStack to deploy gateway routing rules and model instances. |
Server Options
Flag | Default | Description |
|---|---|---|
--port value | 80 | Port to bind the server to. |
--tls-port value | 443 | Port to bind the TLS server to. |
--api-port value | 30080 | Port to bind the GPUStack API server to. |
--proxy-port value | 30079 | Port to bind the GPUStack proxy server to. |
--database-port value | 5432 | Port of the embedded PostgresSQL database. |
--metrics-port value | 10161 | Port to expose server metrics. |
--disable-metrics | False | Disable server metrics. |
--disable-worker | (empty) | (DEPRECATED) Disable the embedded worker for the GPUStack server. New installations will not have the embedded worker by default. Use '--enable-worker' to enable the embedded worker if needed. If neither flag is set, for backward compatibility, the embedded worker will be enabled by default for legacy installations prior to v2.0.1. |
--enable-worker | False | Enable the embedded worker for the GPUStack server. |
--bootstrap-password value | Auto-generated. | Initial password for the default admin user. |
--database-url value | Embedded PostgreSQL. | URL of the database. Supports PostgreSQL 13.0+, MySQL 8.0.36+, and compatible databases such as openGauss (postgresql:// scheme) and OceanBase (mysql:// scheme). Example: postgresql://username:password@host:port/dbname or mysql://username:password@host:port/dbname |
--redis-url value | None | URL of an external Redis for features that need shared, fast state (the LB plugin's shared-state backend). Format: redis://host[:port][/db]. Credentials are refused (they would be materialized in the gateway CR) and TLS (rediss://) is not supported. |
--ssl-keyfile value | (empty) | Path to the SSL key file. |
--ssl-certfile value | (empty) | Path to the SSL certificate file. |
--ssl-ca-certfile value | (empty) | Path to the PEM CA bundle workers use to verify the GPUStack server. Required when the server certificate is signed by a private CA. |
--force-auth-localhost | (unset) | (Deprecated, no-op) Localhost callers are always authenticated; retained for backwards compatibility and will be removed in a future release. |
--disable-update-check | False | Disable update check. |
--ota-server-url value | (empty) | URL of the OTA server the official content sources are read from — the index and the files sit directly under it, e.g. https://ota.example.com/gpustack. Defaults to the public OTA server; point it at a copy of your own when that one is unreachable from your network, or to serve an internal deployment from your own repository. It covers all three kinds of content at once, they stay Official and keep auto-updating, and Reset to Official Source in the UI returns to it. See OTA Content Updates. |
--disable-openapi-docs | False | Disable autogenerated OpenAPI documentation endpoints (Swagger UI at /docs, ReDoc at /redoc, and the raw spec at /openapi.json). |
--model-catalog-file value | (empty) | Path or URL to the model catalog file. |
--enable-cors | False | Enable Cross-Origin Resource Sharing (CORS) on the server. |
--allow-credentials | False | Allow cookies and credentials in cross-origin requests. |
--allow-origins value | ["*"] | Origins allowed for cross-origin requests. Specify the flag multiple times for multiple origins. Example: --allow-origins https://example.com --allow-origins https://api.example.com |
--allow-methods value | ["GET", "POST"] | HTTP methods allowed in cross-origin requests. Specify the flag multiple times for multiple methods. Example: --allow-methods GET --allow-methods POST |
--allow-headers value | ["Authorization", "Content-Type", "X-API-Key"] | HTTP request headers allowed in cross-origin requests. Specify the flag multiple times for multiple headers. Example: --allow-headers Authorization --allow-headers X-API-Key --allow-headers Content-Type |
--oidc-issuer value | (empty) | OpenID Connect issuer URL. |
--oidc-client-id value | (empty) | OpenID Connect client ID. |
--oidc-client-secret value | (empty) | OpenID Connect client secret. |
--oidc-redirect-uri value | (empty) | The redirect URI configured in your OIDC application. This must be set to <server-url>/auth/oidc/callback. |
--external-auth-post-logout-redirect-key value | (empty) | Generic parameter name used for post-logout redirection across different IdPs. Applied to both OIDC and SAML. |
--oidc-skip-userinfo | False | Skip requesting the OIDC userinfo_endpoint and instead attempt to parse it directly from the header. |
--oidc-use-userinfo | (empty) | [Deprecated] Use the UserInfo endpoint to fetch user details after authentication. |
--saml-idp-server-url value | (empty) | SAML Identity Provider server URL. |
--saml-idp-entity-id value | (empty) | SAML Identity Provider entity ID. |
--saml-idp-x509-cert value | (empty) | SAML Identity Provider X.509 certificate. |
--saml-sp-entity-id value | (empty) | SAML Service Provider entity ID. |
--saml-sp-acs-url value | (empty) | SAML Service Provider Assertion Consumer Service URL. This must be set to <server-url>/auth/saml/callback. |
--saml-sp-x509-cert value | (empty) | SAML Service Provider X.509 certificate. |
--saml-sp-private-key value | (empty) | SAML Service Provider private key. |
--saml-idp-logout-url value | (empty) | SAML Identity Provider Single Logout endpoint URL. |
--saml-sp-slo-url value | (empty) | SAML Service Provider Single Logout Service callback URL (e.g., <server-url>/auth/saml/logout/callback). |
--saml-security value | (empty) | SAML security settings in JSON format. |
--cas-server-url value | (empty) | CAS (Central Authentication Service) server base URL, e.g., https://cas.example.com/cas. Setting this enables CAS login. |
--cas-callback-url value | (empty) | CAS callback URL registered with the CAS server. Defaults to <server-url>/auth/cas/callback when unset. |
--cas-validate-endpoint value | /p3/serviceValidate | CAS ticket validation endpoint, relative to --cas-server-url. Use /serviceValidate for pre-CAS-3.0 servers (no attribute support). |
--cas-username-attribute value | (empty) | CAS XML attribute name to use as the GPUStack username. Defaults to the CAS cas:user element when unset. |
--cas-full-name-attribute value | (empty) | CAS XML attribute name to use as the user's full name. |
--cas-avatar-attribute value | (empty) | CAS XML attribute name to use as the user's avatar URL. |
--external-auth-provider-name value | (empty) | Name of the identity provider shown on the login page's SSO button, e.g., Okta. Defaults to the protocol name (OIDC/SAML/CAS) when unset. |
--external-auth-name value | (empty) | Mapping of external authentication user information to username, e.g., preferred_username. |
--external-auth-full-name value | (empty) | Mapping of external authentication user information to user's full name. Multiple elements can be combined, e.g., name or firstName+lastName. |
--external-auth-avatar-url value | (empty) | Mapping of external authentication user information to user's avatar URL. |
--external-auth-default-inactive | False | True if new users should be deactivated by default. |
--external-auth-insecure-skip-tls-verify | False | Skip TLS verification for the external-auth IdP handshake (OIDC/CAS). For testing against self-signed IdPs only; never use in production. |
--server-external-url value | (empty) | The external server URL for worker registration. This option is required when provisioning workers via cloud providers, ensuring that workers can connect to the server correctly. |
--trusted-hosts value | (empty) | Allowlist for the X-Forwarded-Host header behind a reverse proxy. When unset, derived from --server-external-url. If both are unset, it defaults to * to trust any host (not recommended unless the server is only reachable via a trusted proxy). |
--saml-sp-attribute-prefix value | (empty) | SAML Service Provider attribute prefix, used for fetching attributes specified by --external-auth-*. |
--gateway-concurrency value | 16 | Number of concurrent connections for the embedded gateway. |
--disable-builtin-observability | False | Disable embedded Grafana and Prometheus services. |
--builtin-prometheus-port value | 19090 | Port for the embedded Prometheus service. |
--builtin-grafana-port value | 13000 | Port for the embedded Grafana service. |
--prometheus-url value | (empty) | Base URL of an external Prometheus to query. When unset, the embedded one is used if it is enabled. Set this to keep metric-backed features (model and PD dashboards, bandwidth self-check) working on a deployment that delegates observability to its own stack. |
--grafana-url value | (empty) | Grafana base URL for dashboard redirects and proxying. Must be browser-reachable (not a container-only hostname). If set, embedded Grafana and Prometheus will be disabled. Only required for external Grafana. |
--grafana-worker-dashboard-uid value | (empty) | Grafana dashboard UID for worker dashboard redirects. |
--grafana-model-dashboard-uid value | (empty) | Grafana dashboard UID for model dashboard redirects. |
Worker Options
Flag | Default | Description |
|---|---|---|
-t value, --token value | Auto-generated. | Shared secret used to register worker. |
-s value, --server-url value | (empty) | Server to connect to. |
--worker-name value | (empty) | Name of the worker node. Use the hostname by default. |
--worker-ip value | (empty) | IP address of the worker node. Auto-detected by default. |
--disable-worker-metrics | False | Disable metrics. |
--worker-metrics-port value | 10151 | Port to expose metrics. |
--worker-port value | 10150 | Port to bind the worker to. Use a consistent value for all workers. |
--service-port-range value | 40000-40063 | Port range for inference services, specified as a string in the form 'N1-N2'. Both ends of the range are inclusive. |
--ray-port-range value | 41000-41999 | Port range for Ray services(vLLM distributed deployment using), specified as a string in the form 'N1-N2'. Both ends of the range are inclusive. |
--log-dir value | (empty) | Directory to store logs. |
--system-reserved value | (empty) | The system reserves resources for the worker during scheduling, measured in GiB. By default, no resources are reserved, Example: '{\"ram\": 2, \"vram\": 1}'. |
--enable-hf-transfer | False | [Deprecated] hf_transfer support was removed in huggingface_hub v1.0; this flag is a no-op. hf_xet is now the default downloader. |
--enable-hf-xet | False | [Deprecated] Enable downloading model files using Hugging Face Xet. |
--worker-ifname value | (empty) | Network interface name of the worker node. Auto-detected by default. |
--kv-transfer-ifname value | (empty) | Network interface carrying KV-cache traffic for disaggregated (prefill/decode) deployments. Auto-detected when the host has exactly one routable interface; required when it has several, since picking the wrong one makes the engine advertise an address its peer cannot reach. |
--proxy-mode value | (empty) | Proxy mode for accessing model instances: direct, worker, or tunnel (worker dials out to the server; for workers behind firewall/NAT). Default direct embedded, worker standalone. |
--benchmark-image-repo value | gpustack/benchmark-runner | Override the default benchmark image repo for the GPUStack benchmark container. Unlike --image-repo, this value is used as-is, so include the tag.If the image gpustack/benchmark-runner:<tag> lives outside the gpustack namespace, e.g. awesome.com/amazing-group/amazing-subgroup/gpustack-ai/benchmark-runner:<tag>, first point --system-default-container-registry=awesome.com/amazing-group/amazing-subgroup to the registry with the parent namespace, then set this flag (or the worker benchmark_image_repo config key, or the GPUSTACK_BENCHMARK_IMAGE_REPO environment variable) to gpustack-ai/benchmark-runner:<tag>. |
--benchmark-dir value | <data-dir>/benchmarks | Directory to store benchmark results. |
--benchmark-max-duration-seconds value | (empty) | Max duration for a benchmark before timeout. Disabled when empty. |
Available Environment Variables
Most command line parameters can also be set via environment variables with the GPUSTACK_ prefix and in uppercase format (e.g., --data-dir can be set via GPUSTACK_DATA_DIR).
For environment variables beyond the command-line parameters mentioned above, please refer to the environment variables documentation.
Config File
You can configure start options using a YAML-format config file when starting GPUStack server or worker. Here is a complete example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |