This repository provides a full, production-ready Docker setup for running the Pterodactyl Panel. It is designed for reliability, security, and straightforward deployment on any VPS or cloud platform.
You can choose whether to run the panel using its own Nginx instance or behind an external reverse proxy such as Traefik, Nginx Proxy Manager, or Caddy. By default the container is configured to run without Nginx (USE_NGINX=false), which is recommended for production behind a reverse proxy.
Clone the repository:
git clone https://github.com/m4tteros/dockerized-pterodactyl
cd dockerized-pterodactyldockerized-pterodactyl/
│
├── docker-compose.yml
├── .env.example
├── .gitignore
├── README.md
├── LICENSE
│
├── backup.sh
├── wipe.sh
│
├── panel/
│ ├── Dockerfile
│ ├── entrypoint.sh
│ ├── supervisord.conf
│ ├── nginx.conf
│ └── wipe.sh
│
├── mysql/
│ ├── Dockerfile
│ └── init.sql
│
└── data/
├── database/
├── redis/
├── logs/
├── var/
└── certs/
Copy the environment file template:
cp .env.example .envThen edit .env with your preferred settings.
MYSQL_PASSWORD: Database password for thepterodactyluser.MYSQL_ROOT_PASSWORD: Root password for MariaDB.APP_URL: The full URL to access your panel (for examplehttps://panel.example.com).APP_TIMEZONE: Timezone for PHP and logs (for exampleUTC).USE_NGINX:trueto use built-in Nginx,falseif using an external reverse proxy (defaultfalse).TRUSTED_PROXIES: IP or CIDR of your proxy if behind one.MAIL_*: SMTP configuration for password resets and notifications.
USE_NGINX=false
docker-compose up -d --buildUSE_NGINX=true
docker-compose up -d --buildThe first build may take several minutes.
After containers are running:
docker-compose run --rm panel php artisan p:user:makeFollow the prompts to create your administrator account.
Visit your configured APP_URL in a browser, for example:
https://panel.example.com
If you are not using HTTPS yet, use:
http://your-server-ip
Run the backup script to create a timestamped snapshot of your panel and database.
bash backup.shBackups are stored in ./backups/<timestamp>/.
To restore a database backup:
docker exec -i pterodactyl_db mysql -u root -p panel < backups/<timestamp>/panel.sqlYou can also restore /data manually to bring back file-based data.
To completely reset your installation (all data and volumes will be deleted):
bash wipe.sh- Update images and restart:
docker-compose pull docker-compose up -d
- View logs:
docker-compose logs -f panel
- Rebuild after config changes:
docker-compose down docker-compose up -d --build
- Always use strong passwords for all environment variables.
- Never commit your
.envfile to GitHub. - If using Cloudflare or any reverse proxy, ensure
TRUSTED_PROXIESmatches its IP range. - Use HTTPS in production. If using the built-in Nginx, you can bind to ports 80 and 443 for SSL certificates (via your proxy or Let's Encrypt).
- Keep your containers updated with
docker-compose pull.
This project is licensed under the MIT License. See the LICENSE file for details.
This setup is based on the official Pterodactyl Panel Docker image and the work of the Pterodactyl community.