CarNET Server

CarNET Server: Installation and Operation Guide

CarNET Server 1 · November 2026

CarNET Server is the CarNET car recognition API on your own server. It recognises the make, model and generation of the cars in a photo, and their colour and angle. It answers the same requests as our Cloud API. It runs without internet access, and your photos never leave your network.

What You Receive

In the download folder we send you a link to:

File What it is
carnet-server-1-cpu.tar.gz (110 MB) CarNET Server for CPUs, as a Docker image.
carnet-server-1-gpu.tar.gz (2.0 GB) CarNET Server for NVIDIA GPUs, as a Docker image, if you ordered it.
carnet-update-<number>-<licence ID> (170 MB) Your first update file: the recognition networks and data, encrypted for your licence.
SHA256SUMS The files' checksums.
CarNET-Server-Guide.html This guide.

Separately, by email: licence.json, your licence file.

The image holds no recognition networks. They come in update files, which only a server with your licence can open. Keep the licence file private: anyone who has it can open your update files.

We delete the download folder after you have downloaded the files, so keep your own copy.

Requirements

CPU image GPU image
Server Linux on a 64-bit Intel or AMD processor (x86-64), physical or virtual The same, plus an NVIDIA GPU of the GTX 10 series (2016) or newer
Software Docker 20.10 or newer Docker 20.10 or newer, NVIDIA driver 570 or newer, and the NVIDIA Container Toolkit
Memory 2 GB per copy of the server; 3.5 GB if many large PNG photos can arrive at once (section 8) The same
GPU memory – 5 GB per copy; 2.5 GB with CARNET_REQUESTS_AT_ONCE=4 (section 11)
Disk 0.3 GB for the image, and 0.2 GB for each update file you keep 3.4 GB for the image, and 0.2 GB for each update file you keep
Network None: the server needs no internet access and makes no connections of its own The same

We test the CPU image on an Intel CPU with AVX2 (Core i5-8400) and the GPU image on an NVIDIA GTX 1080 Ti with driver 570, both with Docker 20.10 and 28.0. On a GPU, and on CPUs with AVX-512, a probability or a box corner in an answer can differ from the Cloud API's in the fourth decimal place on rare photos (on our GPU, 2 answers in 100).

CarNET Server runs on Linux. For Windows servers, please contact us.

Check and Load the Image

On the machine where you downloaded the files, check them:

sha256sum -c SHA256SUMS

Every line must end with OK. Then move the files into your network your usual way. On the server:

docker load -i carnet-server-1-cpu.tar.gz

It prints Loaded image: carnet-server:1-cpu.

If you keep images in your own registry, put it there:

docker tag carnet-server:1-cpu registry.example.internal/carnet-server:1-cpu
docker push registry.example.internal/carnet-server:1-cpu

Start the Server

Put the licence and the update file in a folder on the server, for example /opt/carnet:

sudo mkdir -p /opt/carnet/updates
sudo cp licence.json /opt/carnet/licence.json
sudo cp carnet-update-* /opt/carnet/updates/

Start the server:

docker run -d --name carnet-server --restart unless-stopped \
  -p 50052:50052 \
  -v /opt/carnet/licence.json:/carnet/licence.json:ro \
  -v /opt/carnet/updates:/carnet/updates:ro \
  --read-only \
  carnet-server:1-cpu

It is ready in 15 to 25 seconds. --read-only is recommended: the server writes nothing to disk, so it runs with a read-only file system. Its first lines show what it found:

docker logs carnet-server
2026-11-10 10:52:26.469 UTC INFO CarNET Server 1 (build a541704) starting
2026-11-10 10:52:26.469 UTC INFO licence ACME-01 for ACME Ltd: 20 requests per second per copy, 2 copies
2026-11-10 10:52:26.469 UTC INFO update 2266 of 2026-11-10 (carnet-update-2266-ACME-01)
2026-11-10 10:52:26.470 UTC INFO log level info; up to 10 requests at once; networks on the CPU, 4 CPU threads each (the CPUs it may use: 4); requests up to 13 MB; photos never saved
2026-11-10 10:52:26.470 UTC INFO Starting Service...
2026-11-10 10:52:39.549 UTC INFO CarNetAI Service ready.
2026-11-10 10:52:39.833 UTC INFO start-up check passed in 0.3 s: the test photo is Ford Mustang VI facelift (934)
2026-11-10 10:52:39.834 UTC INFO Starting Flask thread...

Then check that it answers:

curl http://localhost:50052/health

docker ps shows the server as healthy within about 30 seconds: the image checks its own /health every 30 seconds. If the server stops instead, docker logs carnet-server says why (section 12).

Hardened start (optional)

To run the server as an unprivileged user, without Linux capabilities, make the licence readable by that user only, then add the three options below. We test this setup.

sudo chown 65534:65534 /opt/carnet/licence.json
sudo chmod 400 /opt/carnet/licence.json

docker run -d --name carnet-server --restart unless-stopped \
  -p 50052:50052 \
  -v /opt/carnet/licence.json:/carnet/licence.json:ro \
  -v /opt/carnet/updates:/carnet/updates:ro \
  --read-only --user 65534:65534 --cap-drop ALL --security-opt no-new-privileges \
  carnet-server:1-cpu

The update files must be readable by that user too. With the usual permissions (644) they are. They are encrypted, so they need no further protection.

Send Photos

Requests and answers are the same as the Cloud API's. Code written for one works with the other: only the address changes, and no API key is needed.

Cloud API CarNET Server
Address https://api.carnet.ai/v2/mmg/detect http://<your server>:50052/detect
API key The api-key header None (a key sent anyway is ignored)

For example:

curl -s -H "Content-Type: application/octet-stream" --data-binary @car.jpg \
  "http://localhost:50052/detect?features=mm,mmg,color,angle&box_select=all"

The options, the answer's fields and the error codes are described in How recognition works and in the API reference. In each answer, meta.classifier is the number of the update in use.

Our code samples work with both: set the sample's API address to your server's.

Photos can be JPEG, PNG, WEBP, GIF, BMP or TIFF, up to 12 MB. Larger requests are refused.

The server speaks plain HTTP. For HTTPS, put your own reverse proxy (such as nginx, HAProxy or Traefik) in front of it, and allow only your own systems to reach port 50052.

The Rate Limit

Your licence sets how many requests per second each copy of the server answers; /health shows the number. It counts like the Cloud API: a one-second window starts with the first request, and requests past the limit in that window get HTTP status 429 with this answer:

{"message":"Rate limit exceeded ! You reach the limit of 20 requests per 1 seconds","http_status_code":429}

Every answer to /detect has these headers:

Header Meaning
X-Rate-Limit-Limit Your limit per second.
X-Rate-Limit-Remaining Requests left in the current window.
X-Rate-Limit-Reset When the window ends, in milliseconds since 1 January 1970 (UTC).

After a 429, send the request again once the window has ended. /health doesn't count towards the limit. Code that handles the Cloud API's limit works unchanged.

Updates

Updates bring new car models and better recognition. Each comes as a file made for your licence, like the first one, with a higher number. To install one:

  1. Check its checksum.
  2. Copy it into /opt/carnet/updates, next to the files already there.
  3. Restart the server: docker restart carnet-server.

The server uses the newest file it can use. Its start lines and /health show the update in use.

To go back, delete the newer file and restart. You can keep earlier files in the folder: they cost only disk space.

Now and then we may send an update again with corrections, under the same number. The server uses the one made later (/health shows its date), so you can put it next to the first.

If a file can't be used, the server says why at start and in /health's warnings, and uses the newest file before it. That happens to a file made for another licence, a damaged file or one copied only in part, and a file that needs a newer CarNET Server. If no file can be used, the server stops and lists the reasons. Two different files with the same number and date are both refused: keep the one we sent last.

A restart takes 15 to 25 seconds, during which that copy doesn't answer. With two or more copies behind a load balancer, restart them one at a time.

Settings and Speed

Most installations need no settings. To change one, add -e NAME=value to docker run:

Setting Default What it does
CARNET_LOG_LEVEL info What the server logs: error, info, requests or debug (section 9).
CARNET_THREADS The container's CPU limit, or else all the CPUs it may use How many CPU threads each recognition network uses.
CARNET_REQUESTS_AT_ONCE 10 How many requests the server works on at the same time; others wait their turn.

To give a copy a share of a machine, start it with a CPU limit, such as --cpus 4: the threads follow the limit. A value the server can't use stops it at start with a message.

Memory grows with the photos being worked on at once. In our tests, 10 phone photos (12 megapixels) at once took a copy to 1.3 GB (1.6 GB with the GPU image), and 10 large PNG photos (11 MB each) to about 3 GB. On a copy with one or two CPUs, CARNET_REQUESTS_AT_ONCE=3 keeps that to about 1 GB and 1.5 GB, and isn't slower.

Indicative speed from our own tests, for one car per photo, typical photo sizes, make, model and generation:

Hardware Time for one photo Photos per second, fully loaded
1 CPU core (Intel Core i5-8400, 2018) 0.14 s 7
6-core CPU (Intel Core i5-8400, 2018) 0.07 s 24
The same, with an NVIDIA GTX 1080 Ti GPU (2017) 0.05 s 50

Time for one photo: one photo at a time, with the whole machine. Fully loaded: one copy given six or more photos at once; on this CPU, six copies of one core each were no faster than one copy. Asking for colour and angle too adds 10–20%. Very large photos take longer, and newer hardware is faster.

Your licence states how many copies of the server you may run. Each running container is one copy, with its own rate limit. Keep the requests a copy receives within what its hardware answers per second (the table above): past that, requests wait their turn and the copy's memory grows.

Logs, Health and What the Server Keeps

Photos are never saved. The server writes nothing to disk and needs no storage of its own.

Logs go to the container's output only (docker logs), with times in UTC. CARNET_LOG_LEVEL sets how much:

Level What it logs
error Errors only.
info (default) Errors and warnings, the start lines (version, licence, update, settings), and one summary line for each minute that had requests.
requests As info, plus one line per request: the caller's address, the request, its size, the time taken and the result (the number of cars, no car, an error, or the limit reached).
debug As requests, plus each answer in full. Answers include the photo's MD5 checksum.
2026-11-10 11:02:14.311 UTC REQUEST 10.0.0.15 POST /detect 183213 B 0.127 s cars 1
2026-11-10 11:02:14.902 UTC REQUEST 10.0.0.15 POST /detect 96120 B 0.098 s cars 2
2026-11-10 11:02:15.020 UTC REQUEST 10.0.0.16 POST /detect 154870 B 0.001 s limit reached
2026-11-10 11:03:00.000 UTC INFO last minute: 3 requests: 2 with cars, 0 no car, 0 bad requests, 0 errors, 1 refused by the rate limit; median 0.113 s

The server never logs request headers. Behind a proxy, the address logged is the proxy's. Docker keeps the output as you configure it: set log rotation before you use requests or debug, for example --log-opt max-size=50m --log-opt max-file=5.

The server makes no connections of its own and sends nothing to us or to anyone else. You can block all outgoing traffic from it.

/health (GET http://<your server>:50052/health) answers without a photo:

{
 "status": "up",
 "server_version": 1,
 "build": "a541704",
 "licence": {
  "client": "ACME Ltd",
  "licence_id": "ACME-01",
  "rate_limit_per_second": 20,
  "copies": 2
 },
 "update": {
  "number": 2266,
  "date": "2026-11-10",
  "file": "carnet-update-2266-ACME-01"
 },
 "warnings": []
}

Kubernetes

The same image runs on Kubernetes. Load it into your registry (section 3), then:

1. The licence, as a Secret:

kubectl create secret generic carnet-licence --from-file=licence.json=/opt/carnet/licence.json

2. The update file. Update files are too large for a Secret or a ConfigMap. The simplest way is a small image of your own: ours, with the update file added. It builds without internet access.

mkdir carnet-u2266 && cd carnet-u2266
cp /opt/carnet/updates/carnet-update-2266-* .
printf 'FROM carnet-server:1-cpu\nCOPY carnet-update-* /carnet/updates/\n' > Dockerfile
docker build -t registry.example.internal/carnet-server:1-cpu-u2266 .
docker push registry.example.internal/carnet-server:1-cpu-u2266

A volume your cluster can share (ReadOnlyMany) mounted at /carnet/updates works too.

3. The server and its Service: save this as carnet-server.yaml, change the image's address, then kubectl apply -f carnet-server.yaml.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: carnet-server
spec:
  replicas: 1
  selector:
    matchLabels:
      app: carnet-server
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  template:
    metadata:
      labels:
        app: carnet-server
    spec:
      securityContext:
        runAsUser: 65534
        runAsGroup: 65534
        runAsNonRoot: true
        fsGroup: 65534
      containers:
        - name: carnet-server
          image: registry.example.internal/carnet-server:1-cpu-u2266
          ports:
            - containerPort: 50052
          resources:
            requests:
              cpu: "2"
              memory: 2Gi
            limits:
              cpu: "2"
              memory: 3584Mi
          securityContext:
            readOnlyRootFilesystem: true
            allowPrivilegeEscalation: false
            capabilities:
              drop: ["ALL"]
          volumeMounts:
            - name: licence
              mountPath: /carnet/licence.json
              subPath: licence.json
              readOnly: true
          startupProbe:
            httpGet:
              path: /health
              port: 50052
            periodSeconds: 5
            failureThreshold: 36
          readinessProbe:
            httpGet:
              path: /health
              port: 50052
            periodSeconds: 10
          livenessProbe:
            httpGet:
              path: /health
              port: 50052
            periodSeconds: 30
            timeoutSeconds: 10
      volumes:
        - name: licence
          secret:
            secretName: carnet-licence
            defaultMode: 0440
---
apiVersion: v1
kind: Service
metadata:
  name: carnet-server
spec:
  selector:
    app: carnet-server
  ports:
    - port: 50052
      targetPort: 50052

The CPU limit sets the server's threads, as --cpus does with Docker. The probes ask /health; Kubernetes doesn't use the image's own health check. Each running pod is one copy of the server, with its own rate limit.

A new update: build an image with the new file as in step 2 (for example ...:1-cpu-u2270), push it, and switch to it:

kubectl set image deployment/carnet-server carnet-server=registry.example.internal/carnet-server:1-cpu-u2270

The new pod starts before the old one stops, so the server keeps answering. To go back: kubectl rollout undo deployment/carnet-server.

GPU: build from carnet-server:1-gpu instead, and add nvidia.com/gpu: 1 to the container's limits. The cluster needs NVIDIA's device plugin or GPU Operator. Run one pod per GPU.

The GPU Image

Before you start it, install the NVIDIA driver (570 or newer) and the NVIDIA Container Toolkit on the server, and set Docker up for it as NVIDIA's instructions describe. Then load the image and start it as the CPU image, with the GPU added:

docker load -i carnet-server-1-gpu.tar.gz

docker run -d --name carnet-server --restart unless-stopped \
  --gpus device=0 \
  -p 50052:50052 \
  -v /opt/carnet/licence.json:/carnet/licence.json:ro \
  -v /opt/carnet/updates:/carnet/updates:ro \
  --read-only \
  carnet-server:1-gpu
  • One copy per GPU. For a second GPU, start a second copy with --gpus device=1 and another port, such as -p 50053:50052.
  • The same licence, update files and settings as the CPU image. Its start lines say networks on the GPU. It answers about 10–15 seconds after it starts. Among its first lines is a warning from onnxruntime (the library that runs the networks) about "Memcpy nodes": it is expected.
  • Memory on the GPU: about 1.2 GB when requests come one at a time, and up to 5 GB with 10 at once (the default of CARNET_REQUESTS_AT_ONCE). On a GPU with less than 6 GB of memory, set CARNET_REQUESTS_AT_ONCE=4 (2.5 GB; on our GPU 44 photos per second instead of 50) or 2 (1.5 GB).
  • It still needs CPU cores: photos are decoded and resized on the CPU. With a GTX 1080 Ti, a copy answered 17 photos per second on 1 CPU core, 30 on 2, 45 on 4 and 50 on 6.
  • Which GPUs: NVIDIA GPUs from the GTX 10 series (2016) up to the H100. For newer GPUs, such as the RTX 50 series, please ask us first: we haven't tested them yet.
  • If it finds no GPU it can use, it stops and says so. Check that nvidia-smi works on the server, and that the container was started with --gpus.
  • If docker run itself fails with could not select device driver "" with capabilities: [[gpu]], Docker has no NVIDIA Container Toolkit yet: install it and set Docker up for it, as NVIDIA's instructions describe.

If the Server Stops at Start

The server stops with exit code 2 and one line starting with CarNET Server:. See it with docker logs carnet-server. With --restart unless-stopped, Docker keeps starting it again, with growing pauses, until the cause is fixed: stop it with docker stop carnet-server while you fix it, then docker start carnet-server.

The line says What to do
no licence at /carnet/licence.json Mount your licence file there (-v /opt/carnet/licence.json:/carnet/licence.json:ro).
... is not a CarNET licence file (it cannot be read) Check that the file is the licence.json we sent, and complete.
... cannot be read by the user the server runs as Make the licence file and the updates folder readable by that user (Hardened start). An update file it can't read is skipped, with this reason in the warnings.
the licence ... was changed or is not from CarNET The file differs from the one we sent. Copy it again from our email.
no updates folder at /carnet/updates Mount the folder with your update file there (-v /opt/carnet/updates:/carnet/updates:ro).
no usable update file in /carnet/updates The lines below it give each file's reason. Copy the file again, check its checksum, or ask us for a new one.
... failed its start-up check Remove that update file to start with an earlier one, and tell us.
CARNET_... : expected ... A setting has a value the server can't use. Fix or remove it.
this is the GPU image, and it found no GPU it can use See section 11.

Support

Contact us with the form below. Please include the server's first lines from docker logs and the output of /health. There's no need to send photos unless we ask for them.

Contact Us

OneStar OÜ

CarNET and Car Hunters are made by OneStar OÜ, Reg. No 14870489.

Narva mnt 7, 10117 Tallinn, Estonia

Wrong e-mail format
Name is too short