I have developed a Face Recognition service using FastAPI + Uvicorn, running on:
0.0.0.0:8002
This service handles:
-
Employee Registration – capturing and storing face data.
-
Employee Check-in/Check-out Validation – verifying the employee’s face.
Everything works on my local server, but I am facing challenges moving this system into Frappe Cloud.
Issues I Need Clarification On
1. Running a Custom Service (systemctl) on Frappe Cloud
Locally, I run my FastAPI server using a systemd service (systemctl).
However, Frappe Cloud does not allow:
-
Creating custom systemd services
-
Running background services
-
Opening custom ports like
8002
How can I run my FastAPI face recognition service inside Frappe Cloud?
2. Opening Custom Ports or Port Forwarding
My FastAPI server requires a public endpoint (currently 0.0.0.0:8002).
In Frappe Cloud:
-
Custom port exposure is not allowed
-
Port forwarding is not supported
-
Only the frappe/nginx service is exposed through HTTPS
How can I expose my FastAPI endpoint (e.g. https://mydomain.com/face-api) inside Frappe Cloud?
3. Frappe Server Script API Is Too Slow
Right now, I am using Frappe Server Scripts to call my API, but the latency becomes very slow.
I need a better integration method that is:
-
Fast
-
Secure
-
Cloud-friendly
What I Want to Achieve
I want to deploy my face recognition FastAPI service so it works inside or alongside Frappe Cloud with:
-
A proper domain (instead of
0.0.0.0:8002) -
Fast response time for registration and validation
-
Clean integration with the Employee and Attendance doctypes