Reverse proxy on a private VPS
I have a private ubuntu VPS that I want to use as a reverse proxy for my minecraft server, which I run on my local machine, though I am not really familiar with linux.
I know the very basics of networking and I'm just curious if anybody has a tutorial or could help me set it up.
What I wanna do is to make it work basically like playit.gg but so I can control it fully
26 Replies
You'll need to setup some kind of VPN to connect between the two. Iirc tailscale would probably work for this
Would I need to install the tailscale client on both machines?
it looks like yes
based on the docs
Could you send me a tutorial on how I go about doing that?
https://www.youtube.com/watch?v=sPdvyR7bLqI&embeds_referring_euri=https%3A%2F%2Ftailscale.com%2F (this is from tailscales site)
Tailscale
YouTube
How to get started with Tailscale in under 10 minutes
How to get started with Tailscale in under 10 minutes.
Personal accounts are always free on Tailscale and can include up to 3 users and 100 devices. Get started today at https://tailscale.com/yt
Is tailscale an alternative to wireguard?
No, its uses wireguard as its backend
Alright, thank you, I will try it out later
It’s WireGuard that only proxies connections made to the tailnet
Why?
I did it
Took a while, but I managed to do it
Thank you
Though now there is another problem, the chunks load really slowly
I tested the connection speed between my PC and the VPS and it's 20 Mbps, which should be more than enough
The connection is also direct
it's likely related to your computer specs then
Not really
Are you saying it's not enough?
Well I have a pretty beefy PC, so I don't really know what the issue is
I used playit.gg, and sometimes it worked great, but sometimes it didn't work at all, which is why I switched
cpu?
ram?
allocated ram?
Not at all
5 players joining at once or loading chunks can saturate that
And keep in mind this is shared with your home network
If you have parents or roommates
They watch a YouTube video and say goodbye to your ping
You upload/download a file and server will lag
Ryzen 7 5800x3d
RAM 32 gigs, 30 allocated
You should probably allocate a little less ram
Well the thing is, when I was using playit, and when it was working properly, everybody's chunks loaded instantaniously, even though my connection was the same as it is now
Maybe, I didn't have problems with it thus far though
I’m pretty sure their reverse proxy will have network optimizations and also the anycsst routing helps
I'm using the same setup with tailscale. Put both devices into a tailnet then use nginx to forward traffic from the VPS public ip to the tailnet interface
youll need a rule like this added to your /etc/nginx/nginx.conf
the proxy pass ip being the tailscale ip of the device that is hosting the minecraft server
I believe I used rinetd for the same purposes, do you think nginx will be better?
Never tried rinetd but nginx is mega lightweight and works great for me. Ping me if you need help with it
Hey there, tried this now, but when I try to restart nginx it shows this error

ok, I think I managed to get it working in the end
It shows that the server is up, bu times out when I try to connect
Nevermind, it was the server itself
Holy guacamole it works
And it works way better than rinetd
Glad you got it sorted :p