mirror of
https://github.com/bigbeartechworld/big-bear-scripts.git
synced 2026-03-31 06:24:02 -04:00
This commit adds a new script `run.sh` that handles the network configuration and directory setup for Pterodactyl Wings. The key changes include: - Checks if a UUID argument is provided and exits with an error if not - Implements functions to check if a subnet is in use, find an available subnet, and get the gateway for a subnet - Creates the `pterodactyl_nw` Docker network with the available subnet and gateway - Creates the required directories for Pterodactyl (/var/lib/pterodactyl/volumes, /tmp/pterodactyl, /etc/pterodactyl, /var/log/pterodactyl) - Sets the appropriate ownership for the created directories - Restarts the `pterodactyl-wings` container to apply the changes This script simplifies the setup process for Pterodactyl Wings and helps ensure the network configuration and directory structure are properly set up.
2.8 KiB
2.8 KiB
Setup Pterodactyl Wings
This script helps set up the network configuration and directories required for Pterodactyl Wings. It handles network conflict resolution, proper directory permissions, and container management automatically.
Prerequisites
- Docker installed and running
- Root/sudo access
- wget installed
Usage
You can run the script directly using wget:
bash -c "$(wget -qLO - https://raw.githubusercontent.com/bigbeartechworld/big-bear-scripts/master/setup-pterodactyl-wings/run.sh)" -- <uuid>
Replace <uuid> with your server's UUID from the Pterodactyl panel.
Example:
bash -c "$(wget -qLO - https://raw.githubusercontent.com/bigbeartechworld/big-bear-scripts/master/setup-pterodactyl-wings/run.sh)" -- 123e4567-e89b-12d3-a456-426614174000
What the Script Does
- Creates required Pterodactyl directories with proper permissions
- Sets up Docker network
pterodactyl_nwwith proper IPv4/IPv6 configuration - Automatically resolves network conflicts:
- Detects conflicting Docker networks
- Removes unused conflicting networks
- Provides clear instructions if manual intervention is needed
- Restarts the pterodactyl-wings container to apply changes
Network Configuration
The script automatically creates a Docker network with the following specifications:
- Network name:
pterodactyl_nw - IPv4 subnet: Automatically selected from available ranges (172.40-47.0.0/16)
- IPv4 gateway: Automatically configured based on selected subnet
- IPv6 subnet: fd00::/64
- IPv6 gateway: fd00::1
- Bridge name: pterodactyl0
The script intelligently:
- Checks existing Docker networks and system routes for conflicts
- Automatically selects an available subnet from a predefined list of private ranges
- Reconfigures the network if conflicts are detected
- Provides clear status messages during the setup process
Troubleshooting
If you encounter issues, the script will provide clear error messages and instructions:
-
Network Configuration Issues:
- The script will automatically try different subnet ranges
- Clear messages show which subnet is being used
- Detailed error messages if network creation fails
-
Container Restart Issues:
- If the pterodactyl-wings container fails to restart, you'll get instructions for manual restart
- Use
docker restart pterodactyl-wingsif needed
Common error messages and solutions:
- "Could not find available subnet": All predefined subnets are in use, contact support
- "Failed to create network": Check Docker logs and ensure Docker is running properly
- "Failed to restart pterodactyl-wings container": Ensure the container exists and try restarting manually
Support
For issues or questions, please open an issue on BigBearCommunity.