# 🚀 Deployment Guide This guide covers different deployment options for the NGINX Proxy Manager Backend. ## 🐳 Docker Deployment (Recommended) ### Prerequisites - Docker and Docker Compose installed - Ports 80, 443, and optionally 3000 available - Domain(s) pointing to your server ### Quick Start 1. **Clone and Configure** ```bash git clone cd reverse-proxy cp .env.example .env # Edit .env with your configuration ``` 2. **Update Docker Compose** Edit `docker-compose.yml` and change: - `JWT_SECRET` to a secure random string - `ADMIN_PASSWORD` to a secure password - `CORS_ORIGIN` to your frontend domain 3. **Deploy** ```bash docker-compose up -d ``` 4. **Check Status** ```bash docker-compose ps docker-compose logs -f nginx-proxy-manager ``` 5. **Access API** - Health check: `http://your-server:3000/api/health` - Login: `POST http://your-server:3000/api/auth/login` ### Production Configuration For production, edit `docker-compose.yml`: ```yaml # Remove API port exposure for security ports: - "80:80" - "443:443" # - "3000:3000" # Remove this line # Use environment file env_file: - .env.production # Add resource limits deploy: resources: limits: memory: 512M cpus: '0.5' ``` ## 🖥️ Native Installation ### Prerequisites - Ubuntu 20.04+ or similar Linux distribution - Node.js with Bun runtime - NGINX installed and running - acme.sh or certbot for SSL certificates ### Installation Steps 1. **Install Dependencies** ```bash # Install Bun curl -fsSL https://bun.sh/install | bash # Install NGINX sudo apt update sudo apt install nginx # Install acme.sh curl https://get.acme.sh | sh -s email=your-email@domain.com ``` 2. **Setup Application** ```bash git clone cd reverse-proxy bun install cp .env.example .env # Edit .env with your configuration ``` 3. **Initialize Database** ```bash bun run db:init ``` 4. **Create Systemd Service** ```bash sudo tee /etc/systemd/system/nginx-proxy-manager.service > /dev/null <