|
| 1 | +--- |
| 2 | +SPDX-License-Identifier: MIT |
| 3 | +path: "/tutorials/game-panel-pelican" |
| 4 | +slug: "game-panel-pelican" |
| 5 | +date: "2025-06-12" |
| 6 | +title: "Installing Pelican Panel on Ubuntu" |
| 7 | +short_description: "Set up Pelican Panel with PHP, MySQL, Docker, NGINX, and SSL on a server." |
| 8 | +tags: ["Ubuntu", "Pelican", "Game Server", "Docker", "NGINX"] |
| 9 | +author: "Philipp Bornträger" |
| 10 | +author_link: "https://github.com/PhilCode-creator" |
| 11 | +author_img: "https://avatars.githubusercontent.com/u/55019948" |
| 12 | +author_description: "" |
| 13 | +language: "en" |
| 14 | +available_languages: ["en"] |
| 15 | +header_img: "header-7" |
| 16 | +cta: "cloud" |
| 17 | +--- |
| 18 | + |
| 19 | +## Introduction |
| 20 | + |
| 21 | +⚠️ **Note:** This tutorial only installs the **web interface** of Pelican Panel. |
| 22 | +To provision and manage actual game servers, you **must also install [Wings](https://pelican.dev/docs/wings/install)** on your target machines. |
| 23 | + |
| 24 | +Pelican Panel is a modern, open-source game server management panel designed for containerized environments. Built with Laravel and Docker, it provides a powerful web interface for deploying and managing game servers. |
| 25 | + |
| 26 | +This guide explains how to install and configure Pelican Panel on a server running Ubuntu 24.04. |
| 27 | + |
| 28 | +**Prerequisites** |
| 29 | + |
| 30 | +* A server with Ubuntu 24.04 |
| 31 | +* Root or sudo privileges |
| 32 | +* A registered domain name pointing to the server’s IP address |
| 33 | +* Basic familiarity with Linux command-line operations |
| 34 | + |
| 35 | +**Example terminology** |
| 36 | + |
| 37 | +* Username: `holu` |
| 38 | +* Domain: `example.com` |
| 39 | + |
| 40 | +## Step 1 - Update the System |
| 41 | + |
| 42 | +Start by updating your package index and upgrading any existing packages: |
| 43 | + |
| 44 | +```bash |
| 45 | +sudo apt update && sudo apt upgrade -y |
| 46 | +``` |
| 47 | + |
| 48 | +This ensures compatibility and applies security patches. |
| 49 | + |
| 50 | +## Step 2 - Install Required Software |
| 51 | + |
| 52 | +* **Add the PHP Repository** |
| 53 | + |
| 54 | + Add the `ondrej/php` PPA to access PHP 8.2 and related extensions: |
| 55 | + ```bash |
| 56 | + sudo add-apt-repository ppa:ondrej/php -y |
| 57 | + sudo apt update |
| 58 | + ``` |
| 59 | + |
| 60 | +<br> |
| 61 | + |
| 62 | +* **Install Required Packages** |
| 63 | + |
| 64 | + Install NGINX, MySQL, PHP 8.2, and supporting modules required by Laravel: |
| 65 | + ```bash |
| 66 | + sudo apt install -y \ |
| 67 | + nginx mysql-server sqlite3 \ |
| 68 | + php8.2 php8.2-cli php8.2-common php8.2-mysql php8.2-sqlite3 php8.2-fpm \ |
| 69 | + php8.2-mbstring php8.2-xml php8.2-bcmath php8.2-curl php8.2-zip php8.2-gd php8.2-intl \ |
| 70 | + curl git unzip software-properties-common |
| 71 | + ``` |
| 72 | + |
| 73 | +## Step 3 - Configure MySQL |
| 74 | + |
| 75 | +Secure the database server: |
| 76 | + |
| 77 | +```bash |
| 78 | +sudo mysql_secure_installation |
| 79 | +``` |
| 80 | + |
| 81 | +Then create a database and user for Pelican: |
| 82 | + |
| 83 | +```bash |
| 84 | +sudo mysql -u root -p |
| 85 | +``` |
| 86 | + |
| 87 | +Inside the MySQL shell: |
| 88 | + |
| 89 | +> Replace `YourSecurePassword` with a strong, unique password. You can generate one using `openssl rand -base64 20`. |
| 90 | +
|
| 91 | +```sql |
| 92 | +CREATE DATABASE pelican; |
| 93 | +CREATE USER 'pelicanuser'@'localhost' IDENTIFIED BY 'YourSecurePassword'; |
| 94 | +GRANT ALL PRIVILEGES ON pelican.* TO 'pelicanuser'@'localhost'; |
| 95 | +FLUSH PRIVILEGES; |
| 96 | +EXIT; |
| 97 | +``` |
| 98 | + |
| 99 | +## Step 4 - Install Docker |
| 100 | + |
| 101 | +Pelican uses Docker to isolate game environments. Install Docker Engine and its dependencies as explained in the official Docker documentation: |
| 102 | + |
| 103 | +* [Install Docker Engine on Ubuntu](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository) |
| 104 | + |
| 105 | +Enable and start the Docker service: |
| 106 | + |
| 107 | +```bash |
| 108 | +sudo systemctl enable docker |
| 109 | +sudo systemctl start docker |
| 110 | +``` |
| 111 | + |
| 112 | +Optionally, add your user to the Docker group: |
| 113 | + |
| 114 | +> Replace `holu` with your actual username. |
| 115 | +
|
| 116 | +```bash |
| 117 | +sudo usermod -aG docker holu |
| 118 | +``` |
| 119 | + |
| 120 | +You may need to log out and back in for changes to take effect. |
| 121 | + |
| 122 | +## Step 5 - Install Composer |
| 123 | + |
| 124 | +Composer is used to manage PHP dependencies. Install it globally: |
| 125 | + |
| 126 | +```bash |
| 127 | +curl -sS https://getcomposer.org/installer | php |
| 128 | +sudo mv composer.phar /usr/local/bin/composer |
| 129 | +``` |
| 130 | + |
| 131 | +## Step 6 - Download and Install Pelican Panel |
| 132 | + |
| 133 | +Create a directory and extract the panel files: |
| 134 | + |
| 135 | +```bash |
| 136 | +sudo mkdir -p /var/www/pelican |
| 137 | +cd /var/www/pelican |
| 138 | +curl -L https://github.com/pelican-dev/panel/releases/latest/download/panel.tar.gz | sudo tar -xzv |
| 139 | +``` |
| 140 | + |
| 141 | +Install PHP dependencies: |
| 142 | + |
| 143 | +```bash |
| 144 | +sudo chown -R $USER:www-data /var/www/pelican |
| 145 | +sudo chmod -R 775 /var/www/pelican |
| 146 | +composer install --no-dev --optimize-autoloader |
| 147 | +``` |
| 148 | + |
| 149 | +## Step 7 - Configure the Application |
| 150 | + |
| 151 | +Pelican provides an setup command: |
| 152 | + |
| 153 | +```bash |
| 154 | +php artisan p:environment:setup |
| 155 | +``` |
| 156 | + |
| 157 | +## Step 8 - Set Permissions |
| 158 | + |
| 159 | +Ensure proper ownership and access permissions for Laravel to function correctly: |
| 160 | + |
| 161 | +```bash |
| 162 | +sudo chown -R www-data:www-data /var/www/pelican |
| 163 | +sudo chmod -R 755 /var/www/pelican/storage /var/www/pelican/bootstrap/cache |
| 164 | +``` |
| 165 | + |
| 166 | +Secure the environment file: |
| 167 | + |
| 168 | +```bash |
| 169 | +sudo chmod 640 /var/www/pelican/.env |
| 170 | +``` |
| 171 | + |
| 172 | +## Step 9 - Configure SSL with Certbot |
| 173 | + |
| 174 | +Install Certbot via Snap to enable HTTPS: |
| 175 | + |
| 176 | +```bash |
| 177 | +sudo apt install snapd -y |
| 178 | +sudo snap install core |
| 179 | +sudo snap refresh core |
| 180 | +sudo snap install --classic certbot |
| 181 | +sudo ln -s /snap/bin/certbot /usr/bin/certbot |
| 182 | +``` |
| 183 | + |
| 184 | +Obtain an SSL certificate for your domain: |
| 185 | + |
| 186 | +```bash |
| 187 | +sudo certbot --nginx -d example.com |
| 188 | +``` |
| 189 | + |
| 190 | +Enable automatic certificate renewal: |
| 191 | + |
| 192 | +```bash |
| 193 | +sudo systemctl enable snap.certbot.renew.timer |
| 194 | +sudo certbot renew --dry-run |
| 195 | +``` |
| 196 | + |
| 197 | +## Step 10 - Configure NGINX |
| 198 | + |
| 199 | +Remove the default configuration: |
| 200 | + |
| 201 | +```bash |
| 202 | +sudo rm /etc/nginx/sites-enabled/default |
| 203 | +``` |
| 204 | + |
| 205 | +Create a new configuration file: |
| 206 | + |
| 207 | +```bash |
| 208 | +sudo nano /etc/nginx/sites-available/pelican.conf |
| 209 | +``` |
| 210 | + |
| 211 | +Paste the following, replacing `example.com` accordingly: |
| 212 | + |
| 213 | +```nginx |
| 214 | +server { |
| 215 | + listen 80; |
| 216 | + server_name example.com; |
| 217 | + return 301 https://$host$request_uri; |
| 218 | +} |
| 219 | +
|
| 220 | +server { |
| 221 | + listen 443 ssl; |
| 222 | + server_name example.com; |
| 223 | +
|
| 224 | + root /var/www/pelican/public; |
| 225 | + index index.php; |
| 226 | +
|
| 227 | + ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; |
| 228 | + ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; |
| 229 | +
|
| 230 | + location / { |
| 231 | + try_files $uri $uri/ /index.php?$query_string; |
| 232 | + } |
| 233 | +
|
| 234 | + location ~ \.php$ { |
| 235 | + include snippets/fastcgi-php.conf; |
| 236 | + fastcgi_pass unix:/run/php/php8.2-fpm.sock; |
| 237 | + } |
| 238 | +
|
| 239 | + location ~ /\.ht { |
| 240 | + deny all; |
| 241 | + } |
| 242 | +} |
| 243 | +``` |
| 244 | + |
| 245 | +Enable the site and restart NGINX: |
| 246 | + |
| 247 | +```bash |
| 248 | +sudo ln -s /etc/nginx/sites-available/pelican.conf /etc/nginx/sites-enabled/ |
| 249 | +sudo nginx -t |
| 250 | +sudo systemctl restart nginx |
| 251 | +``` |
| 252 | + |
| 253 | +## Step 11 - Complete the Web Installer |
| 254 | + |
| 255 | +Navigate to your domain in a browser: |
| 256 | + |
| 257 | +``` |
| 258 | +https://example.com/installer |
| 259 | +``` |
| 260 | + |
| 261 | +Follow the on-screen prompts to create an administrator account and complete the setup. |
| 262 | + |
| 263 | +When it asks about the database information, use the information from step 3. In this example, we used: |
| 264 | + |
| 265 | +* Database Driver: MySQL |
| 266 | +* Database Name: pelican |
| 267 | +* Database Username: pelicanuser |
| 268 | +* Database Password: YourSecurePassword' |
| 269 | + |
| 270 | +## Conclusion |
| 271 | + |
| 272 | +* Ensure the following services are active and enabled: |
| 273 | + |
| 274 | + ```bash |
| 275 | + sudo systemctl status nginx |
| 276 | + sudo systemctl status php8.2-fpm |
| 277 | + sudo systemctl status docker |
| 278 | + ``` |
| 279 | + |
| 280 | +* Consider securing your server with UFW: |
| 281 | + |
| 282 | + ```bash |
| 283 | + sudo apt install ufw |
| 284 | + sudo ufw allow OpenSSH |
| 285 | + sudo ufw allow 'Nginx Full' |
| 286 | + sudo ufw enable |
| 287 | + ``` |
| 288 | + |
| 289 | +* Keep your system and Pelican Panel updated to receive security patches and new features. |
| 290 | + |
| 291 | +#### References |
| 292 | + |
| 293 | +* [Pelican Panel Documentation](https://pelican.dev/docs) |
| 294 | +* [Certbot Documentation](https://certbot.eff.org/) |
| 295 | + |
| 296 | +##### License: MIT |
| 297 | + |
| 298 | +<!-- |
| 299 | +
|
| 300 | +Contributor's Certificate of Origin |
| 301 | +
|
| 302 | +By making a contribution to this project, I certify that: |
| 303 | +
|
| 304 | +(a) The contribution was created in whole or in part by me and I have |
| 305 | + the right to submit it under the license indicated in the file; or |
| 306 | +
|
| 307 | +(b) The contribution is based upon previous work that, to the best of my |
| 308 | + knowledge, is covered under an appropriate license and I have the |
| 309 | + right under that license to submit that work with modifications, |
| 310 | + whether created in whole or in part by me, under the same license |
| 311 | + (unless I am permitted to submit under a different license), as |
| 312 | + indicated in the file; or |
| 313 | +
|
| 314 | +(c) The contribution was provided directly to me by some other person |
| 315 | + who certified (a), (b) or (c) and I have not modified it. |
| 316 | +
|
| 317 | +(d) I understand and agree that this project and the contribution are |
| 318 | + public and that a record of the contribution (including all personal |
| 319 | + information I submit with it, including my sign-off) is maintained |
| 320 | + indefinitely and may be redistributed consistent with this project |
| 321 | + or the license(s) involved. |
| 322 | +
|
| 323 | +Signed-off-by: Philipp Bornträger <heydraundphilipp@gmail.com> |
| 324 | +
|
| 325 | +--> |
0 commit comments