How To Setup A NoBlox.js Server On A VPS?

I was following this tutorial by @CAP7A1N: How to Create a Rank Management System using Glitch

The thing is, it uses Glitch to host and it is no longer 24/7. (Pinging = BAN)

I was wondering how I could hook this up to my VPS so it is 24/7 and more reliable.

Make the files in the vps and not in glitch. Also you can skip the pinging step if the vps is 24/7, which it should be.

But the part i’m stuck on is how to connect it to a domain of mine.

If you have a domain registered usually companies have DNS panels for that sort of thing. Find that and setup an A record pointing to the ip of the VPS. It may take some time due to DNS propagation, but should be working within a day or two. Make sure your VPS’ firewall is accepting all connections specifically on the port you’re running the web server on.

What if I were to host multiple on the same domain? (Subdomains)

Would I need to use ports then? If so, how would I go about changing those ports and using them?

Unless you want different subdomains to point to different ports on the same VPS you don’t need to worry about it. The port for the noblox is in the server.js file so you can change that to whatever you want. I’m not sure how your domain provider has it set up but when you’re creating the A record there should be a spot for the name, in which you’d give it the domain with the subdomain you want.

Would I then do,

IpAddress:Port for the value?

A records don’t take ports, pretty sure then you’d need some type of SRV record, not sure. Just put in the ip address, and use subdomain.domain.whatever:port whenever you send your request. If you leave it port 80 in the server.js then should just need to do subdomain.domain.whatever on Roblox as that is the default http port.

1 Like

I tried using the No Port Method but it seems to not have worked. I tried to do the Port Method after but still no luck.

Edit: It did work but I have to do http://blxxbengames.robloxrankservices.xyz:8080/. I’m still unsure on how to change the host though.

Exactly what are you doing? Show me how your dns is setup, make sure the port in server.js is correct, and show me what you’re sending the request to. Again, it may take some time to update the DNS because of what is called DNS propagation.

It won’t let me add :8080 to the end of it as it says that it’s an incorrect hostname or incorrect IP.

A records don’t take ports,

You don’t put the port in the DNS record, just the IP of the VPS. In server.js there is a port variable, set it to 80 or 8080 or whatever. Then in Roblox send the request to the subdomain with the port at the end so like subdomain.domain.whatever:8080.

Is there anyway I could remove that or is that the only option?

Remove what exactly? If you’re talking about the A record not being able to have ports then try a SRV record. If you’re talking about the :8080 at the end of the domain in Roblox then make it run on port 80 and then you won’t need it since default port is 80.

1 Like

How would I set up an SRV Record then?

You can take a look at this site. I wouldn’t recommend it since there may be some unexpected behavior, as I said I don’t know if it’ll work or not.

1 Like

That’s quite confusing. The thing is I’m hosting multiple ranking systems on 1 domain. That means if I could somehow make some code in the server.js point to the certain domain so I can host port 80 on it and it won’t ruin the other domains. Is this possible rather than having to add the port on the end and doing a SRV?

DNS don’t work that way. I suggest you watch a video on it. When you go to say google.com, it will do internet magic then return the ip of the server which you then send the actual request to. server.js just has the port that specific web server is listening on, but can’t control the DNS. I don’t see how it would ruin other domains. If you have things on the domain you’re free to use subdomains, it’ll just point to the IP/overall server and not the specific port.

1 Like

I was also wondering, are they any 24/7 SSH Consoles that I can use?

I don’t see what you mean by 24/7. If you’re vps is online 24/7 then you can always ssh into it. If you’re looking for a ssh client I’d suggest putty, although windows cmd works fine if you’re on windows.