A robust installation script for Nginx Proxy Manager on Ubuntu 24.04. This script fixes common installation issues, particularly the migration directory problem that causes "Bad Gateway" errors.
- Complete installation of Nginx Proxy Manager on Ubuntu 24.04
- Fixes the migration issues that cause Bad Gateway errors
- Automated dependency installation including Node.js, Openresty, and Certbot
- Proper configuration of systemd services
- Intelligent cleanup of previous installations with database backup
- Comprehensive verification of the installation
- Detailed, color-coded logs of the installation process
- Ubuntu 24.04 LTS
- Root or sudo access
- Internet connection
# Download the script
wget https://raw.githubusercontent.com/megamvb/NPM-Install/refs/heads/main/install-npm.sh
# Make it executable
chmod +x install-npm.sh
# Run with sudo
sudo ./install-npm.shThe installation script handles everything needed to get Nginx Proxy Manager up and running:
- Installs all required dependencies
- Checks for and resolves conflicts with existing services
- Downloads and configures the latest version of Nginx Proxy Manager
- Properly sets up the database migrations (fixes common "Bad Gateway" errors)
- Builds the frontend and initializes the backend
- Creates and enables systemd services
- Adjusts permissions and security settings
- Verifies the installation is working correctly
After running the script, you can access the Nginx Proxy Manager admin interface at:
http://YOUR_SERVER_IP:81
Default login credentials:
- Email:
admin@example.com - Password:
changeme
Important: Change your password immediately upon first login!
If you encounter any issues:
- Check the logs with:
sudo journalctl -u npm -f - Ensure all required ports (80, 81, 443) are open and not used by other services
- Verify that the system has sufficient resources (RAM, CPU, storage)
Common solutions:
- Restart the services:
sudo systemctl restart openresty npm - Check firewall settings:
sudo ufw status
After installation, consider:
- Securing the admin interface by restricting IP access
- Setting up HTTPS for the admin interface
- Using strong passwords and regular updates
- Setting up a firewall (UFW) to restrict access
This repository also includes helpful scripts for:
- Restricting admin panel access to specific IPs
- Troubleshooting common issues
- Updating Nginx Proxy Manager
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Developed by Marcos V Bohrer at AgileHost.
Based on the original Nginx Proxy Manager project.
Fast, reliable hosting solutions