HF PanelDocsv1.0.0

Share a local site with HF Tunnel

Give a website running on your computer a public https:// link with HF Tunnel, free from HF Server or through your own HF Panel server.

HF Tunnel gives a site on your computer a public address such as https://shop.port.hostfog.io, without router settings, port forwarding or a fixed IP. Use it to show a client your work, test on a phone, or receive webhooks.

This tutorial shows the free way (HF Server, no account), and then how to use your own HF Panel server instead.

You need: HF Server installed with a site in it (see Develop locally with HF Server).

1. Get the site ready

  1. In HF Server, open Control panel and make sure Apache is Running.
  2. Open Databases and click Root password if MySQL's root user has no password. Sites can't be shared until it has one.
  3. Open the site locally with Open on the Sites page and check it works.

2. Share it

  1. Click Share next to the site on the Sites or Tunnel page.
  2. In the Share dialog, check the Link name, for example shop (lowercase letters, numbers and -, up to 32 characters).
  3. Click Share.

After a few seconds the site shows Live link and its address. Click Copy link and send it. The link stays the same every time you share the site with the same name.

WordPress sends visitors to the address saved in its settings. For a quick look that is fine; for a client review, change WordPress Address and Site Address in WordPress admin › Settings › General to the link while it is shared, and change them back afterwards.

4. Stop sharing

Click Stop sharing next to the site. Closing HF Server also stops every link.

Warning: anyone with the link can open the site while it is shared. Don't share sites with private data or admin pages that have no password. phpMyAdmin, phpinfo() and your local site list are never reachable through a link.

5. Use your own server instead (optional)

If your hosting provider (or you, as administrator) has switched on HF Tunnel on an HF Panel server, links can run through it, at https://<name>.<tunnel domain>:

  1. In the Control Panel on that server, open Account › Password & security and create a Read & change API token.

  2. On your computer, add the server:

    bash
    hostfog servers add https://panel.example.com:8443 hf_xxxxxxxx --name myserver
    
  3. Share through it:

    bash
    hostfog share shop --server myserver --name shop
    

Administrators switch HF Tunnel on under Server Admin › Hosting › Tunnels: see Tunnels on your own server.