Skip to content

Commit 5b91a77

Browse files
authored
New script: Pelican Panel (#2678)
1 parent 0aa13fb commit 5b91a77

File tree

3 files changed

+223
-0
lines changed

3 files changed

+223
-0
lines changed

ct/pelican-panel.sh

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#!/usr/bin/env bash
2+
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: bvdberg01
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/pelican-dev/panel
7+
8+
APP="Pelican-Panel"
9+
var_tags="Gaming"
10+
var_cpu="2"
11+
var_ram="1024"
12+
var_disk="4"
13+
var_os="debian"
14+
var_version="12"
15+
var_unprivileged="1"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
if [[ ! -d /opt/pelican-panel ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
RELEASE=$(curl -s https://api.github.com/repos/pelican-dev/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
31+
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
32+
msg_info "Stopping Service"
33+
cd /opt/pelican-panel
34+
$STD php artisan down
35+
msg_ok "Stopped Service"
36+
37+
msg_info "Updating ${APP} to v${RELEASE}"
38+
cp -r /opt/pelican-panel/.env /opt/
39+
rm -rf * .*
40+
wget -q "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz"
41+
tar -xzf "panel.tar.gz"
42+
mv /opt/.env /opt/pelican-panel/
43+
$STD composer install --no-dev --optimize-autoloader --no-interaction
44+
$STD php artisan p:environment:setup
45+
$STD php artisan view:clear
46+
$STD php artisan config:clear
47+
$STD php artisan filament:optimize
48+
$STD php artisan migrate --seed --force
49+
chown -R www-data:www-data /opt/pelican-panel
50+
chmod -R 755 /opt/pelican-panel/storage /opt/pelican-panel/bootstrap/cache/
51+
echo "${RELEASE}" >/opt/${APP}_version.txt
52+
msg_ok "Updated $APP to v${RELEASE}"
53+
54+
msg_info "Starting Service"
55+
$STD php artisan queue:restart
56+
$STD php artisan up
57+
msg_ok "Started Service"
58+
59+
msg_info "Cleaning up"
60+
rm -rf "/opt/pelican-panel/panel.tar.gz"
61+
msg_ok "Cleaned"
62+
msg_ok "Updated Successfully"
63+
else
64+
msg_ok "No update required. ${APP} is already at v${RELEASE}"
65+
fi
66+
exit
67+
}
68+
69+
start
70+
build_container
71+
description
72+
73+
msg_ok "Completed Successfully!\n"
74+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
75+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
76+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}/installer${CL}"

install/pelican-panel-install.sh

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: bvdberg01
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
7+
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
8+
color
9+
verb_ip6
10+
catch_errors
11+
setting_up_container
12+
network_check
13+
update_os
14+
15+
msg_info "Installing Dependencies"
16+
$STD apt-get install -y \
17+
curl \
18+
sudo \
19+
mc \
20+
lsb-release \
21+
mariadb-server \
22+
mariadb-client \
23+
apache2 \
24+
composer
25+
msg_ok "Installed Dependencies"
26+
27+
msg_info "Adding PHP8.3 Repository"
28+
$STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
29+
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
30+
$STD sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
31+
$STD apt-get update
32+
msg_ok "Added PHP8.3 Repository"
33+
34+
msg_info "Installing PHP"
35+
$STD apt-get remove -y php8.2*
36+
$STD apt-get install -y \
37+
php8.3 \
38+
php8.3-{gd,mysql,mbstring,bcmath,xml,curl,zip,intl,sqlite3,fpm} \
39+
libapache2-mod-php8.3
40+
msg_info "Installed PHP"
41+
42+
msg_info "Setting up MariaDB"
43+
DB_NAME=panel
44+
DB_USER=pelican
45+
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
46+
$STD mysql -u root -e "CREATE DATABASE $DB_NAME;"
47+
$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
48+
$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
49+
{
50+
echo "Pelican Panel-Credentials"
51+
echo "Pelican Panel Database User: $DB_USER"
52+
echo "Pelican Panel Database Password: $DB_PASS"
53+
echo "Pelican Panel Database Name: $DB_NAME"
54+
} >> ~/pelican-panel.creds
55+
msg_ok "Set up MariaDB"
56+
57+
msg_info "Installing Pelican Panel"
58+
RELEASE=$(curl -s https://api.github.com/repos/pelican-dev/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
59+
mkdir /opt/pelican-panel
60+
cd /opt/pelican-panel
61+
wget -q "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz"
62+
tar -xzf "panel.tar.gz"
63+
$STD composer install --no-dev --optimize-autoloader --no-interaction
64+
$STD php artisan p:environment:setup
65+
$STD php artisan p:environment:queue-service --no-interaction
66+
echo "* * * * * php /opt/pelican-panel/artisan schedule:run >> /dev/null 2>&1" | crontab -u www-data -
67+
chown -R www-data:www-data /opt/pelican-panel
68+
chmod -R 755 /opt/pelican-panel/storage /opt/pelican-panel/bootstrap/cache/
69+
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
70+
msg_ok "Installed Pelican Panel"
71+
72+
msg_info "Creating Service"
73+
cat <<EOF >/etc/apache2/sites-available/pelican.conf
74+
<VirtualHost *:80>
75+
ServerName pelican
76+
DocumentRoot /opt/pelican-panel/public
77+
AllowEncodedSlashes On
78+
php_value upload_max_filesize 100M
79+
php_value post_max_size 100M
80+
81+
<Directory /opt/pelican-panel/public>
82+
Options Indexes FollowSymLinks
83+
AllowOverride All
84+
Require all granted
85+
</Directory>
86+
87+
ErrorLog /var/log/apache2/pelican_error.log
88+
CustomLog /var/log/apache2/pelican_access.log combined
89+
</VirtualHost>
90+
EOF
91+
$STD a2ensite pelican
92+
$STD a2enmod rewrite
93+
$STD a2dissite 000-default.conf
94+
$STD systemctl reload apache2
95+
msg_ok "Created Service"
96+
97+
motd_ssh
98+
customize
99+
100+
msg_info "Cleaning up"
101+
rm -rf "/opt/pelican-panel/panel.tar.gz"
102+
$STD apt-get -y autoremove
103+
$STD apt-get -y autoclean
104+
msg_ok "Cleaned"

json/pelican-panel.json

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "Pelican Panel",
3+
"slug": "pelican-panel",
4+
"categories": [
5+
24
6+
],
7+
"date_created": "2025-02-26",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 80,
12+
"documentation": "https://pelican.dev/docs/panel/getting-started",
13+
"website": "https://pelican.dev/",
14+
"logo": "https://pelican.dev/img/logo.png",
15+
"description": "Pelican Panel is a web-based control panel for managing game and application servers. It provides an intuitive interface to start, stop, configure, and monitor servers easily. It works alongside Pelican Wings, a lightweight daemon that handles server deployments and resource management.",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/pelican-panel.sh",
20+
"resources": {
21+
"cpu": 2,
22+
"ram": 1024,
23+
"hdd": 4,
24+
"os": "Debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": null,
31+
"password": null
32+
},
33+
"notes": [
34+
{
35+
"text": "Database credentials: `cat ~/pelican-panel.creds`",
36+
"type": "info"
37+
},
38+
{
39+
"text": "Step 5 of the Panel installer can be skipped because it has already been set up by the script.",
40+
"type": "info"
41+
}
42+
]
43+
}

0 commit comments

Comments
 (0)