Hikvision ANPR Alarm Server setup

Configure a compatible Hikvision ANPR camera to send number-plate events to a self-hosted HTTP or HTTPS endpoint.

On newer Hikvision firmware, the event destination is commonly labelled Alarm Server. Hikvision's own network-camera documentation places this under Configuration → Network → Advanced Settings → Alarm Server and describes support for HTTP, HTTPS or ISUP depending on the device.

The settings you normally need

For a Ruby ANPR installation, the camera needs a destination hostname, a URL path and a port. HTTPS is the recommended configuration on supported firmware.

Destination / Hostname: anpr.yourdomain.com Protocol: HTTPS Port: 443 URL: /ingest.php?key=YOUR_CAMERA_API_KEY ANPR Protocol Type: HIKVISION ANR: Enable where available

Use the public hostname rather than the web server's raw IP address when HTTPS is enabled. That ensures the request reaches the correct virtual host and matches the SSL certificate presented by the server.

Why HTTPS port 443 is the preferred starting point

Hikvision documentation for newer firmware recommends HTTPS because it encrypts the event transmission. It also works cleanly with a normal public web-server configuration, including deployments behind Cloudflare, provided the camera can reach the hostname and the endpoint is accessible.

Use the Test button before driving vehicles through the camera

Supported Hikvision firmware includes a Test function for the configured destination. With Ruby ANPR, a successful Test can create a synthetic event that looks different from a real number-plate read.

Expected Ruby ANPR test signature: registration 1111111, confidence 0.0% and direction UNKNOWN. This is a connectivity test, not a failed OCR read.

What a successful Test proves

If the synthetic event appears in Ruby ANPR, the important route is working:

Hikvision camera → DNS / HTTPS → Ruby ANPR ingest.php → image storage → database → dashboard

The next step is a controlled real-vehicle pass. A Test event proves transport and ingestion; it does not prove that the camera is physically aimed, zoomed or configured well enough to read real registrations.

Common reasons the Test button fails

  • Wrong hostname or DNS: confirm the camera can resolve the public hostname.
  • Wrong port: use 443 for the recommended HTTPS configuration unless your deployment intentionally uses another port.
  • Wrong URL path: the Ruby ANPR camera endpoint must include the correct per-camera API key.
  • SSL or proxy issue: confirm the public certificate and reverse-proxy path are valid.
  • Using an IP with HTTPS: this can cause certificate or virtual-host problems.
  • Camera model / firmware difference: some generations call the feature HTTP Listening rather than Alarm Server.

Alarm Server versus HTTP Listening

Do not assume the feature is missing just because the menu is named differently. Older Hikvision documentation uses HTTP Listening, while newer firmware often uses Alarm Server. From Ruby ANPR's point of view, the key requirement is the same: the camera must be able to push its ANPR event data to a configurable HTTP or HTTPS destination.

After the first real vehicle capture

Check that the registration, confidence, camera name, images and direction make sense. If you only see one direction, move next to the Forward / Reverse guide. If the camera is online but Ruby ANPR later shows it as offline during quiet periods, configure the GPS / Positioning Upload heartbeat where your model supports it.