Own Server Online Deployment Guide
This guide explains how to run Famalth Lynx on your own online server and connect client PCs over network/internet.
1. Prerequisites
- A server machine (Windows or Linux) with stable internet.
- Node.js 18+ installed.
- PostgreSQL installed and reachable from backend.
- Required runtime files in backend run folder:
license.keyconfig.encsysConfig.encclient.jsonuploads/(folder)
- Port
3000open on server firewall (or a reverse-proxy port like80/443).
2. Backend Deployment
From project root:
cd backend
npm install
npm start
Default server port is 3000 (backend/server.js uses process.env.PORT || 3000).
Health check:
http://<SERVER-IP-OR-DOMAIN>:3000/health
Expected when healthy: JSON with success: true.
3. Optional: Run as Background Service
Use a process manager so backend auto-restarts after reboot/crash.
- Linux:
pm2,systemd. - Windows: NSSM / Task Scheduler / service wrapper.
Keep working directory pointed to backend runtime folder so config and license files are found.
4. Optional: Domain + HTTPS (Recommended)
Put Nginx/Apache in front of Node app:
- Public URL:
https://api.yourdomain.com - Proxy target:
http://127.0.0.1:3000 - Enable SSL certificate (Let’s Encrypt or purchased cert).
Then clients will use HTTPS base URL in server_config.json.
5. Client Connection Setup
On every client machine, set server_config.json in app working directory:
{
"baseUrl": "http://<SERVER-IP-OR-DOMAIN>:3000",
"outlets": []
}
Examples:
- LAN:
http://192.168.1.50:3000 - Public:
https://api.yourdomain.com
6. Behavior on Server vs Client PCs
The app now validates host mode from baseUrl:
localhost/127.0.0.1(host mode):- Shows cloud backup controls.
- Shows backup protection popups.
- Link flow supports full
Verify + Recover System.
- Any non-localhost URL (network/client mode):
- Hides cloud backup controls and backup popups.
- Link flow works as
Verify + Link Device(PIN/OTP verification and linking).
7. Device Link Flow (Client PCs)
- Open setup screen.
- Choose
Link Existing. - Enter Business ID + PIN, or choose OTP fallback.
- Verify identity.
- Device gets linked to server business profile.
8. Troubleshooting
Cannot connect to server:- Confirm backend is running.
- Check firewall port allow rule.
- Verify
server_config.jsonURL/port. - Test
/healthURL directly from client browser.
Health returns config/license errors:- Re-check
license.key,config.enc,sysConfig.enc.
- Re-check
Database connection failed:- Verify DB host/user/password/port in encrypted config.
- Confirm PostgreSQL service is running.
9. Security Checklist
- Prefer HTTPS for internet deployments.
- Restrict DB access to backend host only.
- Keep server OS patched.
- Keep license/config files readable only by service account.
- Back up database and
uploads/regularly.