Start Localtonet Automatically on System Boot
An interactive Localtonet process ordinarily depends on the terminal session in which it is running. Installing Localtonet as an operating system service lets the client start automatically after a reboot, continue running after logout, and operate without an open terminal. Localtonet provides service-management commands for Windows, systemd-based Linux distributions, and macOS launchd. The client device, network connection, and relevant tunnel must all remain available for a public endpoint to work.
📋 What's in this guide
Why Run Localtonet as a Service?
Running Localtonet interactively is convenient for development, demonstrations, and short tests. It is less suitable when the client must reconnect after a reboot or continue running after the user logs out. Service mode delegates startup and process management to the operating system instead of relying on a terminal window.
This can be useful for webhook receivers, self-hosted applications, game servers, home lab devices, and other services that need recurring remote access. Service mode keeps the Localtonet client available, but it does not override the normal tunnel lifecycle. A tunnel must still be configured and running, and the selected client device must be connected. Availability can also depend on the machine, local service, network connection, relay availability, and applicable account limits.
Service Mode
- Starts the Localtonet client automatically after reboot
- Runs without an open terminal window
- Continues operating after user logout
- Uses Windows Service, systemd, or launchd integration
- Can be managed with Localtonet service commands
Interactive Terminal Run
- Normally depends on the active process and session
- Must be started again after a reboot
- Can be closed accidentally with the terminal
- Requires manual process management
Before You Start
✅ Checklist
- Localtonet is installed on the machine. Current downloads and installation methods are available on the Localtonet download page.
- You have the device-specific Localtonet AuthToken that will identify this client.
- You have Administrator privileges on Windows or sudo/root privileges on Linux and macOS.
- On Linux, the operating system uses systemd. Termux is not supported by these service commands.
- The Localtonet executable is available at the path from which the service will be installed.
An AuthToken identifies a Localtonet client device. Do not publish it in screenshots, documentation, source repositories, support posts, or shared shell transcripts. Replace the placeholder below locally and treat the resulting command as sensitive.
On Windows, open Command Prompt or PowerShell with Run as administrator and run the command without sudo. On Linux and macOS, run the documented service commands with sudo.
Step 1: Install Localtonet as a Service
Localtonet uses the same service flags on all three desktop operating systems, but the shell syntax differs because Windows does not normally provide the sudo command. Installation registers the appropriate operating system service. Starting it is a separate step.
Windows
Open Command Prompt or PowerShell as Administrator, change to the directory containing Localtonet if necessary, and run:
localtonet --install-service --authtoken <YOUR_TOKEN>
localtonet --start-service --authtoken <YOUR_TOKEN>
Linux with systemd
Open a terminal and run:
sudo localtonet --install-service --authtoken <YOUR_TOKEN>
sudo localtonet --start-service --authtoken <YOUR_TOKEN>
macOS
Open Terminal and run:
sudo localtonet --install-service --authtoken <YOUR_TOKEN>
sudo localtonet --start-service --authtoken <YOUR_TOKEN>
Windows: A Windows Service that can be viewed in services.msc.
Linux: A systemd unit at /etc/systemd/system/localtonet.service.
macOS: A launchd job under ~/Library/LaunchAgents/.
Step 2: Start, Stop, Check, or Remove the Service
The Localtonet service flags are consistent across supported platforms. Use an elevated Windows shell without sudo, or prefix the commands with sudo on Linux and macOS. Stopping the client disconnects that device, so public endpoints provided through it will be unavailable until the client reconnects and the relevant tunnels are running.
Start the installed service
Run localtonet --start-service --authtoken <YOUR_TOKEN>. Add sudo on Linux and macOS.
Stop the service
Run localtonet --stop-service --authtoken <YOUR_TOKEN>. This stops the Localtonet client service on the device.
Check service status
Run localtonet --status-service --authtoken <YOUR_TOKEN> to inspect the service through the Localtonet client.
Remove the service
Run localtonet --remove-service --authtoken <YOUR_TOKEN> when you no longer want Localtonet registered for automatic startup.
Service mode starts the Localtonet client. Tunnel configuration and tunnel state remain separate. Create the required tunnel in the dashboard or REST API, select the correct device and relay option, and start that tunnel before using its public URL or host and port.
Step 3: Verify the Service
Check both the operating system service and the Localtonet dashboard. An operating system status can confirm that the client process is running, while the dashboard confirms whether the device and tunnel are connected.
services.msc and locate the Localtonet service, or use the Localtonet --status-service command.
systemctl status localtonet to inspect the documented systemd unit.
journalctl -u localtonet -f to follow journal entries for the unit.
--status-service and confirm that the launchd job exists under ~/Library/LaunchAgents/.
For a complete test, reboot the machine, wait for networking to become available, and then confirm that the device reconnects in the Localtonet dashboard. Also verify the specific public endpoint you intend to use. A running client alone does not prove that the local application is listening or that its tunnel is started.
Updating Localtonet
Before replacing the executable, stop the service. Install the current Localtonet release using the method appropriate for your operating system, start the service again, and then check its status. If an update changes the executable location or service integration, follow the current platform instructions on the download page and reinstall the service if required.
Linux quick installer
sudo localtonet --stop-service --authtoken <YOUR_TOKEN>
curl -fsSL https://localtonet.com/install.sh | sh
sudo localtonet --start-service --authtoken <YOUR_TOKEN>
sudo localtonet --status-service --authtoken <YOUR_TOKEN>
macOS with Homebrew
sudo localtonet --stop-service --authtoken <YOUR_TOKEN>
brew update
brew upgrade localtonet
sudo localtonet --start-service --authtoken <YOUR_TOKEN>
sudo localtonet --status-service --authtoken <YOUR_TOKEN>
Windows
Stop the service from an elevated Command Prompt or PowerShell, obtain the current Windows build from the Localtonet download page, replace or update the executable according to the current instructions, and start the service again. Check services.msc or use --status-service afterward.
Troubleshooting
🪟 Access denied on Windows
Close the current shell, open Command Prompt or PowerShell with Run as administrator, and run the command again. Do not prefix the Windows command with sudo.
🪟 Service not visible in services.msc
Confirm that --install-service completed in an elevated shell and that you ran the correct executable. Use --status-service to inspect the result. If installation failed, correct the reported error before attempting removal and reinstallation.
🐧 Linux service fails to start
Run systemctl status localtonet for service status and journalctl -u localtonet -f for live journal output. Confirm that systemd is available, the Localtonet executable still exists at the installed location, and the token has not been revoked.
🐧 Termux service mode is unavailable
Termux is not a systemd environment, so the documented Linux service installation is not supported there. Use the Localtonet Android app instead.
🍎 launchd job does not start on macOS
Confirm that the job was registered under ~/Library/LaunchAgents/ and run --status-service. If the Localtonet executable was moved during an update, follow the current macOS installation instructions and reinstall the service if necessary.
🔑 AuthToken was revoked or replaced
A revoked token can no longer authenticate the device. Remove the old service registration and install it again with the intended device-specific token. Keep both the old and new token out of logs, screenshots, and public command examples.
Command Reference
| Command or flag | What it does | Platform |
|---|---|---|
--install-service | Registers Localtonet with the supported operating system service manager | Windows · Linux · macOS |
--start-service | Starts the installed Localtonet service | Windows · Linux · macOS |
--stop-service | Stops the running Localtonet service | Windows · Linux · macOS |
--status-service | Checks the service status through Localtonet | Windows · Linux · macOS |
--remove-service | Removes the Localtonet service registration | Windows · Linux · macOS |
systemctl status localtonet | Shows systemd status for the documented unit | Linux only |
journalctl -u localtonet -f | Follows journal entries for the Localtonet unit | Linux only |
services.msc | Opens the Windows Services management console | Windows only |
--install-service--start-service--stop-service--status-service--remove-serviceFrequently Asked Questions
Do I need to run --install-service after every restart?
No. Installation registers the service for automatic startup. Reinstall it only when necessary, such as after removing the service, changing the executable location, or following updated platform instructions.
Does service mode automatically start every tunnel?
Service mode starts the Localtonet client on the selected device. Tunnel creation and tunnel state are separate. Confirm in the dashboard that each required tunnel is configured and running.
Does service mode work on Raspberry Pi or ARM Linux?
Localtonet provides Linux downloads for x64, ARM, and ARM64 architectures. On a Raspberry Pi or another ARM device, select the correct build and use these service instructions only when the installed Linux distribution uses systemd.
Does Linux service mode work in Termux?
No. The Localtonet download instructions state that Termux is not supported for systemd service mode. Use the Localtonet Android app for Android devices.
Can I install the Linux service without sudo?
The documented Linux service setup requires root privileges and creates the unit at /etc/systemd/system/localtonet.service. Use sudo or an equivalent root session.
What happens if the AuthToken is revoked?
The client cannot continue authenticating with a revoked token. Remove the old service registration and install the service using the intended replacement token. Never expose either token publicly.
Start Localtonet Automatically
Install Localtonet as a Windows Service, systemd unit, or macOS launchd job, then verify that both the client device and the required tunnels reconnect after reboot.
Download Localtonet →