Start here.
How it works
Face & Fingerprint Attendance is a web app. Your staff open it on their own phone and tap Check In: the phone checks the face, asks for a head turn and saves the location. You run it in one of two ways, and a Google Sheet can get a copy of the data.
| Way | What it is for | Steps |
|---|---|---|
| Online on a VPS | Real use. Staff punch from their own phones, anywhere, over https. | 2 to 11 |
| On your PC (localhost) | Try every page on your own computer before you go online. | 12 to 14 |
| Google Sheets copy | Optional. Punches and day rows go to your own Sheet every 10 minutes. | 15 to 17 |
https://) or on localhost on the same computer. A phone in your office cannot reach your PC's localhost, so staff phones need the online version.Put it online.
What you need
| Item | Details |
|---|---|
| A VPS | Ubuntu 22.04 or 24.04, at least 1 CPU and 2 GB RAM. A plain server, with no control panel. |
| A domain or subdomain | For example attendance.yourcompany.com. Each phone is tied to this address, so pick one you will keep. |
| The project files | The folder you downloaded from your Rameez Scripts account (F46). |
| Your PC | Windows 10/11 (PowerShell) or a Mac / Linux (Terminal). Both already have ssh and scp. |
Buy a VPS
- Open your hosting company's VPS plans (not shared or web hosting). We use Hostinger VPS.
- Pick a plan with at least 2 GB RAM and the location closest to your office.
- For the operating system choose plain Ubuntu 24.04 (or 22.04). Do not pick cPanel, Plesk, CloudPanel or any app template.
- Set a strong root password and save it.
- When the VPS shows Running, write down its IP address (like
203.0.113.25).
Point your domain at the VPS
- Open the DNS settings of your domain (at Hostinger: Domains › your domain › DNS / Nameservers).
- Add an A record:
Type: A
Name: attendance
Points to: 203.0.113.25 (your VPS IP)
TTL: default- Save, and wait 5 to 30 minutes.
- Check it from your PC: the reply must show your VPS IP.
ping attendance.yourcompany.comCopy the project to the VPS
- Unzip the download and rename the folder to
attendance(no spaces). - Open PowerShell (Windows) or Terminal (Mac) in the folder that holds
attendance. - Copy it to the VPS. Type yes the first time, then the root password:
scp -r attendance root@203.0.113.25:/root/203.0.113.25 with the IP from step 3 in every command.Open the VPS from your PC
ssh root@203.0.113.25- Type yes if it asks about the fingerprint of the server.
- Type the root password (nothing shows while you type) and press Enter.
- You are in when the line ends with
root@…:~#.
Run the installer
One command installs everything: Python, the face models, the app as a service that starts after a reboot, https through Caddy, and a daily copy of the database.
cd /root/attendance
bash install.sh attendance.yourcompany.com- Use your own domain from step 4.
- Wait about 5 minutes. It ends with
activeanddone. open https://…/setup.
Create your company
https://attendance.yourcompany.com/setup- Fill in the company name and the time zone.
- Fill in your name, an admin username and a password of 10 or more characters.
- Press the button to finish. You land on the admin dashboard.
Set your office location and network
- Stand in the office with your phone or laptop and open Settings › Location & network.
- Press Use my current location and set the allowed distance (for example 100 m).
- Press Add the network I am on now to save the office internet (IP).
- Press Save.
Add shifts and staff
- Shifts: check the General shift (start, end, grace minutes, weekly off) or add your own.
- Staff › Add Staff: one account per person, with a username without spaces, a password and the shift.
- Send each person the address, their username and password.
Staff set up their phone
- The staff member opens your address on their phone and signs in.
- Under Set up once, they tick the consent line (the face is saved as numbers, not as a photo).
- Your face › Start: look straight, turn left, turn right. It takes about 10 seconds.
- This phone › Register: the phone saves a passkey and asks for fingerprint or Face ID.
- From now on: tap Check In or Check Out.
Try it on your PC.
Install Python
- Download Python 3.11 or newer from python.org.
- Windows: on the first screen tick Add python.exe to PATH, then Install Now.
- Check it in a new PowerShell or Terminal window:
python --versionInstall the app on your PC
Open PowerShell or Terminal inside the project folder, then run the commands for your computer. The face models download from OpenCV's public model zoo.
python -m venv .venv
.\.venv\Scripts\python -m pip install -r requirements.txt
mkdir models
curl.exe -L -o models\yunet.onnx https://github.com/opencv/opencv_zoo/raw/main/models/face_detection_yunet/face_detection_yunet_2023mar.onnx
curl.exe -L -o models\sface.onnx https://github.com/opencv/opencv_zoo/raw/main/models/face_recognition_sface/face_recognition_sface_2021dec.onnxbash setup.shStart it and open localhost
.\.venv\Scripts\python -m uvicorn app.main:app --port 8000./run.sh- Leave that window open while you use the app.
- Open this address on the same computer and create your company (like step 8):
http://localhost:8000/setuplocalhost in your PC's browser. Staff phones need the https address from steps 2 to 11.Connect Google Sheets.
Put the script in a Google Sheet
- In the app open Settings › Google Sheet and copy the code shown there.
- Make a new Google Sheet, then Extensions › Apps Script.
- Delete what is there, paste the code and press Save.
- In the function list pick setup, press Run, then Allow.
Deploy it as a web app
- Deploy › New deployment, type Web app.
- Execute as Me, Who has access Anyone, then Deploy.
- Copy the Web app URL. It ends in
/exec.
https://script.google.com/macros/s/…/execConnect it in the app
- Back in Settings › Google Sheet, paste the URL in Web app URL.
- Switch on Send to Google Sheet. Send every is 10 minutes (1 to 120).
- Press Save, then Send now.
- Open your Sheet: the Punches and Daily tabs fill with your data.
SYNC_KEY.Help.
Daily commands on the VPS
# see the last log lines
journalctl -u attendance -n 100
# restart the app
systemctl restart attendance
# daily database copies (14 are kept)
ls /opt/attendance/data/backupsProblems and fixes
The site does not open
Check that the domain points to the VPS (step 4) and that ports 80 and 443 are open in your hosting firewall.
The camera or fingerprint does not start
The address must start with https:// (or be localhost on the same PC). Allow the camera when the browser asks.
Face not matched for the right person
Good light, face straight and close to the oval. An admin can reset the face in Staff and the person sets it up again.
A staff member changed their phone
Staff › ⋮ › Reset phone, then they register the new phone under Set up once.
I changed the domain
Every phone registers again (Staff › Reset phone), because each passkey is tied to the old address.
Nothing arrives in the Google Sheet
Check the Web app URL ends in /exec, access is Anyone, and press Send now. Moved servers? Delete SYNC_KEY (step 17).
