10 min read

How to Start Localtonet Automatically

Run Localtonet as a background service so your tunnels start automatically on every boot. Step-by-step setup for Windows, Linux and macOS

⚙️ Service Mode · Windows · Linux · macOS · Auto-Start

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.

🪟 Windows Service 🐧 Linux systemd 🍎 macOS launchd

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
🔁 Automatic startup The operating system can start the Localtonet client after the machine reboots.
🖥️ Headless operation The client can run without a terminal remaining open, which is useful on unattended machines.
⚙️ Native service integration Localtonet uses Windows Service, systemd on supported Linux systems, and launchd on macOS.
📋 Status controls Built-in flags let an administrator start, stop, inspect, or remove the installed service.

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.
Protect your AuthToken

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.

Use the correct elevated shell

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>
What is registered on each platform?

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.

1

Start the installed service

Run localtonet --start-service --authtoken <YOUR_TOKEN>. Add sudo on Linux and macOS.

2

Stop the service

Run localtonet --stop-service --authtoken <YOUR_TOKEN>. This stops the Localtonet client service on the device.

3

Check service status

Run localtonet --status-service --authtoken <YOUR_TOKEN> to inspect the service through the Localtonet client.

4

Remove the service

Run localtonet --remove-service --authtoken <YOUR_TOKEN> when you no longer want Localtonet registered for automatic startup.

Installing a service does not create or start a tunnel

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.

🪟 Windows Open services.msc and locate the Localtonet service, or use the Localtonet --status-service command.
🐧 Linux status Run systemctl status localtonet to inspect the documented systemd unit.
📜 Linux logs Run journalctl -u localtonet -f to follow journal entries for the unit.
🍎 macOS Use --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-serviceRegisters Localtonet with the supported operating system service managerWindows · Linux · macOS
--start-serviceStarts the installed Localtonet serviceWindows · Linux · macOS
--stop-serviceStops the running Localtonet serviceWindows · Linux · macOS
--status-serviceChecks the service status through LocaltonetWindows · Linux · macOS
--remove-serviceRemoves the Localtonet service registrationWindows · Linux · macOS
systemctl status localtonetShows systemd status for the documented unitLinux only
journalctl -u localtonet -fFollows journal entries for the Localtonet unitLinux only
services.mscOpens the Windows Services management consoleWindows only
--install-service
DoesRegisters servicePlatformAll supported desktop systems
--start-service
DoesStarts servicePlatformAll supported desktop systems
--stop-service
DoesStops servicePlatformAll supported desktop systems
--status-service
DoesChecks statusPlatformAll supported desktop systems
--remove-service
DoesRemoves servicePlatformAll supported desktop systems

Frequently 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 →
auto-start service mode systemd launchd windows service linux localhost boot startup background service raspberry pi

Corrections & updates

Substantive changes approved by the Localtonet editorial team are listed transparently below.

Corrected Windows command syntax by removing sudo and separating Windows from Linux and macOS examples. Removed unsupported automatic crash-restart and platform-wide logging claims. Clarified that service mode starts the client but does not create or start tunnels. Replaced unusable service-name placeholders with the documented localtonet systemd unit. Added an actual verification section, repaired the update anchor, qualified update behavior, corrected availability language, added token-handling guidance, and brought the FAQ markup i...

Localtonet is a secure multi-protocol tunneling and proxy platform designed to expose localhost, devices, private services, and AI agents to the public internet supporting HTTP/HTTPS tunnels, TCP/UDP forwarding, mobile proxy infrastructure, file server publishing, latency-optimized game connectivity, and developer-ready AI agent endpoint exposure from a single unified control plane.

support