EdyTheCow / docker-pterodactyl

Running Pterodactyl Panel inside docker containers behind Traefik reverse proxy
234 stars 49 forks source link

ReadMe not specific on what the panel's server ip is. #32

Closed VolcanicMG closed 1 year ago

VolcanicMG commented 1 year ago

Hello, im new to pterodactyl and traefik and I don't understand what I should point my A record to. Under the DNS section, it says: Create A record pointing to panel's server IP, if you're using Cloudflare you can proxy this record through Cloudflare. As someone who doesn't know much about what they are doing, I don't know what this means. I know how to add a record to my DNS using Cloudflare but not what to put into the IPv4. I would rather go the Cloudflare tunnel route if possible. Well anyways, If there was a youtube that would be very useful too.

EdyTheCow commented 1 year ago

The guide is written with at least two separate servers in mind. One server dedicated to run panel and a separate server to run node (wings). This is why it asks for A record to the panel's and node's server. While it is possible to run both panel and node on the same server, this guide doesn't cover the steps to do that. I've written this guide mostly for myself with use case leaning towards hosting services.

If you're new to pterodactyl, docker and traefik. I would recommend first running pterodactyl following their official guide on how to run it in docker without addition of traefik.

VolcanicMG commented 1 year ago

I have two servers set up for it, the only things I've done so far for the DNS is point it to my public IP and I have both ports 80 and 443 open on my router. When I go to my panel within my browser using panel.mywebsite.com it just comes back with a HTTP error 500. I've been looking at some of the normal pterodactyl setup and I see anything specific that Im doing wrong.

VolcanicMG commented 1 year ago

My end-goal with this is to be able to run game servers on this with specific domains for each. For instance, Minecraft. I want the players to be able to use minecrtaft.mydomain.com to be able to join my server without opening ports for it on my router.

EdyTheCow commented 1 year ago

Are you attempting to run this on your PC or a home server? Either way, you will still have to open ports on your router for each Minecraft server you create. Pterodactyl cannot open ports for you. You are still required to open ports even if you want to use domain IPs as you mentioned.

VolcanicMG commented 1 year ago

I have 3 home servers, and two of them are being used for the tutorial. Ok, opening the ports for each makes sense, I was just unsure of that process when it comes to creating the DNS. In your docs, I made it up to the point where you check the panel. I don't what I'm missing, in cloudflare I have the A record pointing to my public IP, and I don't know what else I need in order to access the panel.

VolcanicMG commented 1 year ago

Now im just getting a bad gateway error.

VolcanicMG commented 1 year ago

Sorry for the spam, but now I have it showing up as 500 SERVER ERROR with a dark blue background.

Here's what the container's logs say:

> ln: /app/storage/logs/logs: File exists
> external vars exist.
> Checking if https is required.
> Using nginx config already in place.
> No letsencrypt email is set
> DB_PORT not specified, defaulting to 3306
> Checking database status.
> database (172.23.0.3:3306) open
> Migrating and Seeding D.B
> In Connection.php line 712:
>                                                                                
>   SQLSTATE[HY000] [1130] Host '172.23.0.4' is not allowed to connect to this   
>   MySQL server (SQL: select * from information_schema.tables where table_sche  
>   ma = panel and table_name = migrations and table_type = 'BASE TABLE')        
>                                                                                
> In Exception.php line 18:
>                                                                                
>   SQLSTATE[HY000] [1130] Host '172.23.0.4' is not allowed to connect to this   
>   MySQL server                                                                 
>                                                                                
> In PDOConnection.php line 40:
>                                                                                
>   SQLSTATE[HY000] [1130] Host '172.23.0.4' is not allowed to connect to this   
>   MySQL server                                                                 
>                                                                                
> Starting cron jobs.
> Starting supervisord.
> 2023-03-01 05:41:56,811 CRIT Server 'unix_http_server' running without any HTTP authentication checking
EdyTheCow commented 1 year ago

From what you have posted, it seems like there's something wrong with mysql. It seems like it's not able to connect to the database as far as I can tell. Furthermore I am not sure if you only have one public IP or multiple, the guide was written with the idea it would be ran on a hosting service such as OVH or similar. I would suggest to try running Pterodactyl using their official docker images without using Traefik. Even though that doesn't seem to be an issue here right now, it may become an issue down the line. There's no reason to over complicate the setup for your specific use case.

VolcanicMG commented 1 year ago

Yep your right, for some reason I thought I could run it all off of one public IP so that won't work. If I can, I think I might try hooking up a tunnel to the panel through cloudflare, and port forward the rest for wings. If I can't get that to work I might just switch back to pufferpannel with a tunnel since that's easy enough. I'll do more trash though and see what options I have since I want to try it out.