Installation
NAT can be installed via pip (Python package), Docker, or used directly in GitHub Actions without a local install.
System requirements
| Requirement | Minimum | Recommended |
|---|---|---|
| Python | 3.9 | 3.11+ |
| RAM | 512 MB | 2 GB |
| Disk | 200 MB | 1 GB |
| OS | Linux, macOS, Windows (WSL2) | Linux or macOS |
Install via pip
pip install nat-engine installs the full NAT engine including the CLI, local report generation, and self-hosted server mode.
pip install nat-engineVerify the installation
nat --version
# nat-engine 1.x.xUpgrade to the latest version
pip install --upgrade nat-engineInstall a specific version
pip install nat-engine==1.2.0Install in a virtual environment (recommended)
python -m venv .venv
source .venv/bin/activate # macOS/Linux
# .venv\Scripts\activate # Windows
pip install nat-engineInstall via Docker
docker pull natengine/nat:latest
docker run --rm natengine/nat:latest nat --versionSee the Docker Deployment guide for production Docker setup.
Install via GitHub Actions
No local installation needed — use the official nat-action in your workflow:
- uses: bg-playground/nat-action@v1
with:
api-url: https://api.example.com
api-key: ${{ secrets.NAT_API_KEY }}See the CI/CD Integration guide for the full workflow reference.
Self-hosted server mode
After installing via pip, you can run NAT as a local server that exposes a REST API and dashboard:
Start the server
nat server start --port 8080Open the dashboard
Navigate to http://localhost:8080 in your browser.
Configure via environment variables
| Variable | Description | Default |
|---|---|---|
NAT_PORT | Server listen port | 8080 |
NAT_HOST | Bind address | 127.0.0.1 |
NAT_DATA_DIR | Directory for scan data and reports | ~/.nat/data |
NAT_LOG_LEVEL | Log verbosity (debug, info, warn, error) | info |
NAT_SECRET_KEY | Secret used to sign session tokens | Auto-generated |
See the Self-Hosted Setup guide for a complete production deployment walkthrough.
Uninstall
pip uninstall nat-engineTo also remove stored data and configuration:
rm -rf ~/.natNext steps
- Quickstart — scan your first API in five minutes
- Your First Scan — detailed first scan walkthrough
- Self-Hosted Setup — production self-hosted deployment