In this guide, we will explore how you can host your website directly from your desktop using Packetriot. By the end of this tutorial, you'll have your own self-hosted website up and running, accessible to anyone with an internet connection. So, let's dive in and get started!
This tutorial assumes that you already have a web server and a running website locally and you only need to make it available to the world.
First is create a packetriot account as you will going it for authentication later.
Second is download the right variation of packetriot for your machine here: https://packetriot.com/downloads
Extract it to any directory of your choice, in this example we will extract it to D:/Application/Packetriot/
Next is add it to your system variable so you can use packetriot on any directory.
After adding it to your system variable, try it in your windows terminal to check if everything is working.
pktriot version
You should see this response if you have successfully added packetriot in your environment system.
Now the exciting part is to configure the packetriot to make your website available to the world
Type in this in your terminal, pktriot configure
Then select configuration file directory (packetriot will ask and guide you these during the process)
Then login your packetriot account
Then select a region (select your region so it'll be more optimal and load faster)
After that you should see a hostname provided for you by packetriot
Next is to expose your localserver, to do that just type in these into your terminal and hit enter
pktriot tunnel http add --domain {hosted-provided-by-packetriot} --destination localhost --http 80 --letsencrypt
Now you should be able to access your localhost through the hostname that packetriot provided to you.
Now if you have a custom domain, what you need to do is just type in the same command but instead of hostname that packetriot provided to you, use your domain instead.
pktriot tunnel http add --domain yourcustomdomain.com --destination localhost --http 80 --letsencrypt
Now login to your domain manager and add a cname record, use your hostname that packetriot provided for you
Also you should add that custom domain in packetriot, login your packetriot into their website and add your domain.
You also need verify it, packetriot will provided you a guide and a TXT record to put in your domain manager to verify that you're the owner of the domain.
After that you should be able to see your website to that custom domain.