Skip to content

Running your own server

AnzouK edited this page Oct 14, 2026 · 2 revisions

Run your own server

With your own server, emails never leave your computer (or your network). It needs Docker, a few GB of disk for the image and the model, and about ten minutes the first time.

With Docker (recommended)

git clone https://github.com/AnzouK/PhishLens.git
cd PhishLens
mkdir -p backend/model
huggingface-cli download AnzouKiona/phishlens-distilbert --local-dir backend/model
cd backend && docker compose up --build

The server is ready when the logs show Text model loaded from .... Check it with curl http://127.0.0.1:8000/health: it shows the version and the text model in use.

Then in the popup: gear icon, Local backend (Docker), Test connection.

Notes

  • Without a Google Safe Browsing key, that check is skipped; the other threat-intelligence sources still work. Add the key in the environment as GSB_API_KEY.
  • On another machine, use Custom URL with an https:// address.
  • Another text model: set HF_MODEL_REPO to its Hugging Face repository (and HF_TOKEN if it is private). Each model is kept in its own folder, so you can switch back. Details in docs/operations.md.
  • OCR languages: the Docker image reads text in images in many languages; OCR_LANG=eng forces English only.
  • Configuration, deployment on a server, monitoring and backups: docs/operations.md.

Clone this wiki locally