Skip to content

Commit a33ca5c

Browse files
committed
feat: add game panel - pterodactyl
1 parent e5df8cf commit a33ca5c

4 files changed

Lines changed: 219 additions & 0 deletions

File tree

stacks/game-panel/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Game Panel Setup
2+
3+
## File Permissions
4+
5+
After deployment, set the correct permissions for log storage (bug in pterodactyl panel?):
6+
```sh
7+
chown -R nginx:nginx /app/storage/logs
8+
```
9+
10+
## Environment Configuration
11+
12+
Set the `APP_KEY` in your `.env` file. You can generate a secure key using one of the following commands:
13+
14+
```bash
15+
head -c 32 /dev/urandom | base64
16+
# or (PowerShell)
17+
[Convert]::ToBase64String((1..32 | ForEach-Object {Get-Random -Maximum 256}) -as [byte[]])
18+
```
19+
20+
## Create Admin User
21+
22+
To create an admin user, exec into the container and run:
23+
24+
```sh
25+
php artisan p:user:make --email=admin@domain.com --username=admin --name-first=admin --name-last=user --password=admin --admin=1 --no-password
26+
```
27+
28+
## Reverse Proxy Configuration
29+
30+
If using Nginx Proxy Manager (or another reverse proxy), configure the scheme for Wings as:
31+
32+
```
33+
http://wings:443
34+
```
35+
36+
Enable websocket support
37+
38+
39+
## Network Configuration
40+
41+
To configure a unique network for Wings, specify the following IPv4 and IPv6 settings:
42+
43+
**IPv4**
44+
- **Subnet:** `172.16.50.0/24`
45+
- **Gateway:** `172.16.50.1`
46+
47+
**IPv6**
48+
- **Subnet:** `fdd0:0:0:5::/64`
49+
- **Gateway:** `fdd0:0:0:5::1`
50+
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
services:
2+
# ██████╗ ████████╗███████╗██████╗ ██████╗ ██████╗ █████╗ ██████╗████████╗██╗ ██╗██╗
3+
# ██╔══██╗╚══██╔══╝██╔════╝██╔══██╗██╔═══██╗██╔══██╗██╔══██╗██╔════╝╚══██╔══╝╚██╗ ██╔╝██║
4+
# ██████╔╝ ██║ █████╗ ██████╔╝██║ ██║██║ ██║███████║██║ ██║ ╚████╔╝ ██║
5+
# ██╔═══╝ ██║ ██╔══╝ ██╔══██╗██║ ██║██║ ██║██╔══██║██║ ██║ ╚██╔╝ ██║
6+
# ██║ ██║ ███████╗██║ ██║╚██████╔╝██████╔╝██║ ██║╚██████╗ ██║ ██║ ███████╗
7+
# ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝
8+
ptero-panel:
9+
image: ghcr.io/pterodactyl/panel:latest
10+
container_name: pterodactyl-panel
11+
restart: always
12+
ports:
13+
- "980:80"
14+
volumes:
15+
- ${CONFIG_PATH}/pterodactyl/panel/var:/app/var/
16+
- ${CONFIG_PATH}/pterodactyl/panel/nginx:/etc/nginx/http.d/
17+
- ${CONFIG_PATH}/pterodactyl/panel/logs:/app/storage/logs
18+
environment:
19+
- APP_KEY=${PANEL_KEY}
20+
- APP_URL=${PANEL_URL}
21+
- APP_TIMEZONE=${TZ}
22+
- APP_SERVICE_AUTHOR=${PANEL_AUTHOR}
23+
24+
- DB_HOST=${DB_HOST}
25+
- DB_PORT=3306
26+
- DB_DATABASE=${DB_NAME}
27+
- DB_USERNAME=${DB_USER}
28+
- DB_PASSWORD=${DB_PASSWORD}
29+
30+
- CACHE_DRIVER=redis
31+
- SESSION_DRIVER=redis
32+
- QUEUE_DRIVER=redis
33+
- REDIS_HOST=${REDIS_HOST}
34+
- REDIS_PASSWORD=${REDIS_PASSWORD}
35+
- REDIS_PORT=6379
36+
37+
- TRUSTED_PROXIES= "*"
38+
- PTERODACTYL_TELEMETRY_ENABLED=False
39+
- RECAPTCHA_ENABLED=False
40+
- APP_ENVIRONMENT_ONLY=False
41+
- SUPERVISOR_HTTP_AUTH=False
42+
43+
# Mail Settings (Optional - configure if you want email notifications)
44+
# - MAIL_DRIVER=smtp
45+
# - MAIL_HOST=localhost
46+
# - MAIL_PORT=25
47+
# - MAIL_USERNAME=
48+
# - MAIL_PASSWORD=
49+
# - MAIL_ENCRYPTION=true
50+
# - MAIL_FROM=noreply@example.com
51+
# - MAIL_FROM_NAME=Pterodactyl Panel
52+
networks:
53+
- db_network
54+
- pterodactyl
55+
- proxy
56+
57+
# Pterodactyl Wings (Daemon)
58+
wings0:
59+
image: ghcr.io/pterodactyl/wings:latest
60+
container_name: pterodactyl-wings0
61+
restart: always
62+
privileged: true
63+
environment:
64+
- TZ=${TZ} # Fixed syntax error
65+
- WINGS_UID=${PUID}
66+
- WINGS_GID=${PGID}
67+
- WINGS_USERNAME=docker_pterodactyl
68+
volumes:
69+
# Pterodactyl temp directory - DO NOT CHANGE THIS
70+
- /tmp/pterodactyl/:/tmp/pterodactyl/
71+
72+
# Pterodactyl var directories - DO NOT CHANGE THESE
73+
- /var/lib/pterodactyl/:/var/lib/pterodactyl/
74+
- /var/log/pterodactyl/:/var/log/pterodactyl/
75+
76+
# Docker access (required for Wings) - DO NOT CHANGE THESE
77+
- /var/run/docker.sock:/var/run/docker.sock
78+
- /var/lib/docker/containers/:/var/lib/docker/containers/
79+
80+
# Wings persistent data on TrueNAS
81+
- ${CONFIG_PATH}/pterodactyl/wings/etc:/etc/pterodactyl/
82+
83+
# Optional: Large file storage (backups, archives) on HDD
84+
- ${MEDIA_HDD_PATH}/pterodactyl/backups:/var/lib/pterodactyl/backups/
85+
ports:
86+
- "2022:2022" # SFTP
87+
networks:
88+
- wings0
89+
- proxy
90+
91+
networks:
92+
pterodactyl:
93+
external: true
94+
driver: bridge
95+
name: pterodactyl
96+
wings0:
97+
external: true
98+
driver: bridge
99+
name: wings0
100+
ipam:
101+
config:
102+
- subnet: "172.16.50.0/24"
103+
db_network:
104+
external: true
105+
name: db_network
106+
proxy:
107+
external: true
108+
name: proxy
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
debug: false
2+
uuid: abcd1234-5678-90ab-cdef-1234567890ab # This UUID should be unique for each Wings instance. You get this from Config page inside Node in Pterodactyl Panel.
3+
token_id: abcdefghijklmnopqrs # This token_id should be unique for each Wings instance. You get this from Config page inside Node in Pterodactyl Panel.
4+
token: abcdefghijklmnopqrstuvwxyz1234567890 # This token should be unique and secure. You get this from Config page inside Node in Pterodactyl Panel.
5+
api:
6+
host: 0.0.0.0
7+
port: 443
8+
ssl:
9+
enabled: false
10+
cert: /etc/letsencrypt/live/wings0.yours.duckdns.org/fullchain.pem
11+
key: /etc/letsencrypt/live/wings0.yours.duckdns.org/privkey.pem
12+
upload_limit: 100
13+
system:
14+
data: /var/lib/pterodactyl/volumes
15+
sftp:
16+
bind_port: 2022
17+
allowed_mounts: []
18+
remote: 'https://ptero.yours.duckdns.org'
19+
docker:
20+
network:
21+
interface: 172.16.50.1
22+
dns:
23+
- 192.168.1.1 # Replace with your DNS server, e.g., your router or a public DNS like
24+
- 1.0.0.1 # cloudflare DNS
25+
name: wings0
26+
ispn: false
27+
driver: bridge
28+
network_mode: wings0
29+
is_internal: false
30+
enable_icc: true
31+
network_mtu: 9000 # Set to 9000 for Jumbo Frames, can drop to 1500 if you have issues
32+
interfaces:
33+
v4:
34+
subnet: 172.16.50.0/24
35+
gateway: 172.16.50.1
36+
v6:
37+
subnet: fdd0:0:0:5::/64
38+
gateway: fdd0:0:0:5::1
39+
allowed_mounts: []
40+
allowed_origins: []
41+
allow_cors_private_network: false
42+
ignore_panel_config_updates: false

stacks/game-panel/sample.env

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
CONFIG_PATH=
2+
MEDIA_SSD_PATH=
3+
MEDIA_HDD_PATH=
4+
PUID=100
5+
PGID=100
6+
7+
PANEL_KEY="base64:your_base64_encoded_key_here"
8+
PANEL_URL=https://ptero.yours.duckdns.org
9+
PANEL_AUTHOR=your.email@domain.com
10+
11+
DB_HOST=
12+
DB_USER=
13+
DB_PASSWORD=
14+
DB_NAME=ptero_db
15+
16+
REDIS_HOST=
17+
REDIS_PASSWORD=
18+
19+
TZ=UTC

0 commit comments

Comments
 (0)