TL;DR: Skip to the bottom of this post, where you can find my recommendations.
We may have some terminology and basic understanding issues here. Let me start with some definitions, and then I will follow with additional explanations and issues with what you are trying to do, followed with some basic recommendations of how to accomplish what you want.
VPS is a virtual private server. It is a server somewhere on the internet. A virtual private server can offer many kinds of services. You can choose one, choose some, choose many, or choose all of them at once. Here are some example services that a VPS can provide:
- Web Server - Host websites and display web pages.
- VPN Server - Your VPS can be a VPN server. See below for more.
- Game Server - Play games with your friends.
- Mail Server - Host email. This one is harder than it seems, because the big players tend to drop email to or from small private mail servers.
- File Server - Store files and backups etc. Share files with your friends (legal files, of course!).
- Streaming video or audio,
- Hosting your blog or podcast or whatever.
- If you can offer it on the internet, then your VPS can serve it.
What makes a VPS "virtual" is that a VPS provider takes a real physical computer (a "dedicated server") on the internet and divides it into many virtual private servers. The VPSs are "virtual machines" on the dedicated server. To each VPS customer, they "own" their VPS, which looks like a whole server to them. It is up to the VPS provider to ensure that everybody gets a fair share and no single VPS can hog resources and adversely affect the others.
Note: You can also create virtual machines on your laptop. That makes more sense to me. I do that all the time.
VPN is a virtual private network. Typically, you establish an encrypted (scrambled) connection from your computer to a VPN server somewhere on the internet. All of your internet activity is encrypted between your computer and the VPN server. The VPN server decrypts the communications and puts them out on the internet in the clear. Because your connection to the VPN server is encrypted, the people around you cannot "sniff" or see your internet activities like web surfing, email, etc. This protection is useful when you are accessing the internet from a hotel, a coffee shop, or other shared internet access. If you are at a private residence, then it keeps your internet service provider from monitoring your activities. If you are in an oppressed country that restricts your internet activities, a VPN may let you get access to websites that would otherwise be blocked, and the authorities will not know which websites you visit.
ISSUES WITH WHAT YOU ARE PROPOSING
Remember from above: A VPS is a type of server on the internet. A VPN is a kind of service that a server may provide. That VPN server could be a VPS or some other server.
Most hotspots (hotel, coffee shop, etc.) assign you a private IP address. You do not control their routers, so there is no way for your VPS or VPN users to access your laptop.
Even if you could get a public IP address from the hotspot, you face other issues:
Servers must be at a stable IP address on the internet. That's how others will find your VPS or your VPN. Each hotspot will have different IP addresses. How will your users find your VPS and VPN servers?
Most users expect VPSs and VPNs to be available whenever they need to use their services. How will your VPS and/or VPN users know when they can connect to your laptop, and when you are driving?
... you get the idea.
BASIC THOUGHTS
I wonder whether you really want to run VPS and VPN servers on a laptop that moves around and connects to the internet using hotspots? It is virtually impossible to do, and I explained why in the paragraphs above.
Could you be thinking of installing a virtual machine on your laptop for testing, development, learning, or some other purpose? This virtual machine would be like a separate computer on your laptop, but for your own use, not as a server on the internet. That's not a VPS, but you could configure it as a server to learn more about how to configure and operate them. You would be the only one who could access it.
Maybe what you are asking for is how to access a VPS from your laptop as you travel around. Could that be it?
Could you be thinking of installing the tools you need to access a VPN somewhere on the internet from your laptop? That could give you privacy when you are using hotspots.
RECOMMENDATIONS
- Consider installing virtual machine software on your laptop. You can create and destroy as many virtual Linux systems as you want so you can learn, play, configure servers or VPNs, or do anything, really. All in a safe "playpen" environment on your laptop. The well-known free software for virtual machines is "VirtualBox": https://www.virtualbox.org
- Find a VPS provider you like and rent a VPS on the internet. You can find VPSs for as little as a few dollars a month. Be careful when shopping at the low end. Your VPS could be configured to operate as a VPN - it is a popular use of VPSs. This is a great way to learn about Linux servers and Linux in general.
- Find a commercial VPN provider and pay for their VPN services. Install their recommended VPN client to connect to it. It would save you the time and trouble to configure your own.
I hope this helps someone, if not
@Olson. I'm glad I can type fast.