🌌
Cosmos Guides
  • Cosmos Guides
  • Docker & Compose Setup
    • 01) Docker installation
    • 02) Cosmos Server setup
    • 03) QoL Docker Compose setup
  • Cosmos Server setup
    • 01) Initial launch of Cosmos Server
    • 02) Initial setup of Cosmos Server
    • 03) Cosmos hostname setup
    • 04) DNS Challenge setup (CF)
      • 04a) SSL/TLS settings
      • 04b) SSL Wildcard setup
      • 04c) Creating a DNS Zone API Key
    • 05) Finishing hostname setup
    • 06) Admin account setup
    • 07) Final Steps
  • Pterodactyl Setup
    • 00) Information about Pterodactyl
    • 01) Installing Pterodactyl
      • 01a) Creating a network for Pterodactyl
      • 01b) The Docker Compose example
      • 01c) Launching Pterodactyl
    • 02) Creating URLs
      • 02a) Create URL for pt-panel
      • 02b) Create URL for pt-wings
      • 02c) Setting up CORS
        • 02ca) CORS Option 1 (secure)
        • 02cb) CORS Option 2 (failsafe)
    • 03) Setup of the Panel
      • 03a) Creating the first user
      • 03b) Setting up a location
      • 03c) Setting up the node
      • 03d) IP and Port allocation
    • 04) Connecting the Wings
      • 04a) Creating the config.yml
      • 04b) Check if pt-wings work
      • 04c) Final touches
  • Using Pterodactyl
    • 00) Overview
    • 01) Setting up a game server
      • 01a) Creating a server
        • 01aa) Core Details
        • 01ab) Allocation Management
        • 01ac) Application Feature Limits
        • 01ad) Resource Management
      • 01b) Game server configuration
        • 01ba) Startup Configuration
        • 01bb) Service Variables
      • 01c) Final Steps
        • 01ca) The Pterodactyl Terminal
        • 01cb) Accessing the SFTP server
    • 02) Importing new eggs
      • 02a) Locating the egg
      • 02b) Downloading the egg
      • 02c) Creating a Nest
      • 02d) Importing the egg to the nest
    • 03) Setting up a SteamCMD server
      • 03a) Creating a server
      • 03b) Game server configuration
        • 03ba) Allocation Management
        • 03bb) Nest Configuration
      • 03c) Service Variables
      • 03d) Final Steps
  • Troubleshooting
    • 00) Overview
      • 01) The Node shows up as offline
      • 02) My Panel login page is blank
      • 03) "x509: certificate signed by unknown authority" error (RHEL/CentOS/Fedora)
Powered by GitBook
On this page
  • The Docker Compose Example
  • On to the next step!
  1. Pterodactyl Setup
  2. 01) Installing Pterodactyl

01b) The Docker Compose example

Previous01a) Creating a network for PterodactylNext01c) Launching Pterodactyl

Last updated 1 year ago

The Docker Compose Example

  1. 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.

  2. 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 .

nano /opt/docker-all/docker-compose.pt.yml
  1. 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-stack
x-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-environment
    APP_URL: "https://pt-panel.ChangeThisToYourDomain.com"
    # A list of valid timezones can be found here: http://php.net/manual/en/timezones.php
    APP_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-environment
    MAIL_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-database
    image: mariadb:10.5
    networks:
      - cosmos-pt-all
    labels:
      - "cosmos-auto-update=true"
    command: --default-authentication-plugin=mysql_native_password
    volumes:
      - "/srv/pterodactyl/database:/var/lib/mysql"
    environment:
      <<: *db-environment
      MYSQL_DATABASE: "panel" # Don't change this
      MYSQL_USER: "pterodactyl" # Don't change this
      TZ: "Europe/Berlin" # You can change this to your timezone
    restart: unless-stopped

  pt-redis:
    container_name: pt-redis
    image: "redis:alpine"
    networks:
      - cosmos-pt-all
    labels:
      - "cosmos-auto-update=true"
    environment:
      TZ: "Europe/Berlin" # You can change this to your timezone
    volumes:
      - /srv/pterodactyl/redis:/data
    command: redis-server --save 20 1 --loglevel warning
    restart: unless-stopped

  pt-panel:
    container_name: pt-panel
    image: ghcr.io/pterodactyl/panel:latest
    networks:
      - cosmos-pt-all
    labels:
      - "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 this
    environment:
      <<: [*panel-environment, *mail-environment]
      DB_PASSWORD: *db-password
      APP_ENV: "production" # Don't change this
      APP_ENVIRONMENT_ONLY: "false" # Don't change this
      CACHE_DRIVER: "redis" # Don't change this
      SESSION_DRIVER: "redis" # Don't change this
      QUEUE_DRIVER: "redis" # Don't change this
      REDIS_HOST: "pt-redis" # Don't change this
      DB_HOST: "pt-database" # Don't change this
      DB_PORT: "3306" # Don't change this
      TZ: "Europe/Berlin" # You can change this to your timezone
    restart: unless-stopped

  pt-wings:
    container_name: pt-wings
    image: ghcr.io/pterodactyl/wings:latest
    networks:
      - cosmos-pt-all
    labels:
      - "cosmos-auto-update=true"
    ports:
      - "2022:2022"
    tty: true
    environment:
      TZ: "Europe/Berlin" # You can change this to your timezone
      WINGS_UID: 988
      WINGS_GID: 988
      WINGS_USERNAME: pterodactyl
    volumes:
      - "/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 this
    restart: unless-stopped

networks:
  cosmos-pt-all:
    external: true
  1. To close the file, use CTRL-X, press Y and then press ENTER to save the file in Nano.

  2. The whole process should look like this:

On to the next step!

beginning of this guide