For the complete documentation index, see llms.txt. This page is also available as Markdown.

Self-Hosted Deployment

Run Roboflow models and Workflows on your own hardware with Inference, the open source computer vision deployment framework.

Inference is an open source computer vision deployment hub. It serves models and Workflows, manages video streams, and optimizes inference for CPUs and GPUs. Self-host it when you need local processing, control over latency and resources, or offline deployment. The Apache 2.0 licensed core also powers Roboflow's hosted APIs.

Self-hosting means you manage the infrastructure. If you would rather Roboflow run the servers, see Dedicated Deployments or the Serverless Cloud API, and the full comparison of options.

Pick a path

There are three ways to run models on your own hardware. Most projects use the Inference Server.

Use the server when more than one client or language needs predictions, when you want models isolated from your application dependencies, or when you deploy to edge devices.

Roboflow Inference architecture diagram
Where Inference sits between your application, your models, and the Roboflow platform

Run model locally

For most projects, run Inference Server in Docker and send requests with inference-sdk. The SDK is a Python HTTP client that connects your application to an Inference Server. Use Inference Library when you need to load and run models directly inside your Python process. Both paths accept the same model_id values, so you can switch between them later.

Model IDs

The model_id parameter can be:

Fine-tuned models and Universe models require an API key.

Install

Start the server with the Inference CLI. It detects your hardware and pulls the right Docker image with secure defaults:

Then install the HTTP client:

For hardware requirements, per-device guides, and manual docker run commands, see Install Inference Server. The same client also works against the Serverless Cloud API and Dedicated Deployments: only api_url changes.

Run inference

The api_key_transport="header" setting sends the key only as an Authorization: Bearer header, keeping it out of URLs and logs. It requires an inference server on release 1.5.0 or newer; use api_key_transport="both" while you still call older servers. See API key transport.

Swap api_url for https://serverless.roboflow.com to use the Serverless Cloud API instead, with no other code changes. See the Inference SDK reference for details.

Visualize results

Install Supervision:

Install

Install the inference package into your own Python environment:

If you have an NVIDIA GPU, install inference-gpu instead, matching the index URL to the CUDA version installed in your OS:

See Inference Library for backend extras and GPU setup details.

Run inference

get_model() downloads and caches the model weights on first use, then runs inference locally. See the Inference Python Package reference for details.

Visualize results

Install Supervision:

People walking, annotated with detections

You can run a Workflow the same way, on the server or in your own process: see Deploy a Workflow.

TensorRT-optimized model packages for private models are only available on Enterprise plans when running Inference outside the Roboflow platform. Public models include TensorRT packages on all plans.

Last updated

Was this helpful?