Reference
Agent installation reference
Platforms, install modes, files, and removal for the Femtoport agent.
The agent connects a tunnel to the service or folder on your machine. A tunnel's agent token is a secret: anyone who obtains it may connect an agent to that tunnel. Keep it out of shared files and logs.
Installation modes
| Method | Result |
|---|---|
install-cli.sh or install-cli.ps1 | Installs a per-user CLI. Run femtoport to start it in the foreground; it does not install a service. |
run.sh or run.ps1 | Downloads a binary and runs it in the foreground. Stopping the process stops that agent. |
install.sh | Installs a Linux or macOS service, system-wide by default or per-user with --user. |
install.ps1 | Installs a Windows service; administrator access is required. |
The per-user CLI installer and foreground runner also support Termux. The shell service installer accepts Linux and macOS on x86-64, ARM64 and ARM variants recognized by the script. Android/Termux is currently rejected. The Windows service installer requires PowerShell 5.1 and Windows 10 / Server 2016 build 10240 or later; it selects an AMD64 or ARM64 binary. The requested platform must also exist in the release manifest.
See agent commands for options after installation.
Locations
| Installation | Binary | Service configuration |
|---|---|---|
| Linux/macOS system | /opt/femtoport/agent, linked as /usr/local/bin/femtoport-agent | /etc/femtoport-agent/agent.env |
| Linux/macOS user | ~/.local/share/femtoport/agent, linked as ~/.local/bin/femtoport-agent | ~/.config/femtoport-agent/agent.env |
| Windows service | %ProgramFiles%\Femtoport\femtoport-agent.exe | %ProgramData%\Femtoport\agent.env |
| Per-user CLI | ~/.femtoport/femtoport on Unix, %USERPROFILE%\.femtoport\femtoport.exe on Windows | Local state alongside the binary |
| Foreground runner | ./femtoport on Unix; ./femtoport.exe on Windows by default | Local state alongside the binary |
The per-user CLI installer links ~/.local/bin/femtoport on Unix and adds the installation directory to the user PATH on Windows. When passed a token, it writes femtoport.token beside the CLI binary, replacing any previously saved token there; without a token it leaves an existing token in place. Protect that file. The CLI installer does not start an agent automatically.
The Unix service uses systemd or launchd. A user service starts in the user's session; Linux users can enable lingering if they need it to start without a login. The installer preserves an existing token and target when rerun without replacements.
Installer options
The Unix service installer accepts --token, --target, --edge-url, --log-level, --user, --no-auto-update, --version and --dry-run. The Windows service installer accepts -Token, -Target, -EdgeUrl, -LogLevel, -NoAutoUpdate, -Version, -NoStart and -DryRun. The target is a fallback; the server's tunnel configuration takes precedence.
The CLI installer accepts --token, --version, and --dry-run on Unix, or -Token, -Version, and -DryRun on Windows. A pinned CLI version skips SHA-256 verification.
The foreground runners also accept an output path (--output or -OutputPath) and machine logging (--machine-logs or -MachineLogs). They require a token on the first run unless a saved token is already present.
Normally the installers and runners use the release manifest's SHA-256 value to verify downloads. With an explicit version, the Unix scripts and Windows foreground runner skip SHA-256 verification; the Windows service installer instead fetches a version-specific checksum and refuses installation if it cannot verify it. Use the default manifest path when possible.
Removal
The service uninstaller removes the service and installed binary but retains service configuration by default. --purge on Unix or -Purge on Windows also removes the configuration directory, including its token. The agent's own uninstall command requires --yes and accepts --purge. The Unix uninstall script also accepts --user and --dry-run. These service uninstallers do not remove the separate per-user CLI installation. To remove that installation, stop it, remove the per-user binary and token directory listed above, and remove its PATH entry or Unix symlink if no longer needed. Removing a local agent does not delete the tunnel in the dashboard.