Last active 4 weeks ago

Revision 36e84777129295baeb6179aa12baa8a477d9ee2f

pterodactyl install guide.txt Raw
1╔══════════════════════════════════════════════════════════════════╗
2║ PTERODACTYL PANEL & WINGS INSTALLATION GUIDE ║
3║ Complete Step-by-Step Walkthrough ║
4╚══════════════════════════════════════════════════════════════════╝
5
6┌─────────────────────────────────────────────────────────────────┐
7│ STEP 1: START THE INSTALLATION │
8└─────────────────────────────────────────────────────────────────┘
9
10 Run this command as root:
11
12 # bash <(curl -s https://pterodactyl-installer.se)
13
14
15┌─────────────────────────────────────────────────────────────────┐
16│ STEP 2: SELECT INSTALLATION TYPE │
17└─────────────────────────────────────────────────────────────────┘
18
19 ┌─────────────────────────────────────────────────────────────┐
20 │ Which version of Pterodactyl do you want to install? │
21 │ 1) Panel │
22 │ 2) Wings │
23 │ 3) Both (Panel & Wings) │
24 └─────────────────────────────────────────────────────────────┘
25
26 >>> SELECT: 3 (BOTH)
27 > Type "3" and press ENTER
28
29
30┌─────────────────────────────────────────────────────────────────┐
31│ STEP 3: CONFIRM INSTALLATION │
32└─────────────────────────────────────────────────────────────────┘
33
34 ┌─────────────────────────────────────────────────────────────┐
35 │ * Are you sure you want to continue? (y/N): │
36 └─────────────────────────────────────────────────────────────┘
37
38 >>> SELECT: y (YES)
39 > Type "y" and press ENTER
40
41
42┌─────────────────────────────────────────────────────────────────┐
43│ STEP 4: DATABASE CONFIGURATION │
44└─────────────────────────────────────────────────────────────────┘
45
46 ┌─────────────────────────────────────────────────────────────┐
47 │ * Do you want to automatically configure the database? │
48 │ (y/N): │
49 └─────────────────────────────────────────────────────────────┘
50
51 >>> SELECT: y (YES)
52 > Type "y" and press ENTER
53
54
55┌─────────────────────────────────────────────────────────────────┐
56│ STEP 5: DATABASE USERNAME & PASSWORD │
57└─────────────────────────────────────────────────────────────────┘
58
59 ┌─────────────────────────────────────────────────────────────┐
60 │ * Database host username (pterodactyluser): │
61 └─────────────────────────────────────────────────────────────┘
62
63 >>> LEAVE BLANK: Press ENTER (uses default)
64
65 ┌─────────────────────────────────────────────────────────────┐
66 │ * Database host password: │
67 └─────────────────────────────────────────────────────────────┘
68
69 >>> IMPORTANT! Type a strong password (write it down!)
70 > Example: MyStr0ngP@ssw0rd!2026
71 > Press ENTER after typing
72
73
74┌─────────────────────────────────────────────────────────────────┐
75│ STEP 6: MYSQL EXTERNAL ACCESS │
76└─────────────────────────────────────────────────────────────────┘
77
78 ┌─────────────────────────────────────────────────────────────┐
79 │ * Do you want to configure MySQL to be accessed │
80 │ externally? (y/N): │
81 └─────────────────────────────────────────────────────────────┘
82
83 >>> SELECT: n (NO)
84 > Type "n" and press ENTER
85
86
87┌─────────────────────────────────────────────────────────────────┐
88│ STEP 7: EMAIL CONFIGURATION │
89└─────────────────────────────────────────────────────────────────┘
90
91 ┌─────────────────────────────────────────────────────────────┐
92 │ * Enter your email address for the panel: │
93 └─────────────────────────────────────────────────────────────┘
94
95 >>> Type your email: admin@example.com
96 > Press ENTER
97
98 ┌─────────────────────────────────────────────────────────────┐
99 │ * Enter your company/panel name: │
100 └─────────────────────────────────────────────────────────────┘
101
102 >>> Type a name: My Game Panel
103 > Or leave blank: Press ENTER
104
105
106┌─────────────────────────────────────────────────────────────────┐
107│ STEP 8: CREATE ADMIN USER │
108└─────────────────────────────────────────────────────────────────┘
109
110 ┌─────────────────────────────────────────────────────────────┐
111 │ * Would you like to create an admin user? (y/N): │
112 └─────────────────────────────────────────────────────────────┘
113
114 >>> SELECT: y (YES)
115 > Type "y" and press ENTER
116
117 ┌─────────────────────────────────────────────────────────────┐
118 │ * Enter your email address: │
119 └─────────────────────────────────────────────────────────────┘
120
121 >>> Type your admin email: admin@example.com
122
123 ┌─────────────────────────────────────────────────────────────┐
124 │ * Enter your username: │
125 └─────────────────────────────────────────────────────────────┘
126
127 >>> Type your username: admin
128
129 ┌─────────────────────────────────────────────────────────────┐
130 │ * Enter your first name: │
131 └─────────────────────────────────────────────────────────────┘
132
133 >>> Type your first name: John
134
135 ┌─────────────────────────────────────────────────────────────┐
136 │ * Enter your last name: │
137 └─────────────────────────────────────────────────────────────┘
138
139 >>> Type your last name: Doe
140
141 ┌─────────────────────────────────────────────────────────────┐
142 │ * Enter your password: │
143 └─────────────────────────────────────────────────────────────┘
144
145 >>> IMPORTANT! Type a strong password (write it down!)
146 > Example: Admin@2026#Secure!
147 > Press ENTER
148
149
150┌─────────────────────────────────────────────────────────────────┐
151│ STEP 9: SSL CONFIGURATION (PANEL) │
152└─────────────────────────────────────────────────────────────────┘
153
154 ┌─────────────────────────────────────────────────────────────┐
155 │ * Do you want to use Let's Encrypt SSL? (y/N): │
156 └─────────────────────────────────────────────────────────────┘
157
158 +------------------------------------------------------------------+
159 | IF YOU HAVE A DOMAIN NAME: |
160 | SELECT: y (YES) |
161 | Then enter your domain: panel.example.com |
162 | |
163 | IF YOU ONLY HAVE AN IP ADDRESS (NO DOMAIN): |
164 | SELECT: n (NO) |
165 | The panel will use HTTP (port 80) |
166 | |
167 | IF USING REVERSE PROXY (Nginx/Apache as proxy): |
168 | SELECT: n (NO) |
169 | We'll configure SSL later in Nginx |
170 +------------------------------------------------------------------+
171
172 >>> Choose based on your setup
173 > Type "y" or "n" and press ENTER
174
175
176┌─────────────────────────────────────────────────────────────────┐
177│ STEP 10: WINGS CONFIGURATION (UFW FIREWALL) │
178└─────────────────────────────────────────────────────────────────┘
179
180 ┌─────────────────────────────────────────────────────────────┐
181 │ * Do you want to automatically configure UFW (firewall)? │
182 │ (y/N): │
183 └─────────────────────────────────────────────────────────────┘
184
185 >>> SELECT: y (YES) - Recommended!
186 > Type "y" and press ENTER
187
188
189┌─────────────────────────────────────────────────────────────────┐
190│ STEP 11: DATABASE USER FOR WINGS │
191└─────────────────────────────────────────────────────────────────┘
192
193 ┌─────────────────────────────────────────────────────────────┐
194 │ * Do you want to configure a user for database hosts? │
195 │ (y/N): │
196 └─────────────────────────────────────────────────────────────┘
197
198 >>> SELECT: y (YES)
199 > Type "y" and press ENTER
200
201 ┌─────────────────────────────────────────────────────────────┐
202 │ * Database host username (pterodactyluser): │
203 └─────────────────────────────────────────────────────────────┘
204
205 >>> LEAVE BLANK: Press ENTER
206
207 ┌─────────────────────────────────────────────────────────────┐
208 │ * Database host password: │
209 └─────────────────────────────────────────────────────────────┘
210
211 >>> Type a password (write it down!)
212 > Example: WingsDB@2026#Strong!
213 > Press ENTER
214
215 ┌─────────────────────────────────────────────────────────────┐
216 │ * Do you want to configure MySQL to be accessed externally? │
217 │ (y/N): │
218 └─────────────────────────────────────────────────────────────┘
219
220 >>> SELECT: n (NO)
221 > Type "n" and press ENTER
222
223
224┌─────────────────────────────────────────────────────────────────┐
225│ STEP 12: SSL FOR WINGS │
226└─────────────────────────────────────────────────────────────────┘
227
228 ┌─────────────────────────────────────────────────────────────┐
229 │ * Do you want to automatically configure HTTPS using │
230 │ Let's Encrypt? (y/N): │
231 └─────────────────────────────────────────────────────────────┘
232
233 +------------------------------------------------------------------+
234 | IF YOU HAVE A DOMAIN AND WANT SSL DIRECTLY: |
235 | SELECT: y (YES) |
236 | |
237 | IF USING REVERSE PROXY OR IP ONLY: |
238 | SELECT: n (NO) |
239 | We'll configure SSL via reverse proxy later |
240 +------------------------------------------------------------------+
241
242 >>> SELECT: n (NO) - if using reverse proxy
243 > Type "n" and press ENTER
244
245
246┌─────────────────────────────────────────────────────────────────┐
247│ STEP 13: FINAL CONFIRMATION │
248└─────────────────────────────────────────────────────────────────┘
249
250 ┌─────────────────────────────────────────────────────────────┐
251 │ * Proceed with installation? (y/N): │
252 └─────────────────────────────────────────────────────────────┘
253
254 >>> SELECT: y (YES)
255 > Type "y" and press ENTER
256 > Wait for installation to complete (2-5 minutes)
257
258
259+------------------------------------------------------------------+
260| INSTALLATION COMPLETE! |
261| |
262| Your Pterodactyl Panel is now installed! |
263| |
264| Access your panel at: |
265| http://YOUR_SERVER_IP |
266| or |
267| https://YOUR_DOMAIN (if SSL enabled) |
268| |
269| Login with: |
270| Email: [your admin email] |
271| Password: [your admin password] |
272| |
273| IMPORTANT: Your Wings still needs to be configured! |
274| 1. Log into the panel |
275| 2. Go to Admin -> Nodes -> Create New |
276| 3. Generate the configuration file |
277| 4. Copy it to /etc/pterodactyl/config.yml |
278| 5. Run: systemctl start wings |
279+------------------------------------------------------------------+
280
281
282┌─────────────────────────────────────────────────────────────────┐
283│ QUICK REFERENCE SHEET │
284└─────────────────────────────────────────────────────────────────┘
285
286 +--------------+-------------+----------------------------------+
287 | QUESTION | ANSWER | REASON |
288 +--------------+-------------+----------------------------------+
289 | Panel/Wings | 3 (Both) | Install everything at once |
290 | Continue? | y | Start installation |
291 | Auto DB? | y | Let script handle DB |
292 | DB username | [ENTER] | Use default |
293 | DB password | [TYPE] | Strong password (save it) |
294 | MySQL ext | n | No external access needed |
295 | Admin user? | y | Create admin account |
296 | Let's Encrypt| n or y | n = IP/proxy, y = domain |
297 | Configure | y | Auto open firewall ports |
298 | UFW? | | |
299 | Wings DB | y | Create DB user for Wings |
300 | Wings SSL | n | n = proxy, y = direct |
301 +--------------+-------------+----------------------------------+
302
303
304┌─────────────────────────────────────────────────────────────────┐
305│ FIREWALL PORTS TO OPEN │
306└─────────────────────────────────────────────────────────────────┘
307
308 +-------------------------------------------------------------+
309 | Port 80 - HTTP (Web Panel) |
310 | Port 443 - HTTPS (Web Panel) - if SSL enabled |
311 | Port 8080 - Wings WebSocket (Server communication) |
312 | Port 2022 - SFTP (File transfer for servers) |
313 +-------------------------------------------------------------+
314
315
316┌─────────────────────────────────────────────────────────────────┐
317│ COMMON ERRORS & SOLUTIONS │
318└─────────────────────────────────────────────────────────────────┘
319
320 ERROR: "No application encryption key has been specified"
321 --------------------------------------------------------------
322 SOLUTION: php /var/www/pterodactyl/artisan key:generate --force
323
324 ERROR: "Unknown database 'panel'"
325 --------------------------------------------------------------
326 SOLUTION: mysql -u root -p -e "CREATE DATABASE panel;"
327
328 ERROR: "Connection refused" on Wings
329 --------------------------------------------------------------
330 SOLUTION: Check if port 8080 is open: netstat -tlnp | grep 8080
331 Also check: systemctl status wings
332
333 ERROR: "403 Forbidden" on panel
334 --------------------------------------------------------------
335 SOLUTION: chown -R www-data:www-data /var/www/pterodactyl/storage
336 chmod -R 755 /var/www/pterodactyl/storage
337
338 ERROR: "502 Bad Gateway" on panel
339 --------------------------------------------------------------
340 SOLUTION: systemctl restart php8.2-fpm
341 systemctl restart nginx
342
343 ERROR: "allowed_origins" missing in Wings config
344 --------------------------------------------------------------
345 SOLUTION: Add to /etc/pterodactyl/config.yml:
346 allowed_origins:
347 - https://your-domain.com
348
349 ERROR: Panel shows "500 Internal Server Error"
350 --------------------------------------------------------------
351 SOLUTION: Check logs: tail -f /var/www/pterodactyl/storage/logs/*.log
352 Clear cache: php /var/www/pterodactyl/artisan config:clear
353
354
355┌─────────────────────────────────────────────────────────────────┐
356│ POST-INSTALLATION: WINGS SETUP │
357└─────────────────────────────────────────────────────────────────┘
358
359 1. Login to panel: http://YOUR_SERVER_IP
360
361 2. Go to: Admin -> Nodes -> Create New
362
363 3. Fill in:
364 * Name: Main Node
365 * Description: (optional)
366 * Location: (optional)
367 * Allow Automatic Allocation: Yes
368 * FQDN: YOUR_SERVER_IP or domain
369 * Daemon Port: 443 (or 8080 if using proxy)
370 * Communicate over SSL: Yes (if using SSL)
371 * Behind Proxy: Yes (if using reverse proxy)
372 * Public: Yes
373
374 4. After creating, click on the node -> Configuration
375
376 5. Copy the configuration code and:
377 - If using reverse proxy: change port 443 to 8080
378 - If using direct SSL: keep port 443
379
380 6. Add allowed_origins after allowed_mounts:
381 allowed_mounts: []
382 allowed_origins:
383 - https://your-domain.com
384 - https://panel.your-domain.com
385
386 7. Save to: /etc/pterodactyl/config.yml
387
388 8. Start Wings:
389 systemctl start wings
390 systemctl enable wings
391
392
393┌─────────────────────────────────────────────────────────────────┐
394│ NGINX REVERSE PROXY EXAMPLE CFG │
395│ (For Panel + Wings Behind Proxy) │
396└─────────────────────────────────────────────────────────────────┘
397
398 upstream pterodactyl {
399 server 127.0.0.1:80; # Panel port
400 }
401
402 upstream pterodactyl_ws {
403 server 127.0.0.1:8080; # Wings WebSocket port
404 }
405
406 server {
407 listen 80;
408 server_name panel.your-domain.com;
409 return 301 https://$server_name$request_uri;
410 }
411
412 server {
413 listen 443 ssl http2;
414 server_name panel.your-domain.com;
415
416 ssl_certificate /etc/letsencrypt/live/panel.your-domain.com/fullchain.pem;
417 ssl_certificate_key /etc/letsencrypt/live/panel.your-domain.com/privkey.pem;
418 include /etc/letsencrypt/options-ssl-nginx.conf;
419 ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
420
421 client_max_body_size 10G;
422
423 # WebSocket connections
424 location = /api/system {
425 proxy_pass http://pterodactyl_ws;
426 proxy_http_version 1.1;
427 proxy_set_header Upgrade $http_upgrade;
428 proxy_set_header Connection "upgrade";
429 proxy_set_header Host $host;
430 proxy_set_header X-Real-IP $remote_addr;
431 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
432 proxy_set_header X-Forwarded-Proto https;
433 proxy_set_header Origin https://panel.your-domain.com;
434 proxy_buffering off;
435 }
436
437 # File uploads/downloads
438 location /upload/ {
439 proxy_pass http://pterodactyl_ws;
440 proxy_http_version 1.1;
441 proxy_set_header Host $host;
442 proxy_set_header X-Real-IP $remote_addr;
443 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
444 proxy_set_header X-Forwarded-Proto https;
445 proxy_set_header Origin https://panel.your-domain.com;
446 client_max_body_size 10G;
447 }
448
449 location /download/ {
450 proxy_pass http://pterodactyl_ws;
451 proxy_http_version 1.1;
452 proxy_set_header Host $host;
453 proxy_set_header X-Real-IP $remote_addr;
454 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
455 proxy_set_header X-Forwarded-Proto https;
456 proxy_set_header Origin https://panel.your-domain.com;
457 proxy_buffering off;
458 }
459
460 # API endpoints with WebSocket
461 location ~ ^/api/servers {
462 proxy_pass http://pterodactyl_ws;
463 proxy_http_version 1.1;
464 proxy_set_header Upgrade $http_upgrade;
465 proxy_set_header Connection "upgrade";
466 proxy_set_header Host $host;
467 proxy_set_header X-Real-IP $remote_addr;
468 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
469 proxy_set_header X-Forwarded-Proto https;
470 proxy_set_header Origin https://panel.your-domain.com;
471 proxy_read_timeout 3600s;
472 proxy_send_timeout 3600s;
473 proxy_buffering off;
474 }
475
476 # Main panel
477 location / {
478 proxy_pass http://pterodactyl;
479 proxy_set_header Host $host;
480 proxy_set_header X-Real-IP $remote_addr;
481 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
482 proxy_set_header X-Forwarded-Proto https;
483 }
484 }
485
486
487┌─────────────────────────────────────────────────────────────────┐
488│ TROUBLESHOOTING COMMANDS │
489└─────────────────────────────────────────────────────────────────┘
490
491 # Check panel status
492 systemctl status nginx
493 systemctl status php8.2-fpm
494
495 # Check wings status
496 systemctl status wings
497
498 # View panel logs
499 tail -f /var/www/pterodactyl/storage/logs/laravel-*.log
500
501 # View wings logs
502 journalctl -u wings -f
503
504 # Restart panel services
505 systemctl restart nginx php8.2-fpm
506
507 # Restart wings
508 systemctl restart wings
509
510 # Generate application key (if needed)
511 php /var/www/pterodactyl/artisan key:generate --force
512
513 # Clear cache
514 php /var/www/pterodactyl/artisan config:clear
515 php /var/www/pterodactyl/artisan cache:clear
516 php /var/www/pterodactyl/artisan view:clear
517
518 # Check MySQL status
519 systemctl status mysql
520 mysql -u root -p -e "SHOW DATABASES;"
521
522 # Check open ports
523 netstat -tlnp | grep -E ':80|:443|:8080|:2022'
524
525 # Check if Wings can connect to panel
526 curl -I https://panel.your-domain.com
527
528
529┌─────────────────────────────────────────────────────────────────┐
530│ BACKUP COMMANDS │
531└─────────────────────────────────────────────────────────────────┘
532
533 # Backup panel files
534 tar -czf /root/panel_backup_$(date +%Y%m%d).tar.gz /var/www/pterodactyl
535
536 # Backup database
537 mysqldump -u root -p panel > /root/panel_db_backup_$(date +%Y%m%d).sql
538
539 # Backup Wings config
540 cp /etc/pterodactyl/config.yml /root/config.yml.backup
541
542 # Backup Nginx config
543 cp -r /etc/nginx/sites-available /root/nginx_backup/
544
545 # Restore database
546 mysql -u root -p panel < /root/panel_db_backup_YYYYMMDD.sql
547
548
549┌─────────────────────────────────────────────────────────────────┐
550│ SECURITY RECOMMENDATIONS │
551└─────────────────────────────────────────────────────────────────┘
552
553 [1] Change default admin password after first login
554 [2] Enable 2FA for admin accounts
555 [3] Use HTTPS with valid SSL certificates (Let's Encrypt)
556 [4] Regular backups: .env, database, Wings config
557 [5] Update regularly: apt update && apt upgrade
558 [6] Monitor logs: /var/www/pterodactyl/storage/logs/
559 [7] Set up fail2ban to protect SSH and panel
560 [8] Use strong passwords (min 12 chars, mix of chars)
561 [9] Limit SSH access: edit /etc/ssh/sshd_config
562 [10] Disable root login: PermitRootLogin no
563 [11] Use firewall: ufw enable (if not already)
564 [12] Change default MySQL port (3306) if exposed externally
565
566
567┌─────────────────────────────────────────────────────────────────┐
568│ IMPORTANT NOTES │
569└─────────────────────────────────────────────────────────────────┘
570
571 [*] SAVE ALL PASSWORDS: Panel DB, Admin user, Wings DB
572
573 [*] Wait for migrations to complete (may take 2-5 minutes)
574
575 [*] If using IP instead of domain, you'll see a security warning
576 (This is normal, just proceed)
577
578 [*] For production, always use a domain with SSL certificates
579
580 [*] Backup /var/www/pterodactyl/.env file after installation
581
582 [*] Keep your panel and Wings versions in sync
583
584 [*] Monitor disk space - server files can grow quickly!
585
586 [*] Use separate database for each server if hosting many nodes
587
588
589+------------------------------------------------------------------+
590| INSTALLATION SUCCESS! |
591| |
592| Your Pterodactyl Panel is now ready for use! |
593| |
594| Documentation: https://pterodactyl.io/docs |
595| |
596| Next steps: |
597| 1. Configure Wings (see post-installation) |
598| 2. Set up your first game server |
599| 3. Configure email notifications |
600| 4. Set up regular backups |
601| 5. Monitor performance |
602+------------------------------------------------------------------+