Pagekite.py is tool using reverse proxy to create a tunnel to your localhost which is then publicly accessible from outside your networks, and this is also known as localhost tunneling which is especially useful when you want to quickly test or access a local running web app behind NAT and firewall from outside of your networks and don’t want to go through the complicated processes such as: buying a cloud-based server like vps for dns configuration with public static ip, or deployment to cloud based instances like aws ec2, and etc.
- Pagekite backend: A pagekite backend is your local running web app that is behind NAT or firewall and does not have publicly accessible static ip address and domain name. It is the one you want to be exposed to internet.
- Pagekite frontend: A pagekite frontend is a proxy server that is on the internet with a publicly accessible static ip address or domain name and to which a pagekite backend is connecting to for proxy and also through which outsiders can access for further accessing your local running web app.
How to install pagekite.py
- Install for backend (Mac, Linux)
- Install for frontend (Linux - Ubuntu)
Note that installing with deb (apt) or rpm (yum) will install bonus scripts for auto start and upgrade and configs, so it should be preferred on linux (ubuntu or centos).
How to config pagekite.py frontend
How to config pagekite.py backend with rc file and make connection to expose local services
- Create a config file at: ~/.pagekite.rc with below content
- Run command below to expose http://localhost:8080 for example:
- Run command below to expose running web app on other known hosts (with ip: x.x.x.x):
- Run command below to expose a local directory and files:
- Run command below to expose html files:
- NOTE: If need different KITENAMEs for above examples, multiple kitename entries should be added in ~/.pagekite.rc file:
How to connect to frontend directly from command line without using ~/.pagekite.rc
- Pagekite.py can not only be used for exposing http service, but also ssh or technically any other protocols
- Pagekite.py can also be used to quickly expose static files or directories thanks to its built web http server
- pagekite.me is a paid frontend where you can register a custom name like http://youname.pagekite.me for public access
- Similar tools and services are also available, such as: ngrok, localtunnel, and etc.
- Pagekite is open source and available here
- PageKite Technical Manual
- Access localhost with pagekite
- HOW TO RUN A PAGEKITE SERVER TO EXPOSE YOUR RASPBERRY PI