Tutorials
Publish a folder as a static site
Serve an HTML file directly from a folder on the agent machine.
You’ll publish a single HTML file using the agent’s built-in static server. Use a Linux or macOS shell and a workspace where you can create a tunnel.
1. Make a folder with one page
site_dir="$(mktemp -d)"
printf '%s\n' '<h1>My static site</h1>' > "$site_dir/index.html"
printf '%s\n' "$site_dir" Copy the absolute path printed by the last command. The folder contains only the file you intend to share.
2. Share the folder
- Open the static folder form and sign in if prompted.
- Paste the path into Folder path and choose Create tunnel.
- Under Run an agent, choose Run in your terminal for Linux/macOS. Run the copied command on the machine that owns the folder.
- Open the tunnel’s HTTPS address. You should see My static site.
3. Make a change and check it
In the first terminal, run the following command and reload the public page.
printf '%s\n' '<h1>My updated static site</h1>' > "$site_dir/index.html" The heading changes while the tunnel keeps its address. Switch Tunnel enabled off in the dashboard and stop the foreground agent with Ctrl+C when you finish.