How-to guides
Share a folder or manage files
Publish a static site or use an authenticated browser file manager.
Choose Static folder to publish a site or downloadable files. Choose File manager when authorized people need to browse, upload, create folders, or delete files in a folder. Both use an absolute path on the machine running the agent; they do not upload the whole folder to Femtoport.
Publish a static folder
- Put the files to publish in a dedicated folder on the agent machine. For a home page, include
index.html; for example, use/srv/siteon Linux orC:\siteon Windows. The agent's account needs permission to read the folder and files. - Sign in to the dashboard. The workspace needs credit and an active entitlement to serve traffic. Under Credit and billing, the owner can activate a free trial if available, redeem a code, or buy credit.
- Under Tunnels, select Create new tunnel, choose Static folder, and enter the full Folder path, such as
/srv/site. Select Create tunnel. - In the Agent token dialog, copy the token. Static content is public once the agent connects unless you set a tunnel login: close the dialog, open the tunnel's settings, turn on Require basic auth under Basic auth, and add a user before starting the agent if the content should be private.
- On the machine containing the folder, replace
YOUR_AGENT_TOKENwith the copied token and run the command for your system. You can instead copy the filled-in Run in this folder command from Linux/macOS or Windows in the token dialog. The command downloads the agent into the current folder and runs it in the foreground; keep the terminal open. Linux/macOS:
Windows PowerShell:curl -fsSL https://cdn.femtoport.com/run.sh | sh -s -- --token='YOUR_AGENT_TOKEN'$ProgressPreference = 'SilentlyContinue' $p=Join-Path (Get-Location) 'femtoport-run.ps1' Invoke-WebRequest -UseBasicParsing https://cdn.femtoport.com/run.ps1 -OutFile $p & $p -Token 'YOUR_AGENT_TOKEN' - Wait for Online and open the public HTTPS URL. Confirm the expected page and assets load from another browser or device. For background operation, the token dialog offers Install as a service. It also offers Install the femtoport CLI for a per-user foreground command.
Static content is public to anyone with the URL unless you enable Require basic auth and add a user in the tunnel's Basic auth settings. Share only files intended for those visitors. The static server does not list directories; it serves index.html or index.txt for a directory, and blocks dotfiles except under /.well-known. Check what you publish, including files reached through links or symbolic links. Static mode serves files; it does not run server-side application code.
Manage a folder in a browser
- Choose a dedicated folder on the agent machine and give the agent account the filesystem permissions needed for the intended operations. Uploads and deletions change real files in that folder.
- In Tunnels, select Create new tunnel, expand More ways to share, select File manager, enter the absolute Folder path, and select Create tunnel.
- In Agent token, copy the token and keep it private, then close the dialog. Anyone with the token can run an agent for this tunnel.
- Open the tunnel's settings, and under Basic auth enable Require basic auth and add a username and strong password. The file manager stays unavailable until there is an active Basic auth user.
- On the machine containing the folder, replace
YOUR_AGENT_TOKENwith the copied token and run the command for your system. You can instead copy the filled-in Run in this folder command from the token dialog. Keep the terminal open. Linux/macOS:
Windows PowerShell:curl -fsSL https://cdn.femtoport.com/run.sh | sh -s -- --token='YOUR_AGENT_TOKEN'$ProgressPreference = 'SilentlyContinue' $p=Join-Path (Get-Location) 'femtoport-run.ps1' Invoke-WebRequest -UseBasicParsing https://cdn.femtoport.com/run.ps1 -OutFile $p & $p -Token 'YOUR_AGENT_TOKEN' - Once the tunnel is Online, open its HTTPS URL and sign in with that user. Browse and download files, upload a test file, create a folder, and delete the test file if the account and filesystem permissions allow it. Uploads are limited to 100 MiB per file; dotfiles and symbolic links are excluded.
Anyone with file-manager credentials may change or delete files allowed by the agent's filesystem account. Give access only to trusted people and keep backups. To stop access, disable Tunnel enabled or remove the relevant Basic auth user; delete the tunnel when it is no longer needed.
If the folder is unavailable
Check that the agent is running on the machine that holds the folder, that the path is absolute (not ~ or ./), and that the agent account can access it. A service may run as a different user from your terminal. Check Online, Tunnel enabled, credit and entitlement; Online only means the agent is connected. For a static root with no index, add index.html or request a specific file. For a file manager, check that Basic auth is enabled and has an active user.
See Expose a web app or API if the content needs an application server, or Create your first tunnel for the basics.