Termux is a terminal app for Android. The Termux package runs the Localtonet console client, the same localtonet command as on Linux, on an ARM64 Android device without the Localtonet app.
Before you start #
- An Android device with an ARM64 CPU and Termux installed. The package is built for ARM64 only.
- An internet connection in Termux. The package needs the .NET 9 runtime of Termux (
dotnet-runtime-9.0), and the Termux package manager installs it automatically together with Localtonet. ASP.NET Core is not required. - Your AuthToken. Select Copy on the AuthToken card of the Dashboard, or copy a token from My Tokens. Use a separate token for each device.
Termux or the Android app? The Android app signs in with a QR code or a PIN and keeps running in the background by itself. Choose Termux when you want the command line client on the phone.
Install #
-
Run the install script #
The install script for Linux recognizes Termux. It downloads the Termux package and installs it with
pkg, which also installs the runtime.Termuxcurl -fsSL https://localtonet.com/install.sh | shIf
curlis not installed yet, install it first withpkg install curl. -
Check the install #
The script ends by printing the installed version. You can print it again at any time:
Termuxlocaltonet --version
Install a downloaded package instead #
The packages are listed at the end of this page: a DEB file, and a ZIP archive that contains the same DEB. Download one of them in Termux, extract the ZIP if you took that one, and install the DEB with the Termux package manager. Replace <PACKAGE_FILE> with the name of the DEB file:
pkg install ./<PACKAGE_FILE>.debUse pkg for this, so that missing dependencies are downloaded as well. Install the ZIP package in the list below shows the commands with the real file names.
Start the client #
-
Start it with your token #
Termuxlocaltonet --authtoken <YOUR_TOKEN>The client stores the token locally. The next time you can start it with
localtonetalone. If you start it without a stored token it asksPlease Enter AuthToken or PIN. At this prompt you can also type the 6-digit PIN that My Tokens shows for a token. A PIN is valid for one minute. -
Read the output #
In Termux the client does not draw the live table of the desktop builds. It writes one plain line per change:
Line Meaning Connection: ConnectedThe state of the session. Other values are ConnectingandDisconnected.AuthTokenName: …The name of the token the client signed in with. OPEN …,ADDED …A tunnel that runs on this device, with its public address, protocol and local target. STATUS …A tunnel changed its status. CLOSED …A tunnel was stopped or removed. Authentication failed: AuthToken was rejected.The token is not accepted. Copy it again from My Tokens. -
Start a tunnel #
The token now shows Online under My Tokens. Create and start a tunnel for it in the dashboard, see Quick start. A tunnel to
127.0.0.1reaches services that run on the phone itself, for example inside Termux.
Press Ctrl + C to stop the client. To sign in with another token, start the client again with the new --authtoken.
Limits #
| Topic | In Termux |
|---|---|
| CPU | ARM64 only. |
| Service mode | Not supported. --install-service requires systemd and root privileges, and Termux is not supported. The client runs while its Termux session is open. To keep a phone connected without an open terminal, use the Android app instead. |
| Background | Android may stop Termux while the screen is off. Termux has its own wake lock for this, termux-wake-lock. |
| Sign-in | Token or PIN at the command line. QR codes are for the Android app. |
Upgrade #
Run the install script again, or download the current DEB and install it with pkg install as before. To install the same version once more, use pkg reinstall ./<PACKAGE_FILE>.deb.
Under My Tokens, the Client column shows the version the device last reported and a Need Update badge when a newer one is available.
Remove #
The package is named termux-localtonet:
pkg uninstall termux-localtonetTroubleshooting #
Termux .NET runtime bulunamadı. Çalıştırın: pkg install dotnet-runtime-9.0
This message of the launcher is in Turkish and means that the .NET runtime of Termux was not found. Install it with pkg install dotnet-runtime-9.0, then start localtonet again. It can appear when the DEB was installed with dpkg -i, which does not download dependencies.
localtonet.dll bulunamadı. Localtonet paketini yeniden kurun.
The launcher did not find the client files. Install the Localtonet package again.
The package manager cannot install the package
The package is for ARM64 and needs dotnet-runtime-9.0 in version 9.0.20 or newer from the Termux repository. Run pkg upgrade to bring Termux up to date, then install the package again. On a device that is not ARM64, use the Android app.
Install failed: 'Linux systemd service installation' requires elevated (admin/root) privileges.
Service mode is not supported in Termux. Start the client in a Termux session, or use the Android app.
Wrong Token!
The client expects the 33-character AuthToken from My Tokens, or a 6-digit PIN that has not expired. Copy the token again and enter it at the prompt.
Related pages #
The Termux packages are listed below.
Termux for Android
Run the console client in Termux on an ARM64 Android device. The package manager installs the required .NET runtime automatically. ASP.NET Core is not required.
Install the ZIP package
curl -fLO https://localtonet.com/download/localtonet-termux.zip
unzip -o localtonet-termux.zip
pkg install ./localtonet.deb
localtonet --authtoken <YOUR_TOKEN>
The direct DEB download can be installed with pkg install ./localtonet-termux.deb. An internet connection is required to install missing dependencies.