> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/deployment/self-hosted/enterprise/license-server.md).

# License Server

You can use the Roboflow License server to proxy the necessary routes for Roboflow Deployment servers into your company's DMZ

{% hint style="warning" %}
The License Server is deprecated. New deployments should use [Secure Gateway](https://docs.roboflow.com/deployment/self-hosted/enterprise/secure-gateway.md), its successor, which adds local caching of model weights and container images.
{% endhint %}

<figure><img src="https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-9e91b0b1bd864d523e13bbabd615708b95712059%2Fdiagram.png?alt=media" alt=""><figcaption><p>Use the license server as a proxy for the Roboflow API.</p></figcaption></figure>

## Prerequisites

* Linux server running Ubuntu 20.04+ or Debian 11+
* Internet access to api.roboflow\.com and repo.roboflow\.com
* Static IP address or hostname
* Port 80 available (or custom port)
* Docker Engine 20.10+
* 200GB+ storage
* 4GB+ memory

## Using the License Server

If you wish to firewall the Roboflow Inference Server from the Internet, you will need to use the Roboflow License Server which acts as a proxy for the Roboflow API and your models' weights.

On a machine with access to `https://api.roboflow.com` and `https://repo.roboflow.com` (and port `80` open to the Inference Server running in your private network), pull the License Server Docker container:

```
docker pull repo.roboflow.com/roboflow/license-server
```

And run it:

```
docker run -d --name license-server -p 80:80 --restart unless-stopped \
    repo.roboflow.com/roboflow/license-server:latest
```

Configure your Inference Server to use this License Server by passing its address in the `LICENSE_SERVER` environment variable.

{% hint style="warning" %}
Inference 1.6.1 and newer connect to the `LICENSE_SERVER` address over HTTPS. A bare address such as `10.0.1.1` means `https://10.0.1.1`, and plain HTTP is accepted only for a loopback address such as `http://127.0.0.1:8080`. The License Server listens on plain HTTP, so current Inference images cannot reach it directly. Use [Secure Gateway](https://docs.roboflow.com/deployment/self-hosted/enterprise/secure-gateway.md) with TLS instead, or put a TLS proxy that the Inference Server trusts in front of the License Server.
{% endhint %}

```
sudo docker run -d -p 127.0.0.1:9001:9001 \
    --env LICENSE_SERVER=https://license.example.com \
    roboflow/roboflow-inference-server-cpu:latest
```

Inference also accepts `SECURE_GATEWAY`, which takes precedence over `LICENSE_SERVER`. Prefer `SECURE_GATEWAY` in new configurations.

## Configuring via Deployment Manager

If you manage your devices through [Deployment Manager](https://docs.roboflow.com/deployment/self-hosted/enterprise/deployment-manager.md), open the device's "Configuration" tab and set "License Server Address" in the inference service settings. Enter an IP address or hostname only, without a protocol, port, or path. The device's Inference Server then connects to that host over HTTPS on port 443.

When you enter an address, `API_BASE_URL` is set to `https://api.roboflow.com`. This gives the proxy an upstream and prevents a recursive proxy loop, which happens when both `LICENSE_SERVER` and `API_BASE_URL` point to the same on-prem address.

Clearing the field removes `LICENSE_SERVER` but leaves `API_BASE_URL` in place, so existing configurations are not disrupted.
