GameServer-Install.de - Forum
Pelican - 1-Klick Install Script Version - Druckversion

+- GameServer-Install.de - Forum (https://gameserver-install.de)
+-- Forum: GamerSever - Install (https://gameserver-install.de/forum-3.html)
+--- Forum: Tools (https://gameserver-install.de/forum-6.html)
+--- Thema: Pelican - 1-Klick Install Script Version (/thread-273.html)



Pelican - 1-Klick Install Script Version - rumpel - 05-11-2026

Code:
#!/bin/bash # ========================================================= # Pelican Panel Auto Installer (Ubuntu 24.04) by rumpel (gameserver-install.de) # ========================================================= # Dieses Script installiert automatisch: # - NGINX # - MariaDB # - PHP 8.3 # - Composer # - Pelican Panel # - SSL via Let's Encrypt # ========================================================= clear echo "=======================================" echo "      Pelican Auto Installer" echo "=======================================" read -p "Domain eingeben (z.B. panel.domain.de): " DOMAIN read -p "Admin E-Mail eingeben: " EMAIL read -s -p "MariaDB Passwort für Pelican DB: " DBPASS echo "" # ========================================================= # System Update # ========================================================= apt update && apt upgrade -y # ========================================================= # Benötigte Pakete # ========================================================= apt install -y software-properties-common curl apt-transport-https \ ca-certificates gnupg unzip tar nginx mariadb-server certbot \ python3-certbot-nginx redis-server add-apt-repository ppa:ondrej/php -y apt update # ========================================================= # PHP 8.3 installieren # ========================================================= apt install -y php8.3 php8.3-cli php8.3-fpm php8.3-gd \ php8.3-mysql php8.3-mbstring php8.3-bcmath php8.3-xml \ php8.3-curl php8.3-zip php8.3-intl php8.3-sqlite3 # ========================================================= # Composer installieren # ========================================================= curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer # ========================================================= # MariaDB konfigurieren # ========================================================= systemctl enable mariadb systemctl start mariadb mysql -u root <<MYSQL_SCRIPT CREATE DATABASE pelican; CREATE USER 'pelican'@'127.0.0.1' IDENTIFIED BY '${DBPASS}'; GRANT ALL PRIVILEGES ON pelican.* TO 'pelican'@'127.0.0.1'; FLUSH PRIVILEGES; MYSQL_SCRIPT # ========================================================= # Pelican herunterladen # ========================================================= mkdir -p /var/www/pelican cd /var/www/pelican || exit curl -L https://github.com/pelican-dev/panel/releases/latest/download/panel.tar.gz | tar -xzv # ========================================================= # Composer Dependencies # ========================================================= COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloader cp .env.example .env # ========================================================= # Environment konfigurieren # ========================================================= php artisan key:generate --force sed -i "s|APP_URL=.*|APP_URL=https://${DOMAIN}|g" .env sed -i "s|DB_DATABASE=.*|DB_DATABASE=pelican|g" .env sed -i "s|DB_USERNAME=.*|DB_USERNAME=pelican|g" .env sed -i "s|DB_PASSWORD=.*|DB_PASSWORD=${DBPASS}|g" .env # Redis aktivieren sed -i "s|CACHE_STORE=file|CACHE_STORE=redis|g" .env sed -i "s|SESSION_DRIVER=file|SESSION_DRIVER=redis|g" .env sed -i "s|QUEUE_CONNECTION=sync|QUEUE_CONNECTION=redis|g" .env # ========================================================= # Datenbank migrieren # ========================================================= php artisan migrate --seed --force # ========================================================= # Rechte setzen # ========================================================= chown -R www-data:www-data /var/www/pelican chmod -R 755 storage/* bootstrap/cache/ # ========================================================= # Admin User erstellen # ========================================================= echo "" echo "=======================================" echo "Admin Benutzer erstellen" echo "=======================================" php artisan p:user:make # ========================================================= # NGINX konfigurieren # ========================================================= cat > /etc/nginx/sites-available/pelican.conf <<EOF server {     listen 80;     server_name ${DOMAIN};     root /var/www/pelican/public;     index index.php;     client_max_body_size 100m;     access_log /var/log/nginx/pelican.access.log;     error_log /var/log/nginx/pelican.error.log;     location / {         try_files \$uri \$uri/ /index.php?\$query_string;     }     location ~ \.php$ {         fastcgi_split_path_info ^(.+\.php)(/.+)$;         fastcgi_pass unix:/run/php/php8.3-fpm.sock;         fastcgi_index index.php;         include fastcgi_params;         fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;     } } EOF ln -sf /etc/nginx/sites-available/pelican.conf /etc/nginx/sites-enabled/pelican.conf nginx -t systemctl restart nginx # ========================================================= # SSL installieren # ========================================================= certbot --nginx --non-interactive --agree-tos \ -m ${EMAIL} -d ${DOMAIN} --redirect # ========================================================= # Queue Worker # ========================================================= cat > /etc/systemd/system/pelican.service <<EOF [Unit] Description=Pelican Queue Worker After=redis-server.service [Service] User=www-data Group=www-data Restart=always ExecStart=/usr/bin/php /var/www/pelican/artisan queue:work --sleep=3 --tries=3 [Install] WantedBy=multi-user.target EOF systemctl daemon-reload systemctl enable pelican systemctl start pelican # ========================================================= # Cronjob # ========================================================= (crontab -l 2>/dev/null; echo "* * * * * php /var/www/pelican/artisan schedule:run >> /dev/null 2>&1") | crontab - # ========================================================= # Fertig # ========================================================= clear echo "=======================================" echo "Pelican Installation abgeschlossen!" echo "=======================================" echo "" echo "Panel URL: https://${DOMAIN}" echo "" echo "Pfad: /var/www/pelican" echo "" echo "NGINX Status:" systemctl status nginx --no-pager echo "" echo "PHP-FPM Status:" systemctl status php8.3-fpm --no-pager echo "" echo "Pelican Queue Status:" systemctl status pelican --no-pager

Verwendung 

Datei erstellen:

Code:
nano pelican-install.sh


Script einfügen.

Ausführbar machen :

Code:
chmod +x pelican-install.sh


Starten

Code:
sudo bash pelican-install.sh



Voraussetzungen
  • Ubuntu 24.04
  • Root Zugriff
  • Domain zeigt bereits auf den Server
  • Ports 80 & 443 offen

Nach der Installation

Panel erreichbar unter:

Code:
https://deine-domain.de


Hier noch einmal das Script  - komplettes Pelican + Wings Auto Installer


Code:
#!/bin/bash # ========================================================= #  Pelican Komplett Installer (Panel + Wings) #  Ubuntu 24.04 LTS # ========================================================= set -e clear echo "==================================================" echo "        Pelican Komplett Auto Installer" echo "==================================================" read -p "Panel Domain (panel.domain.de): " PANEL_DOMAIN read -p "Node Domain (node.domain.de): " NODE_DOMAIN read -p "Admin E-Mail: " EMAIL read -s -p "MariaDB Passwort: " DBPASS echo "" # ========================================================= # Variablen # ========================================================= PANEL_PATH="/var/www/pelican" # ========================================================= # System Update # ========================================================= apt update && apt upgrade -y timedatectl set-timezone Europe/Berlin # ========================================================= # Firewall # ========================================================= apt install -y ufw ufw allow 22 ufw allow 80 ufw allow 443 ufw allow 8080 ufw --force enable # ========================================================= # Docker installieren # ========================================================= apt install -y ca-certificates curl gnupg lsb-release install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \ gpg --dearmor -o /etc/apt/keyrings/docker.gpg chmod a+r /etc/apt/keyrings/docker.gpg echo \ "deb [arch=$(dpkg --print-architecture) \ signed-by=/etc/apt/keyrings/docker.gpg] \ https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ tee /etc/apt/sources.list.d/docker.list > /dev/null apt update apt install -y docker-ce docker-ce-cli containerd.io \ docker-buildx-plugin docker-compose-plugin systemctl enable docker systemctl start docker # ========================================================= # Pakete installieren # ========================================================= apt install -y software-properties-common apt-transport-https \ ca-certificates gnupg unzip tar nginx mariadb-server \ redis-server certbot python3-certbot-nginx add-apt-repository ppa:ondrej/php -y apt update # ========================================================= # PHP 8.3 # ========================================================= apt install -y php8.3 php8.3-cli php8.3-fpm php8.3-gd \ php8.3-mysql php8.3-mbstring php8.3-bcmath \ php8.3-xml php8.3-curl php8.3-zip \ php8.3-intl php8.3-sqlite3 # ========================================================= # Composer # ========================================================= curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer # ========================================================= # MariaDB # ========================================================= systemctl enable mariadb systemctl start mariadb mysql -u root <<MYSQL_SCRIPT CREATE DATABASE pelican; CREATE USER 'pelican'@'127.0.0.1' IDENTIFIED BY '${DBPASS}'; GRANT ALL PRIVILEGES ON pelican.* TO 'pelican'@'127.0.0.1'; FLUSH PRIVILEGES; MYSQL_SCRIPT # ========================================================= # Pelican Panel # ========================================================= mkdir -p ${PANEL_PATH} cd ${PANEL_PATH} curl -L https://github.com/pelican-dev/panel/releases/latest/download/panel.tar.gz | tar -xzv COMPOSER_ALLOW_SUPERUSER=1 composer install \ --no-dev --optimize-autoloader cp .env.example .env php artisan key:generate --force sed -i "s|APP_URL=.*|APP_URL=https://${PANEL_DOMAIN}|g" .env sed -i "s|DB_DATABASE=.*|DB_DATABASE=pelican|g" .env sed -i "s|DB_USERNAME=.*|DB_USERNAME=pelican|g" .env sed -i "s|DB_PASSWORD=.*|DB_PASSWORD=${DBPASS}|g" .env sed -i "s|CACHE_STORE=file|CACHE_STORE=redis|g" .env sed -i "s|SESSION_DRIVER=file|SESSION_DRIVER=redis|g" .env sed -i "s|QUEUE_CONNECTION=sync|QUEUE_CONNECTION=redis|g" .env php artisan migrate --seed --force chown -R www-data:www-data ${PANEL_PATH} chmod -R 755 storage/* bootstrap/cache/ # ========================================================= # Admin User # ========================================================= echo "" echo "==================================================" echo "Admin User erstellen" echo "==================================================" php artisan p:user:make # ========================================================= # Queue Worker # ========================================================= cat > /etc/systemd/system/pelican.service <<EOF [Unit] Description=Pelican Queue Worker After=redis-server.service [Service] User=www-data Group=www-data Restart=always ExecStart=/usr/bin/php ${PANEL_PATH}/artisan queue:work --sleep=3 --tries=3 [Install] WantedBy=multi-user.target EOF systemctl daemon-reload systemctl enable pelican systemctl start pelican # ========================================================= # Cronjob # ========================================================= (crontab -l 2>/dev/null; echo "* * * * * php ${PANEL_PATH}/artisan schedule:run >> /dev/null 2>&1") | crontab - # ========================================================= # NGINX Panel # ========================================================= cat > /etc/nginx/sites-available/pelican.conf <<EOF server {     listen 80;     server_name ${PANEL_DOMAIN};     root ${PANEL_PATH}/public;     index index.php;     client_max_body_size 100m;     location / {         try_files \$uri \$uri/ /index.php?\$query_string;     }     location ~ \.php$ {         fastcgi_split_path_info ^(.+\.php)(/.+)$;         fastcgi_pass unix:/run/php/php8.3-fpm.sock;         fastcgi_index index.php;         include fastcgi_params;         fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;     } } EOF # ========================================================= # NGINX Wings Reverse Proxy # ========================================================= cat > /etc/nginx/sites-available/wings.conf <<EOF server {     listen 80;     server_name ${NODE_DOMAIN};     location / {         proxy_pass http://127.0.0.1:8080;         proxy_set_header Host \$host;         proxy_set_header X-Real-IP \$remote_addr;         proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;         proxy_set_header X-Forwarded-Proto \$scheme;     } } EOF ln -sf /etc/nginx/sites-available/pelican.conf /etc/nginx/sites-enabled/pelican.conf ln -sf /etc/nginx/sites-available/wings.conf /etc/nginx/sites-enabled/wings.conf rm -f /etc/nginx/sites-enabled/default nginx -t systemctl restart nginx # ========================================================= # SSL # ========================================================= certbot --nginx --non-interactive --agree-tos \ -m ${EMAIL} \ -d ${PANEL_DOMAIN} \ -d ${NODE_DOMAIN} \ --redirect # ========================================================= # Wings Installation # ========================================================= mkdir -p /etc/pelican curl -L -o /usr/local/bin/wings \ https://github.com/pelican-dev/wings/releases/latest/download/wings_linux_amd64 chmod +x /usr/local/bin/wings # ========================================================= # Wings Config # ========================================================= cat > /etc/pelican/config.yml <<EOF debug: false uuid: CHANGE_ME token_id: CHANGE_ME token: CHANGE_ME api:   host: 0.0.0.0   port: 8080   ssl:     enabled: false system:   data: /var/lib/pelican/volumes   sftp:     bind_port: 2022 EOF # ========================================================= # Wings Ordner # ========================================================= mkdir -p /var/lib/pelican/volumes mkdir -p /var/lib/pelican/archives # ========================================================= # Wings Service # ========================================================= cat > /etc/systemd/system/wings.service <<EOF [Unit] Description=Pelican Wings Daemon After=docker.service Requires=docker.service [Service] User=root WorkingDirectory=/etc/pelican LimitNOFILE=4096 PIDFile=/var/run/wings/daemon.pid ExecStart=/usr/local/bin/wings Restart=on-failure StartLimitInterval=180 StartLimitBurst=30 RestartSec=5s [Install] WantedBy=multi-user.target EOF systemctl daemon-reload systemctl enable wings systemctl start wings # ========================================================= # Fertig # ========================================================= clear echo "==================================================" echo "        INSTALLATION ABGESCHLOSSEN" echo "==================================================" echo "" echo "Panel URL:" echo "https://${PANEL_DOMAIN}" echo "" echo "Wings Node:" echo "https://${NODE_DOMAIN}" echo "" echo "==================================================" echo "WICHTIG:" echo "==================================================" echo "" echo "1. Gehe ins Pelican Admin Panel" echo "2. Node erstellen" echo "3. Wings Konfiguration generieren" echo "4. Datei ersetzen:" echo "" echo "/etc/pelican/config.yml" echo "" echo "5. Danach:" echo "systemctl restart wings" echo "" echo "==================================================" echo "Services:" echo "==================================================" systemctl --no-pager status nginx systemctl --no-pager status mariadb systemctl --no-pager status redis-server systemctl --no-pager status pelican systemctl --no-pager status wings


Das war es auch schon wieder viel Spaß und gutes gelingen mit dem Pelican Webinterface.

LG

rumpel Wink At