Skip to main content

ZKTeco Biometric Server

A Flask-based REST API server that provides comprehensive management and monitoring capabilities for ZKTeco biometric attendance devices. Built with Python, this server enables centralized control of multiple biometric devices through a clean REST API interface.

Key Features

Multi-Device Management

Register, configure, and manage multiple ZKTeco devices dynamically through API endpoints

Real-Time Attendance

Query attendance records in real-time with filtering by user ID and date

User Management

Create, update, and delete users directly on biometric devices

Fingerprint Enrollment

Remote fingerprint enrollment with support for all 10 fingers

Thread-Safe Operations

Concurrent device access with per-device locking mechanisms

SSL/TLS Support

Auto-generated SSL certificates for secure HTTPS communication

What You Can Do

With the ZKTeco Biometric Server, you can:
  • Centralize Device Management: Register and configure multiple ZKTeco biometric devices from a single API
  • Track Attendance: Retrieve attendance records from one or all devices with powerful filtering options
  • Manage Users: Create, update, and delete user accounts on biometric devices remotely
  • Enroll Fingerprints: Initiate fingerprint enrollment sessions for any registered finger (0-9)
  • Synchronize Time: Keep device clocks synchronized with your server time
  • Monitor Device Health: Check connection status and retrieve detailed device information

Architecture Overview

The server operates in two modes:
  1. Single Device Mode (servidor.py): Connects to one ZKTeco device with configuration via environment variables
  2. Multi-Device Mode (server.py): Manages multiple devices with dynamic registration via REST API
All device communication uses the pyzk library for ZKTeco protocol support, with thread-safe operations ensuring reliable concurrent access.

Use Cases

Deploy across multiple office locations to centralize employee attendance tracking and reporting
Integrate biometric authentication into existing access control systems via REST API
Manage and monitor distributed biometric devices without physical access
Build custom web or mobile applications on top of the REST API

Getting Started

Ready to deploy your biometric server? Follow these steps:

Quick Start

Get the server running in under 5 minutes

Installation Guide

Detailed installation instructions and requirements

API Reference

Explore all available API endpoints

Configuration

Configure the server for your environment

System Requirements

  • Python: 3.7 or higher
  • Network: Access to ZKTeco devices on TCP port 4370 (default)
  • Dependencies: Flask, pyzk, pyopenssl, requests, psycopg2-binary

Project Structure

The repository contains three main server implementations:
  • server.py - Multi-device server with dynamic device registration
  • servidor.py - Single-device server for simple deployments
  • servidor_multi.py - Multi-device server with predefined device configuration
Choose the implementation that best fits your deployment needs.

Build docs developers (and LLMs) love