Skip to content

itsredbull/n8n-auto-installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ n8n Automated Installation Script

License: MIT Docker n8n Linux

One-click automated installation and configuration of n8n workflow automation platform on Linux servers

πŸ“‹ Overview

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.

✨ Features

  • πŸ” 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

πŸ–₯️ Recommended Server Provider

For optimal performance and global accessibility, we recommend MyHBD.net as your server provider:

Why MyHBD.net?

  • 🌍 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

πŸ“‹ Prerequisites

  • 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

πŸš€ Quick Installation

Method 1: Direct Download & Execute

# Download and execute the script
curl -fsSL https://raw.githubusercontent.com/itsredbull/n8n-auto-installer/main/install-n8n.sh | sudo bash

Method 2: Manual Download

# 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

Method 3: Git Clone

# 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

πŸ“– What Happens During Installation

  1. System Analysis - Detects your Linux distribution and version
  2. Docker Installation - Installs Docker and Docker Compose if needed
  3. Service Configuration - Starts and enables Docker service
  4. Security Setup - Configures firewall rules for port 5678
  5. n8n Deployment - Creates Docker Compose configuration and starts n8n
  6. Credential Generation - Creates secure admin credentials
  7. Health Checks - Verifies installation and connectivity
  8. Logging - Saves all details to /n8ninstall.log

πŸ” Accessing Your n8n Instance

After successful installation, you can access n8n using:

🌐 Web Interface

http://YOUR-SERVER-IP:5678

Replace YOUR-SERVER-IP with your actual server's IP address

πŸ‘€ Initial Setup

  1. Open your browser and navigate to http://YOUR-SERVER-IP:5678
  2. You'll be prompted to create your first account
  3. 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.

πŸ“„ Installation Logs & Credentials

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

πŸ› οΈ Supported Operating Systems

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

πŸ”§ Post-Installation Management

Check n8n Status

docker ps | grep n8n

View n8n Logs

cd /n8n-data && docker compose logs -f

Restart n8n

cd /n8n-data && docker compose restart

Stop n8n

cd /n8n-data && docker compose down

Start n8n

cd /n8n-data && docker compose up -d

πŸ”₯ Firewall Configuration

The 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

πŸ“‚ File Locations

  • Docker Compose Config: /n8n-data/docker-compose.yml
  • n8n Data Directory: /n8n-data/n8n_data/
  • Installation Log: /n8ninstall.log

πŸ†˜ Troubleshooting

Common Issues

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/RHEL

2. Docker not starting

# Check Docker service
sudo systemctl status docker
sudo systemctl start docker

3. Permission issues

# Fix n8n data directory permissions
sudo chmod -R 777 /n8n-data/n8n_data/

Getting Help

  • Check the installation log: sudo cat /n8ninstall.log
  • View n8n container logs: cd /n8n-data && docker compose logs
  • Restart the installation script if needed

🀝 Contributing

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.

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

⭐ Support

If this script helped you, please consider:

  • ⭐ Starring this repository
  • πŸ› Reporting issues
  • πŸ”§ Contributing improvements
  • πŸ’¬ Sharing with others

πŸ”— Useful Links


Made with ❀️ for the n8n community

πŸš€ Ready to automate your workflows? Get started with MyHBD.net hosting and deploy n8n in minutes!

About

One-click automated installation and configuration of n8n workflow automation platform on Linux servers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages