Hosting a free VPS using GitHub and Ngrok is a clever workaround for creating a temporary and lightweight virtual server environment. Here's an overview of how it works:
GitHub: You store your VPS setup scripts, configurations, or application code in a GitHub repository. This acts as a central, version-controlled location for everything your VPS needs.
Ngrok: Ngrok bridges the gap between your local machine (or any temporary environment) and the public internet by providing a secure, easily accessible public URL. This makes it possible to expose your VPS to the internet without setting up a full-fledged hosting service.
Steps to Set It Up:
Prepare Your VPS Environment:
Use a lightweight framework like Node.js, Python Flask, or even a Docker container to simulate a server.
Store the necessary setup files in your GitHub repository.
Clone the Repository:
Clone your GitHub repository to a local machine or any environment where you want to run the VPS.
Run the Server:
Execute the necessary scripts (e.g., npm start, python app.py, or docker run) to start your server.
Expose with Ngrok:
Install and run Ngrok to expose your server to the public.
For example: ngrok http 5000 will expose a local server running on port 5000 to a public URL.
Applications:
Host temporary APIs or web apps for testing.
Run bots or scripts that require internet access.
Share a development environment quickly without setting up complex hosting.
This approach is cost-effective, fast to deploy, and ideal for short-term projects or testing environments.
** Below is to download that scipt from the video if you don't want to copy it by hand.