Environment Variables
PhishIntel supports a number of environment variables to configure the application and customize its behavior. Below is a detailed description of each variable.
Core Variables
NODE_ENV
- Description: Defines the environment mode in which the application runs.
- Default Value:
development - Accepted Values:
development: For local development.production: For production deployment.
- Usage:
NODE_ENV=production
Database Variables
DB_URL
- Description: The URL for connecting to the MongoDB database instance.-
- Example:
DB_URL=mongodb://localhost:27017/phishintel - Notes:
- Ensure the database URL includes the correct protocol (
mongodb://ormongodb+srv://). - Replace
localhost:27017with your MongoDB instance's address for production.
- Ensure the database URL includes the correct protocol (
Authentication Variables
ADMIN_PASSWORD
- Description: Sets the default admin password for accessing the admin panel.
- Default Username:
admin - Usage:
ADMIN_PASSWORD=securepassword - Notes:
- Use a strong, unique password in production to prevent unauthorized access.
SESSION_SECRET
- Description: A unique string used to sign authentication sessions.
- Default Value: None (must be set for production).
- Usage:
SESSION_SECRET=your-unique-secret-key - Notes:
- Keep this value secret and unique.
- Use a sufficiently long and random string to enhance security.
Example .env File
Below is an example .env file for setting up PhishIntel in a production environment:
NODE_ENV=production
DB_URL=mongodb://your-db-host:27017/phishintel
ADMIN_PASSWORD=supersecurepassword
SESSION_SECRET=randomlygeneratedsecretkey