All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
24x7 Web Browsing Session on VPS
I am looking for a way to visit a web page on a VPS and then simply leave it open so that it appears to the website that I am always on the site. The reason I need to do this is a long story and a very niche situation, so I won't waste your time to explain.
The task itself is super simple, I can easily use my home PC to leave the web page open all the time. But since I already have a VPS that I use for webhosting (and it has spare resources), I thought it would be great if I can also use the VPS for a 24x7 web browsing session so that I don't need to leave my home PC on 24x7.
I searched the internet for ways to use VPS like this, but when I searched "browse websites with VPS" most results were related to setting up the VPS as a VPN. I am pretty sure what I need is NOT a VPN/proxy. I assume this method would still require me to have a local computer running to access sites, but I need the VPS to have that page open by itself. And for the record, whether the session uses my local IP or server IP is unimportant to me, my main goal is not to mask my IP (but it won't hurt), I simply want to have the page open.
Instead, I think what would work is a simple, normal version of Chrome/Firefox to be installed on the VPS. However, my VPS does not have a GUI right now. It is currently running CentOS7, and I think I have a basic idea of how to install GUI and firefox on it. But before I start making large changes to my VPS (I assume the GUI will take up a lot of resources), I just want to ask here if this is the correct and most resource efficient way to accomplish the task in question? Are there any alternatives I am not aware of? During my search I even read an answer suggesting to install an android emulator and use it to browse the web, but I can't imagine this method would be any less resource intensive if I don't have any other use for an android emulator, right?
Comments
Lubuntu desktop
Make it short then
If it's just to "visit", or to be connected and remain connected, why not just screen w3m or lynx?
Easy to do with VNC. There are many tutorials on how to install VNC and a desktop environment on popular Linux distros.
For extra security, run it through an SSH tunnel. Most tutorials I've seen cover this part too.
Would recommend at least 512 MB RAM (1+ GB preferred) and low latency from your home connection, or it might be really laggy.
If you want to use a graphical browser, the most easy, lightweight and secure solution I can think, instead of loading a whole desktop on vps, use xpra
install xpra on both vps and your client and then
$ xpra start :100
$ DISPLAY=:100 firefox
or whatever browser
and from your linux client
$ xpra attach ssh/your.vps.ip/100
There are also windows binaries for xpra client if you're on windows
Hello!
I don't understand what "remaining connected" means in your case. But I think it is about running the analytical script files.
While searching for a solution which doesn't require installing a GUI on your VPS, I found this interesting (sort of) web browser: Browsh, which state it offers (most of) the features of a web browser, also running JavaScript. So, you can give it a try: https://www.brow.sh/
It is written with Go, and has a single executable file, which is great.
Regards
Well, it's healthier to stalk a website than a girl.
So, I approve.
Sorry, I'm not familiar with linux yet. Just to be clear, do you mean installing Lubuntu as a virtual machine on the VPS (as opposed to installing it on the VPS directly). I won't bother you to explain how to do that, I have not installed a VM on linux before but I can try to follow a guide online, I just want to confirm that this is in fact what you are suggesting.
It needs to be connected and remain connected. The site has some dynamic elements like videos and I assume it uses javascript or some other dynamic way to detect whether I am online, so I'm pretty sure a text only browser would not work. Any standard version of Firefox/Chrome works for sure though.
As for the story, basically there's a video streaming site (not youtube) and I get "points" there to level up my account the longer I "watch" (i.e. simply have the tab open) on there. I won't name the site because it's very niche so it will expose me too much.
I don't approve such an act but then better to stalk a website than a girl.
In theory, it shouldn't be too hard. What you need is basically an OS installed, fire up a browser and set up a simple macro so that the cursor moves around.
Any kind of OS that supports a GUI will work.
Thanks. I will check this out.
I will definitely check this out as well, thanks.
Yeah, I would assume it's scripts. Think about how facebook knows people are online in the browser, this site is likely similar.
This text based browser can run scripts and even videos. That's very interesting. I will check it out too.
NoMachine with Lubuntu Desktop
NoMachine app is much better than VNC
I use this setup for trading and my browser session is always active and open.
The current session is running for 18+ days. The reboot was needed due to OS updates, otherwise number of days running would be much higher.
My VPS setup - Low cost VPS from RackNerd (@dustinc).
Just write a quick playwright script
https://playwright.dev/python/docs/intro#first-script
Use this docker image:
dorowu/ubuntu-desktop-lxde-vnc
I prefer to install Linux Mint with Mate Desktop + either VNC or NoMachine or AnyDesk.
Run selenium for python. Runs chromium without a gui.
Is it possible to download files into VPS using Browsh or it only offers volatile sessions?
I use x2go. It is a bit heavier than other solutions but it is secure and very old, feature-rich (at least for my needs) and well documented/tested.
Keep in mind that running a graphical environment with a browser only to display Hello World! even with icewm and a modern graphical browser would need something in excess of 300 MB ram. If you load heavy pages with scripts, etc. at least 500 MB for 1 tab, most likely 700-800.
Total numbers, including well trimmed OS.
Add to this that a webmaster would know your user-agent and many other details even if you fake the user-agent. So, a full browser solution with 1-1.5 GB Ram is a safer bet. I would go for 2 GB as the prices are low these days and it is not worth it the extra tweaking and trimming.
+1
Write a node script with puppeteer and use forever npm package to make sure it is running correctly. You can also use PM2 for this.
Another approach is to run the node js script using systemd and restart on failure.
This will keep the node script running forever and the nodejs will keep the page open infinitely.
Sounds like a some kind of watch ads and get paid thing.
keyword in google : ubuntu desktop + xrdp (if you're using ubuntu)
then you can connect your ubuntu using Remote Desktop Connection in windows OS.
I am using the following to run XRDP on Debian which will provide GUI so you can run Chrome browser in it. Just connect o SSH via root and run the following commands one by one.
Then restart VPS and connect to RDP from your Window machine. Tested it on 1GB/1Core VPS and it works fine.