How to set up pterodactly panel on Ubuntu for Node.js server. PROMPT:
- User
user: How to set up pterodactly panel on Ubuntu for Node.js server. PROMPT: user: How to set up pterodactly panel on Ubuntu for Node.js server.
- Assistant
Setting up Pterodactyl Panel on Ubuntu for managing Node.js servers involves several steps. Pterodactyl is a management panel for game servers, but it can also manage other types of server applications like Node.js. Here's a general guide to setting it up:
Requirements
- Ubuntu Server: Make sure you're running a supported version of Ubuntu.
- Root or Sudo Access: You'll need administrative privileges to perform the installation.
- Basic Knowledge of Linux Command Line: It's crucial to have a basic understanding of navigating and executing commands in the Linux terminal.
- Domain Name: While optional, it's better to have a domain for SSL and easier access.
- Docker: Pterodactyl uses Docker to containerize server processes.
Installation Steps
1. Server Preparation
-
Update Your System:
sudo apt update && sudo apt upgrade -y -
Install Required Packages:
sudo apt install -y software-properties-common curl apt-transport-https ca-certificates gnupg
2. Install Docker
-
Add Docker’s Official GPG Key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - -
Set up the Stable Repository:
sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" -
Install Docker:
sudo apt update sudo apt install -y docker-ce docker-ce-cli containerd.io
3. Install Docker-Compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose4. Install Pterodactyl Panel
-
Install Dependencies:
sudo apt install -y curl php8.0-cli php8.0-fpm php8.0-mysql php8.0-zip php8.0-xml php8.0-mbstring php8.0-gd php8.0-curl mysql-server nginx tar unzip git redis-server -
Configure MySQL: Secure installation and create a database.
-
Download Pterodactyl:
cd /var/www/ sudo git clone https://github.com/pterodactyl/panel.git --branch 1.0 --single-branch pterodactyl cd pterodactyl sudo cp .env.example .env -
Install Composer:
curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer -
Install PHP Dependencies:
composer install --no-dev --optimize-autoloader -
Set Application Key:
php artisan key:generate --force
5. Configure Web Server (Nginx)
-
Create Nginx Configuration: Create a file at
/etc/nginx/sites-available/pterodactyl.confand configure it according to your domain and SSL preferences. -
Enable Configuration:
sudo ln -s /etc/nginx/sites-available/pterodactyl.conf /etc/nginx/sites-enabled/ sudo systemctl restart nginx
6. Set Up Wings (Daemon)
-
Download and Configure Wings:
curl -L https://github.com/pterodactyl/wings/releases/latest/download/wings_linux_amd64 -o /usr/local/bin/wings chmod u+x /usr/local/bin/wings -
Configure Wings for Node.js: Create a configuration file for Wings, linking it with your panel and allowing it to run Node.js applications.
7. Finalize and Access Panel
-
Open your web browser and navigate to your server’s domain to finish configuration via the web interface.
-
Ensure the Pterodactyl panel is properly linked to manage Node.js environments through the use of custom Docker images or configuring service files.
Additional Notes
- SSL Certificates: Consider using Let’s Encrypt for SSL.
- Firewall and Security: Ensure your firewall settings allow traffic for your applications.
By following these steps, you should be able to set up a functional Pterodactyl Panel on an Ubuntu server tailored for hosting Node.js applications.