A guide to setup Pterodactyl on TrueNAS SCALE
I tried including everything I could think I had to do to get this up and running, I haven't got any database hosts running yet so this guide only contains what I have currently.
Version: TrueNAS-SCALE-24.10-RC.2
Created: 26/11/2023
Last updated: 08/10/2024
Network interface is setup with a bridge configuration
Reverse proxy
Wildcard SSL Cert
Domain name
Field
Value
Domain
play.<domain name>
Record Type
A
Destination
IP address
Field
Value
Domain
panel.<domain name>
Record Type
CNAME
Destination
Reverse proxy
Create a dataset called jailmaker
Navigate to the TrueNAS Scale shell
Login as root sudo su
Navigate to jailmaker dataset location cd /mnt/<pool>/jailmaker
Install curl apt-get install curl
Download jailmaker curl --location --remote-name https://raw.githubusercontent.com/Jip-Hop/jailmaker/main/jlmkr.py
Allow execution of jailmaker chmod +x jlmkr.py
(Optional) Add an alias
Create directory to hold SSL certs
Navigate to the TrueNAS Scale shell
Login as root sudo su
Create a certs directory in /mnt/<pool>/jailmaker
cd into certs directory
Place your fullchain.pem and privkey.pem of your cert in this directory
Create a dataset called pterodactyl-backups
Create a dataset called pterodactyl-servers
Navigate to the TrueNAS Scale shell
Login as root sudo su
Create jail jlmkr create ptero
When prompted with Do you wish to create a jail from a config template? enter Y
Paste in the docker template found here
Change --network-bridge value to the name of your network bridge interface
Specify volume shares in additional flags
--bind='/mnt/<pool>/jailmaker/certs:/certs'
--bind='/mnt/<pool>/pterodactyl-backups:/var/lib/pterodactyl/backups'
--bind='/mnt/<pool>/pterodactyl-servers:/var/lib/pterodactyl/volumes'
Change startup=0 to 1
Start the jail
Shell into the jail jlmkr shell ptero
Setup static IP address for jail
Shell into the jail jlmkr shell ptero
Navigate to /etc/systemd/network/ within the jail
Edit 80-container-host0.network
Ensure the [Network] section looks like this
[Network]
DHCP=false
Address=192.168.0.12/24
Gateway=192.168.0.1
LinkLocalAddressing=no
LLDP=yes
EmitLLDP=customer-bridge
Change Gateway to your gateway address
Change Address to a static address of your choice
Restart network systemctl restart systemd-networkd
Validate IP assignment systemctl status systemd-networkd
Use ifconfig or ip a to ensure the ip is assigned
Make sure the above ports are open using the jails static ip, not the host machine!
2096 (wings api) (tcp)
2097 (panel) (tcp)
2098 (wings sftp) (tcp)
Game server allocation range (26300-26320) (tcp/udp) (up to you)
(All the ports above can be changed to what you want to use)
Install pterodactyl panel
Shell into the jail jlmkr shell ptero
Install curl apt-get install curl
Run installer bash <(curl -s https://pterodactyl-installer.se)
Select [0] Install the panel
Follow the below layout for script inputs
Field
Value
Database name
<up to you>
Database username
<up to you>
Database password
<up to you>
Timezone
<up to you>
Pterodactyl email
<up to you>
Admin email
<up to you>
Admin username
<up to you>
Admin firstname
<up to you>
Admin lastname
<up to you>
Admin password
<up to you>
FQDN
ptero.<domain name>
UFW
N
Lets Encrypt
N
Assume SSL
Y
Agree to HTTP request
Y
Proceed anyways
Y
Inital config completed, continue
Y
Enable sending anon telemetry
no
Installation completed
(optional) Get nano apt-get install nano
Edit panel nginx conf nano /etc/nginx/sites-enabled/pterodactyl.conf
Comment out or remove the server block containing port 80
Change the following below in the remaining server block
Old
New
listen 443 ssl http2;
listen 2097;
listen [::]:443 ssl http2;
listen [::]:2097;
Set ssl_certificate to /certs/fullchain.pem
Set ssl_certificate_key to /certs/privkey.pem
Restart nginx systemctl restart nginx
Ensure everything is ok systemctl status nginx
In your reverse proxy forward https://panel.<domain name> to your chosen static address with port 2097
Panel should be available to access on https://panel.<domain name>
Shell into the jail jlmkr shell ptero
Run installer bash <(curl -s https://pterodactyl-installer.se)
Select [1] Install Wings
Follow the below layout for script inputs
Field
Value
UFW
N
Database hosts
N
Lets Encrypt
N
Proceed with installation
Y
Installation completed
Login in to the panel https//panel.<domain name> with the admin credentials
Navigate to the Locations tab
Select Create New
Enter a <short code> and a <description>
Press Create
Navigate to the Nodes tab
Select Create New
Enter the configs below
Field
Value
Name
master
Description
<The master node>
Location
<short code>
Node Visibility
Public
FQDN
play.<domain name>
Communicate Over SSL
Use SSL Connection
Behind Proxy
Not Behind Proxy
Daemon Port
2096
Daemon SFTP Port
2098
Enter your disk and memory limits
Select Create Node
Navigate to Nodes
Select the newly created node
Select Allocation tab
Under Assign New Allocations enter the following values below
Field
Value
IP Address
IP Alias
play.<domain name>
Ports
26300-26320
Press Submit
Navigate to Nodes
Select the newly created node
Select Configuration tab
Copy the configuration to clipboard
Go back to the shell
Navigate to /etc/pterodactyl
Create config nano config.yml
Paste clipboard config
Change the following values below
Field
Value
api.port
2096
system.sftp.port
2098
api.ssl.cert
/certs/fullchain.pem
api.ssl.key
/certs/privkey.pem
Fix panel -> wings routing issue
if you know another way please let me know
Edit hosts nano /etc/hosts
Add new entry
127.0.0.1 play.<domain name>
You should also do this on any system that runs on the same network and will access the panel (using the servers host ip) e.g.
192.168.xx.xx play.<domain name>
Fix ipv6 docker container creation issue
Create a clone of the pterodactyl wings docker network bridge with ipv6 disabled
docker network create \
-d bridge \
--ipv6=false \
-o "com.docker.network.bridge.enable_icc"="true" \
-o "com.docker.network.bridge.enable_ip_masquerade"="true" \
-o "com.docker.network.bridge.host_binding_ipv4"="0.0.0.0" \
-o "com.docker.network.driver.mtu"="1500" \
-o "com.docker.network.bridge.name"="pterodactyl0" \
pterodactyl_nw
Enable wings service systemctl enable wings
Start wings service systemctl start wings
Check wings is running systemctl status wings
Checking the node on the panel should show the wings version
Create a minecraft server
Login to the panel and manage it locally
Login through a vpn or through a different network
Access the panel, try join the minecraft server
Used for sending emails to users (invites, pass resets)
Open panel https://panel.<domain name>
Navigate to Settings
Select Mail tab
Enter smtp details (gmail can be used with app password)
Used for logging in and spam prevention
Open panel https://panel.<domain name>
Navigate to Settings
Select Advanced tab
Register an invisible reCAPTCHA
Copy in the site and secret keys
Press Save