How-to guides
Run and maintain an agent
Choose a launcher, keep the agent connected, and isolate connection failures.
Open the tunnel in the dashboard. For an existing tunnel, open Agents → Agent tokens and choose View beside an active token. After the email check, the Run an agent panel shows commands for that token. Commands that include the token are credentials.
Choose how the agent stays running
| When you need | Use | How it stops |
|---|---|---|
| A quick test on your machine | Run in your terminal | Ctrl+C or closing the terminal |
| A command you can reuse as your own user | Install the femtoport CLI, then run femtoport | Ctrl+C or closing the terminal |
| An agent that stays available after you log out | Install as a service | Stop it with the platform’s service manager |
| An agent alongside a Compose application | Docker / docker-compose | Stop the container with Docker or Compose |
The CLI installer puts the command on your PATH. You start the process yourself. The service installer configures a background process under the operating system. If the dashboard does not offer shell installers, use All platforms and options for the available binaries and checksums. See installation details for service names and release artifacts.
Run the chosen command on a machine that can reach the saved target. For a system service, use an administrator shell. Once it starts, confirm the expected host appears in Connected agents and open the tunnel’s public URL. If you were using a foreground agent on that machine, stop it and check that the service remains connected and the URL still responds.
For Compose, put the agent and app on the same network and use the app service name and container port in Target URL, such as http://web:3000. Set the token in the launcher as FEMTOPORT_AGENT_TOKEN. For an app on the Docker host, use the host address reachable from the container and check that the app is listening on that interface. See the Compose walkthrough for a complete example.
Check where a request fails
Start with the strongest signal you have and test one known request through each part of the path.
| What you see | What to check next |
|---|---|
| Connected agents is empty | Check the foreground terminal, service manager, or container logs. Confirm the process is running with an active token for this tunnel. Check its outbound connection and DNS if the logs show connection failures. |
| The agent is connected and settings are pending, rejected, or disabled | Open Agents → Connected agents. A local restriction can block a backend even when it is selected in the dashboard. Check the local settings and logs. |
| The settings are applied but the page fails | Request the saved target from the agent’s network. For a container, check its network and the container port. For a folder, check that the agent user can read the path. |
| The target answers but the public address fails | Test the generated Femtoport URL, check Tunnel enabled, and try a private window if visitor sign-in is enabled. If only a custom hostname fails, check its DNS and TLS state. |
Use the installed agent’s --check-config with the same launch configuration to catch parse and validation errors before restarting. It checks local configuration. The connection and public URL checks above verify reachability.
Change or stop a running agent
For a foreground agent, stop it and rerun the appropriate command. For a service or a container, make persistent changes in its launcher and use the same launcher to restart it. In Connected agents, verify the host and version that reconnect, then exercise the public URL.
To replace a token, choose Add new under Agent tokens. Update the launcher and verify the new connection before revoking the old token. Revocation disconnects any process still using it. A one-time --token override does not replace an existing saved token file. See how the agent reads credentials.
To pause public traffic while you work, switch Tunnel enabled off. To stop the process itself, use its terminal, service manager, or container launcher.