Production Server: norisor (stonks@norisor.local)
- OS: Debian 13 (Linux 6.12)
- Python: 3.13.5
- IP LAN: 192.168.1.7
- Path:
~/@dev/whatflix
| Type | URL |
|---|---|
| LAN | http://norisor.local:8888 |
| LAN (IP) | http://192.168.1.7:8888 |
| Public | https://*.trycloudflare.com (temporar, se schimba la restart) |
┌─────────────────────────────────────────────────────────┐
│ INTERNET │
└─────────────────────┬───────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────┐
│ Cloudflare Tunnel (QUIC) │
│ *.trycloudflare.com → localhost:8888 │
└─────────────────────┬───────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────┐
│ NORISOR │
│ ┌───────────────────────────────────────────────────┐ │
│ │ uvicorn (FastAPI) │ │
│ │ Port: 8888 │ │
│ │ Path: ~/@dev/whatflix │ │
│ │ Venv: .venv/ │ │
│ └───────────────────────────────────────────────────┘ │
│ │
│ ┌───────────────────────────────────────────────────┐ │
│ │ cloudflared tunnel │ │
│ │ Quick tunnel (no config) │ │
│ └───────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
ssh stonks@norisor.localcd ~/@dev/whatflix
source .venv/bin/activate
nohup uvicorn app.main:app --host 0.0.0.0 --port 8888 > server.log 2>&1 &# IMPORTANT: --config /dev/null ignora config-ul ERP existent
nohup cloudflared tunnel --config /dev/null --url http://localhost:8888 > ~/cf-whatflix.log 2>&1 &
# Get URL:
grep -o 'https://[^|]*\.trycloudflare.com' ~/cf-whatflix.log | head -1ssh stonks@norisor.local "cd ~/@dev/whatflix && source .venv/bin/activate && pkill -f 'uvicorn.*whatflix' ; nohup uvicorn app.main:app --host 0.0.0.0 --port 8888 > server.log 2>&1 &"ssh stonks@norisor.local "cd ~/@dev/whatflix && source .venv/bin/activate && pkill -f 'uvicorn.*8888' ; pkill -f 'cloudflared.*8888' ; nohup uvicorn app.main:app --host 0.0.0.0 --port 8888 > server.log 2>&1 & sleep 2 && nohup cloudflared tunnel --config /dev/null --url http://localhost:8888 > ~/cf-whatflix.log 2>&1 &" && sleep 8 && ssh stonks@norisor.local "grep -o 'https://[^|]*\.trycloudflare.com' ~/cf-whatflix.log | head -1"ssh stonks@norisor.local "pkill -f 'uvicorn.*8888'"ssh stonks@norisor.local "pkill -f 'cloudflared.*8888'"ssh stonks@norisor.local "pkill -f 'uvicorn.*8888' ; pkill -f 'cloudflared.*8888'"ssh stonks@norisor.local "ps aux | grep 'uvicorn.*8888' | grep -v grep"ssh stonks@norisor.local "ps aux | grep 'cloudflared.*8888' | grep -v grep"ssh stonks@norisor.local "tail -20 ~/@dev/whatflix/server.log"ssh stonks@norisor.local "tail -20 ~/cf-whatflix.log"ssh stonks@norisor.local "curl -s http://localhost:8888/ | head -3"rsync -avz --exclude='.venv' --exclude='__pycache__' --exclude='*.pyc' --exclude='.git' \
/home/stonks/@dev/whatflix/ stonks@norisor.local:~/@dev/whatflix/ssh stonks@norisor.local "cd ~/@dev/whatflix && python3 -m venv .venv && source .venv/bin/activate && pip install fastapi uvicorn httpx pydantic"ssh stonks@norisor.local "cd ~/@dev/whatflix && source .venv/bin/activate && python -c 'import fastapi; print(fastapi.__version__)'"Pentru login cu Google, adauga domeniul in Firebase Console:
- https://console.firebase.google.com
- Project:
whatflix-18747 - Authentication → Settings → Authorized domains
- Add:
norisor.local*.trycloudflare.com(sau URL-ul specific)
ssh stonks@norisor.local "lsof -i :8888"
ssh stonks@norisor.local "pkill -f 'uvicorn.*8888'"Cauza: config-ul default cloudflared (pentru ERP) intercepteaza requesturile.
Solutie: foloseste --config /dev/null
# Check firewall
ssh stonks@norisor.local "sudo ufw status"
# Check server binds to 0.0.0.0
ssh stonks@norisor.local "ss -tlnp | grep 8888"Nu folosi versiuni pinned vechi. Instaleaza fara versiuni:
pip install fastapi uvicorn httpx pydantic-
⚠️ NU RESTARTA TUNELUL CLOUDFLARE - URL-ul e inregistrat in Firebase pentru OAuth. Daca restartezi tunelul, URL-ul se schimba si auth-ul nu mai merge. Doar uvicorn se poate restarta. -
ERP tunnel ruleaza separat pe acelasi server (
cloudflared tunnel run erp). Nu-l opri cand faci deploy la whatflix. -
Server logs se suprascriu la restart. Pentru persistenta, foloseste
>>in loc de>. -
API Key Gemini e in
.env(loaded via python-dotenv). Nu uita sa sincronizezi .env pe norisor.
Last updated: 2026-01-27 Deployed by: Claude Code