A custom tunnel is used to make a service from your device available for access worldwide via this website.
- Running a webserver on your Raspberry Pi and accessing it worldwide.
- Accessing VNC remote desktop for Rapsberry Pi from anywhere.
- Any other custom project that uses TCP networking.
Custom tunnels are created by entering a command in your Raspberry Pi terminal. The Custom Tunnels page contains a helper button "Create Custom Tunnel" to help you form the correct command to create your tunnel. A full explanation of the different command line options is also available in the Command-Line Options section of this documentation.
The following is a list of example command for common types of tunnels:
• Creating a http tunnel to a webserver running on localhost port 80:
pitunnel --port=80 --http
• Naming a http tunnel, so that it can be accessed with a subdomain: tunnel_name.<user>.pitunnel.com:
pitunnel --port=80 --http --name=tunnel_name
• Creating a tunnel to a VNC server running on port 5900 of localhost:
• Naming the tunnel for easier identification in the tunnel list:
pitunnel --port=5900 --name=vnc
• Creating a tunnel to a http server running on another machine on your network:
pitunnel --host=192.168.1.229 --port=80 --http
• Adding HTTP authentication to a named tunnel at my_server.<user>.pitunnel.com:
pitunnel --port=80 --http --name=my_server --http-auth=<username>:<password>
• Making a tunnel run in the background, and load automatically every time your device powers on:
pitunnel --port=80 --http --persist (see Persistent Tunnels for more information)
Testing your tunnel
To find out the world-wide accessible address for your custom tunnel, go to the Custom Tunnels page:
The "Available At" column shows either a Hostname and Port Number pair for connecting to your tunnel, or a HTTP address if you used the
Next: Host a Webserver on your Raspberry Pi