Skip to main content

Docker deployment

1

Build the image

From the project root, build the Docker image:
2

Run the container

Start the container and pass your environment variables:
The API is now available at http://localhost:4000.

Docker environment variables

Pass these variables to the container using -e flags or a .env file with --env-file:
Never commit GOOGLE_SAFE_API_KEY or any other secrets to source control. Pass them as environment variables at runtime or use a secrets manager.

Dockerfile

Node.js deployment

To run Phisherman directly without Docker:
This compiles the TypeScript source with tsc and then runs node dist/index.js. For long-running production deployments, use a process manager such as PM2 to handle automatic restarts and logging:

Production considerations

Phisherman is designed with production use in mind:
  • Reverse proxy support: trust proxy is already set to 1 in Express, so real client IPs are correctly read from the X-Forwarded-For header when you place Phisherman behind Nginx, Caddy, or a cloud load balancer.
  • Persistent rate limiting: Rate limit counters are stored in Redis, so they survive application restarts and work correctly across multiple instances.
  • Persistent feed cache: Threat feed data (URLHaus, OpenPhish, PhishTank, PhishStats) is cached in Redis and persists across restarts, which means feeds are available immediately on startup after the first run.