Skip to main content
Connecting whole Windows, macOS or Linux machines? The downloadable agent installs as a system service with no code. Use @zerogpu/worker when you want ZeroGPU inside your own Node.js service, container platform or orchestration.

Overview

@zerogpu/worker is the ZeroGPU edge worker for servers. Each running worker joins the network as one device: it registers with your SDK key, downloads its assigned models, and serves inference tasks. Its connection to ZeroGPU is outbound only. It ships two ways:

Requirements

Install and run

Store the key as a secret and mount it, then run the image with a volume for models and one for the device’s identity:
On an NVIDIA host, use zerogpu/worker:cuda and add --gpus all.
Never bake the SDK key into an image or commit it. Pass it at runtime: ZG_OPERATOR_KEY_FILE with a secret mount is preferred over ZG_OPERATOR_KEY.

Configuration

The inference a worker serves is attributed to the app your SDK key belongs to.

Check a worker

The worker serves a health endpoint on its local port (default 8080):
ready turns true once a model is loaded and warmed up. network.completedTasks counts tasks ZeroGPU sent to this worker. Keep the local port inside your own network; never expose it to the internet.

Stop

Send SIGTERM (docker stop does this). The worker leaves the network, unloads its models, and exits within about 5 seconds. Once workers are online, verify they’re connected and track earnings.

Troubleshooting