One-click automated installation and configuration of n8n workflow automation platform on Linux servers
This bash script provides a fully automated installation of n8n - a powerful workflow automation tool that helps you connect apps and automate tasks. The script handles everything from OS detection to Docker installation, firewall configuration, and n8n deployment.
- π Automatic OS Detection - Supports Ubuntu, Debian, CentOS, RHEL, AlmaLinux, Rocky Linux, Oracle Linux, SUSE, and Amazon Linux
- π³ Docker Auto-Installation - Installs Docker and Docker Compose if not present
- π₯ Firewall Configuration - Automatically configures UFW and firewalld
- π Secure Setup - Generates random admin password and enables basic authentication
- π Comprehensive Logging - All actions logged to
/n8ninstall.log - π Network Optimization - Configures proper port mapping and webhook URLs
- π οΈ Troubleshooting - Built-in error handling and alternative installation methods
For optimal performance and global accessibility, we recommend MyHBD.net as your server provider:
- π Multiple Global Locations - Choose from data centers worldwide
- β‘ High Performance SSD Storage - Fast disk I/O for better n8n performance
- π Enterprise-Grade Security - Advanced DDoS protection and security features
- π° Competitive Pricing - Cost-effective solutions for all budgets
- ποΈ One-Click Deployments - Easy server provisioning with just one click
- π 24/7 Expert Support - Round-the-clock technical assistance
π Get Your Server at MyHBD.net
- Linux server (Ubuntu, Debian, CentOS, RHEL, AlmaLinux, Rocky Linux, Oracle Linux, SUSE, or Amazon Linux)
- Root access or sudo privileges
- Internet connection
- Minimum 1GB RAM (2GB+ recommended)
- At least 10GB free disk space
# Download and execute the script
curl -fsSL https://raw.githubusercontent.com/itsredbull/n8n-auto-installer/main/install-n8n.sh | sudo bash# Download the script
wget https://raw.githubusercontent.com/itsredbull/n8n-auto-installer/main/install-n8n.sh
# Make it executable
chmod +x install-n8n.sh
# Run the script
sudo ./install-n8n.sh# Clone the repository
git clone https://github.com/itsredbull/n8n-auto-installer.git
cd n8n-auto-installer
# Make script executable
chmod +x install-n8n.sh
# Run the installation
sudo ./install-n8n.sh- System Analysis - Detects your Linux distribution and version
- Docker Installation - Installs Docker and Docker Compose if needed
- Service Configuration - Starts and enables Docker service
- Security Setup - Configures firewall rules for port 5678
- n8n Deployment - Creates Docker Compose configuration and starts n8n
- Credential Generation - Creates secure admin credentials
- Health Checks - Verifies installation and connectivity
- Logging - Saves all details to
/n8ninstall.log
After successful installation, you can access n8n using:
http://YOUR-SERVER-IP:5678
Replace YOUR-SERVER-IP with your actual server's IP address
- Open your browser and navigate to
http://YOUR-SERVER-IP:5678 - You'll be prompted to create your first account
- Fill in your details:
- Email: Your email address
- First Name: Your first name
- Last Name: Your last name
- Password: Choose a strong password
π‘ Note: The script creates basic authentication, but you'll need to set up your personal account on first access.
All installation details are saved to /n8ninstall.log, including:
- Generated admin credentials
- Installation steps and timestamps
- Any errors or warnings encountered
- Server configuration details
To view the log:
sudo cat /n8ninstall.log| OS | Version | Status |
|---|---|---|
| Ubuntu | 18.04+ | β Fully Supported |
| Debian | 9+ | β Fully Supported |
| CentOS | 7+ | β Fully Supported |
| RHEL | 7+ | β Fully Supported |
| AlmaLinux | 8+ | β Fully Supported |
| Rocky Linux | 8+ | β Fully Supported |
| Oracle Linux | 7+ | β Fully Supported |
| SUSE | 15+ | β Fully Supported |
| Amazon Linux | 2+ | β Fully Supported |
docker ps | grep n8ncd /n8n-data && docker compose logs -fcd /n8n-data && docker compose restartcd /n8n-data && docker compose downcd /n8n-data && docker compose up -dThe script automatically configures your firewall to allow connections on port 5678:
- UFW (Ubuntu/Debian):
ufw allow 5678/tcp - firewalld (CentOS/RHEL):
firewall-cmd --permanent --add-port=5678/tcp
- Docker Compose Config:
/n8n-data/docker-compose.yml - n8n Data Directory:
/n8n-data/n8n_data/ - Installation Log:
/n8ninstall.log
1. Port 5678 not accessible
# Check if n8n container is running
docker ps | grep n8n
# Check firewall status
sudo ufw status # Ubuntu/Debian
sudo firewall-cmd --list-ports # CentOS/RHEL2. Docker not starting
# Check Docker service
sudo systemctl status docker
sudo systemctl start docker3. Permission issues
# Fix n8n data directory permissions
sudo chmod -R 777 /n8n-data/n8n_data/- Check the installation log:
sudo cat /n8ninstall.log - View n8n container logs:
cd /n8n-data && docker compose logs - Restart the installation script if needed
We welcome contributions! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.
If this script helped you, please consider:
- β Starring this repository
- π Reporting issues
- π§ Contributing improvements
- π¬ Sharing with others
Made with β€οΈ for the n8n community
π Ready to automate your workflows? Get started with MyHBD.net hosting and deploy n8n in minutes!