How do I install a domain on a VPS / Pterodactyl? Print

  • VPS, Domain Linking, Poorten, Pterodactyl
  • 31

If you have a website and you want to connect it to your VPS / Pterodactyl server, you need to follow these steps. It is only possible on Linux Ubuntu - Nginx.


1. Create a file as follows:

nano /etc/nginx/sites-available/domain.conf

For exampleflexynode.conf (not really necessary but useful for organizing everything):

nano /etc/nginx/sites-available/flexynode.conf

2. Then paste the following code into this file:

server {
 server_name <domain>;
 proxy_pass http://<ip>:<port>;
 proxy_buffering off;
 proxy_set_header X-Real-IP $remote_addr;

Proxy pass ip:port it must be pointed EXACTLY to the server IP address.
For example: (This should be replaced with your VPS IP)

3. Then create a shortcut to sites-enabled, as follows (change FILE NAME to the one you gave to that file):

ln -s /etc/nginx/sites-available/FILENAME.conf /etc/nginx/sites-enabled/FILENAME.conf

You cannot abbreviate this command.

4. Restart nginx to make it work:

systemctl restart nginx

5. If you want an SSL Certificate, do the following:


5.1 Enter the number of your domain that you added.

For example:If certbot asks for Redirect or No Redirect, grab Redirect.


Finished! You have successfully linked your domain to Pterodactyl / your VPS!


© FlexyNode 2024 - All rights reserved.


Was this answer helpful?

« Back

Powered by WHMCompleteSolution

Ready to get started?

The servers are up and running, select your subscription, and become our newest satisfied customer!