To install Pterodactyl, you should use the docker-compose.pt.yml example that I made. It's just a bundled version of the official Pterodactyl Docker images. It includes both the Panel and Wings in one docker-compose file.
First, we need to create the docker-compose.pt.yml example. I'm going to put mine in this directory, since this is what I created back in the beginning of this guide.
nano/opt/docker-all/docker-compose.pt.yml
You should use this docker-compose.pt.yml example, but remember to edit out the parts, that says !!! CHANGE ME !!! or something similar.
Remember to also change the APP_URL.
In my case, the subdomain pt-panel.engels.zip is used. For the sake of simplicity, I recommend you keep the pt-panelas your subdomain.
version:"3.9"name:pt-stackx-common:pt-database:&db-environment# Do not remove the "&db-password" from the end of the line below, it is important# for Panel functionality.MYSQL_PASSWORD:&db-password"!!Change This To Your Own Password!!"MYSQL_ROOT_PASSWORD:"!!Change This To A Different Password!!"pt-panel:&panel-environmentAPP_URL:"https://pt-panel.ChangeThisToYourDomain.com"# A list of valid timezones can be found here: http://php.net/manual/en/timezones.phpAPP_TIMEZONE:"Europe/Berlin"APP_SERVICE_AUTHOR:"your@email.com"# Uncomment the line below and set to a non-empty value if you want to use Let's Encrypt# to generate an SSL certificate for the Panel.# LE_EMAIL: ""mail:&mail-environmentMAIL_FROM:"your@email.com"MAIL_DRIVER:"smtp"MAIL_HOST:"mail"MAIL_PORT:"1025"MAIL_USERNAME:"your@email.com"MAIL_PASSWORD:"!!Change This To Another Different Password!!"MAIL_ENCRYPTION:"true"## ------------------------------------------------------------------------------------------# DANGER ZONE BELOW## The remainder of this file likely does not need to be changed. Please only make modifications# below if you understand what you are doing.services:pt-database:container_name:pt-databaseimage:mariadb:10.5networks: - cosmos-pt-alllabels: - "cosmos-auto-update=true"command:--default-authentication-plugin=mysql_native_passwordvolumes: - "/srv/pterodactyl/database:/var/lib/mysql"environment:<<:*db-environmentMYSQL_DATABASE:"panel"# Don't change thisMYSQL_USER:"pterodactyl"# Don't change thisTZ:"Europe/Berlin"# You can change this to your timezonerestart:unless-stoppedpt-redis:container_name:pt-redisimage:"redis:alpine"networks: - cosmos-pt-alllabels: - "cosmos-auto-update=true"environment:TZ:"Europe/Berlin"# You can change this to your timezonevolumes: - /srv/pterodactyl/redis:/datacommand:redis-server --save 20 1 --loglevel warningrestart:unless-stoppedpt-panel:container_name:pt-panelimage:ghcr.io/pterodactyl/panel:latestnetworks: - cosmos-pt-alllabels: - "cosmos-auto-update=true"volumes: - "/srv/pterodactyl/var:/app/var"# Don't change this - "/srv/pterodactyl/nginx:/etc/nginx/http.d"# Don't change this - "/srv/pterodactyl/certs:/etc/letsencrypt"# Don't change this - "/srv/pterodactyl/logs:/app/storage/logs"# Don't change thisenvironment:<<: [*panel-environment,*mail-environment]DB_PASSWORD:*db-passwordAPP_ENV:"production"# Don't change thisAPP_ENVIRONMENT_ONLY:"false"# Don't change thisCACHE_DRIVER:"redis"# Don't change thisSESSION_DRIVER:"redis"# Don't change thisQUEUE_DRIVER:"redis"# Don't change thisREDIS_HOST:"pt-redis"# Don't change thisDB_HOST:"pt-database"# Don't change thisDB_PORT:"3306"# Don't change thisTZ:"Europe/Berlin"# You can change this to your timezonerestart:unless-stoppedpt-wings:container_name:pt-wingsimage:ghcr.io/pterodactyl/wings:latestnetworks: - cosmos-pt-alllabels: - "cosmos-auto-update=true"ports: - "2022:2022"tty:trueenvironment:TZ:"Europe/Berlin"# You can change this to your timezoneWINGS_UID:988WINGS_GID:988WINGS_USERNAME:pterodactylvolumes: - "/var/run/docker.sock:/var/run/docker.sock"# Don't change this - "/var/lib/docker/containers:/var/lib/docker/containers"# Don't change this - "/etc/pterodactyl:/etc/pterodactyl"# Don't change this - "/var/lib/pterodactyl:/var/lib/pterodactyl"# Don't change this - "/var/log/pterodactyl:/var/log/pterodactyl"# Don't change this - "/tmp/pterodactyl:/tmp/pterodactyl"# Don't change this - "/etc/ssl/certs:/etc/ssl/certs:ro"# Don't change thisrestart:unless-stoppednetworks:cosmos-pt-all:external:true
To close the file, use CTRL-X, press Y and then press ENTER to save the file in Nano.