FacePlugin
Get in Touch
Linux

Face Liveness Detection SDK for Linux & Docker

Run passive face liveness detection in a single Docker container on your own Linux server, exposed as a local REST API. No images or liveness results ever leave your infrastructure.

CPU-only, no GPU requiredREST API via DockerNo per-call fees
Man completing a face liveness check on the Linux SDK demo
Live person
Liveness ✓
Requirements

What You Need to Run It on Linux

These are the exact minimum and recommended requirements published in the FaceLivenessDetection-Docker repository — check the repo directly for the latest version, since SDK requirements can change between releases.

Host OSLinux with Docker Engine (Ubuntu 22.04 / 24.04 recommended). Docker Desktop on macOS or Windows is not supported – use a Linux VM there
Without DockerLinux x86_64, glibc 2.38+, Python 3.10+ (Ubuntu 24.04 recommended; Debian Bookworm is too old for a native run)
CPU / RAM / Disk (min)2 cores / 4 GB / 4 GB
CPU / RAM / Disk (recommended)4 cores / 8 GB / 8 GB
Architecturelinux/amd64, CPU-only (no GPU build)
Quick Start

Install and Activate

Install the SDK, then activate it with a license key before calling any liveness function – every platform follows this same activate-then-initialize pattern.

  • Pull the image (faceplugin/face-liveness:latest) and run it on port 8093 with a 2 GB shared-memory allowance, mounting /etc/machine-id. For a native run, download runtime.zip from the Releases page into lib/cpu/.
  • Check GET /api/health to confirm the container is up — no license is needed to start it.
  • Get your machine code, send it to FacePlugin, then activate with POST /api/activate and your license key.
bash
# Health check
curl -s http://127.0.0.1:8093/api/health

# Activate with your license key
curl -s -X POST http://127.0.0.1:8093/api/activate \
  -H "Content-Type: text/plain" \
  --data-binary @license.txt

# Run a liveness check
curl -s -X POST http://127.0.0.1:8093/api/liveness \
  -H "Content-Type: application/json" \
  -d '{"image": "<base64-jpeg>"}' 
Platform notes

Server Deployment Notes

Operational details from the FaceLivenessDetection-Docker README, including the published presentation-attack results.

Ports and demo

The API listens on port 8093 and the Gradio demo on 9093 (python3 demo.py). Check GET /api/health first; no license is needed to start.

Passive only

The server products run passive liveness only. If you need challenge-response (active) liveness, use a mobile SDK such as Android or iOS.

Endpoint aliases and CORS

POST /api/check_liveness is an alias of /api/liveness. Routes have no version segment, and every /api/* path answers OPTIONS for browser preflight. GET /api/backend shows which runtime is loaded.

Machine codes differ

Docker and native installs get different machine codes. Request a key from the environment you will run in production.

Published benchmark

At the default threshold of 0.5, the repository reports BPCER 0% (none observed in 600 presentations; the one-sided 95% upper bound is about 0.5%) and APCER 0.5–1.5% across printed photo, screen replay (photo and video) and a painted 3D resin mask. FacePlugin QA measured this following ISO/IEC 30107-3; it is an internal evaluation, not an independent laboratory result, and no iBeta certification is claimed.

Combine this with the Linux face recognition server for liveness-gated matching, or check documents with the ID document liveness server.

Licensing

How Licensing Works

Licenses are offline and bound to a machine code. The API starts even before activation, but liveness checks stay restricted until you activate with a key tied to that machine code – Docker and local-host installs get different machine codes, so request a key for whichever environment runs in production. A key labeled Liveness only or Recognition + Liveness unlocks /api/liveness.

FAQ

Frequently Asked Questions

Does the Linux SDK send biometric data to the cloud?

No. Every liveness check runs on your own server or directly on the device, depending on the platform – images never leave an environment you control.

How is the SDK licensed?

Licenses are offline and bound to a machine code. Start the container, read the machine code from the log or GET /api/machinecode, send it to FacePlugin, then activate with POST /api/activate. A key labeled Liveness only or Recognition + Liveness unlocks /api/liveness. There are no per-call fees.

Where can I see the full source and open an issue?

The Linux integration is maintained publicly on GitHub at github.com/Faceplugin-ltd, where you can browse the code, file issues, and track releases.

Related

Pairs Well With

Ready to Add Liveness Detection to Your Linux App?

Talk to our team to get a license key and a 15-day evaluation period started.