tuna-cli
Installation
The tuna-cli container image for Docker, Podman and Kubernetes has its own page.
- Windows
- macOS
- Linux
- FreeBSD
Installation using winget
Open PowerShell and run the command:
winget install --id yuccastream.tuna ; powershell
Installing the MSI package
Download the latest version of tuna using this link and run the installation by double-clicking the file.
🖌 Authenticity verification
Starting from version 0.27.4, all artifacts are signed using cosignOpens in a new tab. To verify the originality of the archive, install the cosign clientOpens in a new tab, download the public key, and perform the verification.
winget install GnuPG.Gpg4win
Invoke-WebRequest -Uri "https://releases.tuna.am/tuna/latest/tuna_x64.msi" -OutFile "tuna_x64.msi"
Invoke-WebRequest -Uri "https://releases.tuna.am/tuna/latest/tuna_x64.msi.sig" -OutFile "tuna_x64.msi.sig"
Invoke-WebRequest -Uri "https://releases.tuna.am/tuna.asc" -OutFile "tuna.asc"
gpg --import tuna.asc
gpg --verify tuna_x64.msi.sig tuna_x64.msi
Manual installation
Open PowerShell and run the commands one by one:
- AMD64
- ARM64
winget install GnuPG.Gpg4win
cd $env:TEMP
Invoke-WebRequest -Uri "https://releases.tuna.am/tuna/latest/tuna_windows_amd64.zip" -OutFile "$env:TEMP\tuna_windows_amd64.zip"
Invoke-WebRequest -Uri "https://releases.tuna.am/tuna/latest/tuna_windows_amd64.zip.sig" -OutFile "$env:TEMP\tuna_windows_amd64.zip.sig"
Invoke-WebRequest -Uri "https://releases.tuna.am/tuna.asc" -OutFile "$env:TEMP\tuna.asc"
gpg --import tuna.asc
gpg --verify tuna_windows_amd64.zip.sig tuna_windows_amd64.zip
Expand-Archive -Path "$env:TEMP\tuna_windows_amd64.zip" -DestinationPath "$env:TEMP\tuna" -Force
Copy-Item -Path "$env:TEMP\tuna\tuna.exe" -Destination "$env:USERPROFILE\AppData\Local\Microsoft\WindowsApps" -Force
winget install GnuPG.Gpg4win
cd $env:TEMP
Invoke-WebRequest -Uri "https://releases.tuna.am/tuna/latest/tuna_windows_arm64.zip" -OutFile "$env:TEMP\tuna_windows_arm64.zip"
Invoke-WebRequest -Uri "https://releases.tuna.am/tuna/latest/tuna_windows_arm64.zip.sig" -OutFile "$env:TEMP\tuna_windows_arm64.zip.sig"
Invoke-WebRequest -Uri "https://releases.tuna.am/tuna.asc" -OutFile "$env:TEMP\tuna.asc"
gpg --import tuna.asc
gpg --verify tuna_windows_arm64.zip.sig tuna_windows_arm64.zip
Expand-Archive -Path "$env:TEMP\tuna_windows_arm64.zip" -DestinationPath "$env:TEMP\tuna" -Force
Copy-Item -Path "$env:TEMP\tuna\tuna.exe" -Destination "$env:USERPROFILE\AppData\Local\Microsoft\WindowsApps" -Force
Verify the installation
To make sure the installation was successful, run the command:
tuna help
Installation using brew
To install brew, follow the instructionsOpens in a new tab, then run the command in the terminal:
brew install yuccastream/tap/tuna
If you previously installed tuna manually or using the script, remove the previous version:
sudo rm -f /usr/local/bin/tuna
Installation using script
Run the command in the terminal:
- curl
- wget
sh -c "$(curl -sSLf https://releases.tuna.am/tuna/get.sh)"
sh -c "$(wget -qO- https://releases.tuna.am/tuna/get.sh)"
Manual installation
Open the terminal and run the following commands:
- ARM64
- AMD64
cd $(mktemp -d)
curl -sfSL "https://releases.tuna.am/tuna/latest/tuna_darwin_arm64.tar.gz" | tar -f - -xz
chmod +x tuna
sudo mv -f tuna /usr/local/bin/tuna
cd $(mktemp -d)
curl -sfSL "https://releases.tuna.am/tuna/latest/tuna_darwin_amd64.tar.gz" | tar -f - -xz
chmod +x tuna
sudo mv -f tuna /usr/local/bin/tuna
The binary file is signed and notarizedOpens in a new tab with Apple under the name:
Developer ID Application: Lev Aminov (FW65BD237L)
You can verify locally using the command:
codesign -dv --verbose=4 $(which tuna)
Verify the installation
To make sure the installation was successful, run the command:
tuna help
Supported architectures
| Architecture | Description |
|---|---|
| AMD64 (x86_64) | Standard PCs and servers |
| ARM64 (aarch64) | Raspberry Pi 3/4/5, Apple Silicon (in Linux VM), ARM servers |
| ARMv7 | Raspberry Pi 2, most 32-bit ARM SBCs |
| ARMv6 | Raspberry Pi 1, Pi Zero / Zero W |
| ARMv5 | Older embedded devices |
| MIPS | Routers and embedded devices (big-endian) |
| MIPS LE | Routers and embedded devices (little-endian) |
| RISC-V 64 | RISC-V boards (e.g., NanoKVM) |
Installation using script
Run the command in the terminal:
- curl
- wget
sh -c "$(curl -sSLf https://releases.tuna.am/tuna/get.sh)"
sh -c "$(wget -qO- https://releases.tuna.am/tuna/get.sh)"
The script will detect your distribution, add the repository, and install the package if possible. Otherwise, it will download the binary file and install it to a PATH executable directory.
Manual installation
- Debian/Ubuntu
- SUSE/OpenSUSE
- RHEL/Fedora
- ALT Linux
- Arch Linux
- Linux
For Debian and based distributions (Ubuntu, Mint, and others), run the following commands in the terminal:
sudo apt update
sudo apt install -y ca-certificates curl gnupg
curl -fsSL https://code.tuna.am/api/packages/tuna/debian/repository.key | sudo gpg --dearmor --batch --yes -o /usr/share/keyrings/tuna-forgejo.gpg
echo 'deb [signed-by=/usr/share/keyrings/tuna-forgejo.gpg] https://code.tuna.am/api/packages/tuna/debian stable main' | sudo tee /etc/apt/sources.list.d/tuna-forgejo.list
sudo apt update
sudo apt install -y tuna-cli
For SUSE and OpenSUSE, run the following commands in the terminal:
sudo zypper addrepo --repo https://code.tuna.am/api/packages/tuna/rpm/stable.repo
sudo zypper install -y tuna-cli
For RHEL and based distributions (CentOS, Rocky Linux, AlmaLinux, as well as Fedora), run the following commands in the terminal:
sudo curl -fsSL https://code.tuna.am/api/packages/tuna/rpm/stable.repo -o /etc/yum.repos.d/tuna-forgejo.repo
sudo dnf install -y tuna-cli
For ALT LinuxOpens in a new tab, run the following commands in the terminal:
sudo apt-get update
sudo apt-get install -y curl apt-repo
sudo rpm --import https://releases.tuna.am/tuna.asc
sudo apt-repo add rpm https://code.tuna.am/api/packages/tuna/alt/stable.repo $(arch) classic
sudo apt-repo add rpm https://code.tuna.am/api/packages/tuna/alt/stable.repo noarch classic
sudo apt-get update
sudo apt-get install -y tuna-cli
For Arch Linux, add the repository and install the package:
curl -fsSL https://code.tuna.am/api/packages/tuna/arch/repository.key -o tuna.key
sudo pacman-key --add tuna.key
sudo pacman-key --lsign-key tuna@noreply.code.tuna.am
printf '\n[tuna.code.tuna.am]\nSigLevel = Required\nServer = https://code.tuna.am/api/packages/tuna/arch/stable/$arch\n' | sudo tee -a /etc/pacman.conf
sudo pacman -Sy tuna-cli
If tuna is already installed from the AUR, remove the old package first: sudo pacman -R tuna.am-bin.
To install on any Linux system (NixOS, Alpine Linux, and others), run the following commands in the terminal:
- AMD64
- ARM64
- ARMv7
- ARMv6
- ARMv5
- MIPS
- MIPS LE
- RISC-V 64
cd $(mktemp -d)
curl -sfSL -O "https://releases.tuna.am/tuna/latest/tuna_linux_amd64.tar.gz" -O "https://releases.tuna.am/tuna/latest/tuna_linux_amd64.tar.gz.sig"
curl -sfSL -O https://releases.tuna.am/tuna.asc
gpg --import tuna.asc
gpg --verify tuna_linux_amd64.tar.gz.sig tuna_linux_amd64.tar.gz
tar -xzf tuna_linux_amd64.tar.gz
chmod +x tuna
sudo mv -f tuna /usr/local/bin/tuna
cd $(mktemp -d)
curl -sfSL -O "https://releases.tuna.am/tuna/latest/tuna_linux_arm64.tar.gz" -O "https://releases.tuna.am/tuna/latest/tuna_linux_arm64.tar.gz.sig"
curl -sfSL -O https://releases.tuna.am/tuna.asc
gpg --import tuna.asc
gpg --verify tuna_linux_arm64.tar.gz.sig tuna_linux_arm64.tar.gz
tar -xzf tuna_linux_arm64.tar.gz
chmod +x tuna
sudo mv -f tuna /usr/local/bin/tuna
cd $(mktemp -d)
curl -sfSL -O "https://releases.tuna.am/tuna/latest/tuna_linux_armv7.tar.gz" -O "https://releases.tuna.am/tuna/latest/tuna_linux_armv7.tar.gz.sig"
curl -sfSL -O https://releases.tuna.am/tuna.asc
gpg --import tuna.asc
gpg --verify tuna_linux_armv7.tar.gz.sig tuna_linux_armv7.tar.gz
tar -xzf tuna_linux_armv7.tar.gz
chmod +x tuna
sudo mv -f tuna /usr/local/bin/tuna
cd $(mktemp -d)
curl -sfSL -O "https://releases.tuna.am/tuna/latest/tuna_linux_armv6.tar.gz" -O "https://releases.tuna.am/tuna/latest/tuna_linux_armv6.tar.gz.sig"
curl -sfSL -O https://releases.tuna.am/tuna.asc
gpg --import tuna.asc
gpg --verify tuna_linux_armv6.tar.gz.sig tuna_linux_armv6.tar.gz
tar -xzf tuna_linux_armv6.tar.gz
chmod +x tuna
sudo mv -f tuna /usr/local/bin/tuna
cd $(mktemp -d)
curl -sfSL -O "https://releases.tuna.am/tuna/latest/tuna_linux_armv5.tar.gz" -O "https://releases.tuna.am/tuna/latest/tuna_linux_armv5.tar.gz.sig"
curl -sfSL -O https://releases.tuna.am/tuna.asc
gpg --import tuna.asc
gpg --verify tuna_linux_armv5.tar.gz.sig tuna_linux_armv5.tar.gz
tar -xzf tuna_linux_armv5.tar.gz
chmod +x tuna
sudo mv -f tuna /usr/local/bin/tuna
cd $(mktemp -d)
curl -sfSL -O "https://releases.tuna.am/tuna/latest/tuna_linux_mips.tar.gz" -O "https://releases.tuna.am/tuna/latest/tuna_linux_mips.tar.gz.sig"
curl -sfSL -O https://releases.tuna.am/tuna.asc
gpg --import tuna.asc
gpg --verify tuna_linux_mips.tar.gz.sig tuna_linux_mips.tar.gz
tar -xzf tuna_linux_mips.tar.gz
chmod +x tuna
sudo mv -f tuna /usr/local/bin/tuna
cd $(mktemp -d)
curl -sfSL -O "https://releases.tuna.am/tuna/latest/tuna_linux_mipsle.tar.gz" -O "https://releases.tuna.am/tuna/latest/tuna_linux_mipsle.tar.gz.sig"
curl -sfSL -O https://releases.tuna.am/tuna.asc
gpg --import tuna.asc
gpg --verify tuna_linux_mipsle.tar.gz.sig tuna_linux_mipsle.tar.gz
tar -xzf tuna_linux_mipsle.tar.gz
chmod +x tuna
sudo mv -f tuna /usr/local/bin/tuna
cd $(mktemp -d)
curl -sfSL -O "https://releases.tuna.am/tuna/latest/tuna_linux_riscv64.tar.gz" -O "https://releases.tuna.am/tuna/latest/tuna_linux_riscv64.tar.gz.sig"
curl -sfSL -O https://releases.tuna.am/tuna.asc
gpg --import tuna.asc
gpg --verify tuna_linux_riscv64.tar.gz.sig tuna_linux_riscv64.tar.gz
tar -xzf tuna_linux_riscv64.tar.gz
chmod +x tuna
sudo mv -f tuna /usr/local/bin/tuna
Verify the installation
To make sure the installation was successful, run the command:
tuna help
Installation using script
Run the command in the terminal:
- curl
- wget
sh -c "$(curl -sSLf https://releases.tuna.am/tuna/get.sh)"
sh -c "$(wget -qO- https://releases.tuna.am/tuna/get.sh)"
Manual installation
- AMD64
- ARM64
- ARMv7
cd $(mktemp -d)
curl -sfSL -O "https://releases.tuna.am/tuna/latest/tuna_freebsd_amd64.tar.gz" -O "https://releases.tuna.am/tuna/latest/tuna_freebsd_amd64.tar.gz.sig"
curl -sfSL -O https://releases.tuna.am/tuna.asc
gpg --import tuna.asc
gpg --verify tuna_freebsd_amd64.tar.gz.sig tuna_freebsd_amd64.tar.gz
tar -xzf tuna_freebsd_amd64.tar.gz
chmod +x tuna
sudo mv -f tuna /usr/local/bin/tuna
cd $(mktemp -d)
curl -sfSL -O "https://releases.tuna.am/tuna/latest/tuna_freebsd_arm64.tar.gz" -O "https://releases.tuna.am/tuna/latest/tuna_freebsd_arm64.tar.gz.sig"
curl -sfSL -O https://releases.tuna.am/tuna.asc
gpg --import tuna.asc
gpg --verify tuna_freebsd_arm64.tar.gz.sig tuna_freebsd_arm64.tar.gz
tar -xzf tuna_freebsd_arm64.tar.gz
chmod +x tuna
sudo mv -f tuna /usr/local/bin/tuna
cd $(mktemp -d)
curl -sfSL -O "https://releases.tuna.am/tuna/latest/tuna_freebsd_armv7.tar.gz" -O "https://releases.tuna.am/tuna/latest/tuna_freebsd_armv7.tar.gz.sig"
curl -sfSL -O https://releases.tuna.am/tuna.asc
gpg --import tuna.asc
gpg --verify tuna_freebsd_armv7.tar.gz.sig tuna_freebsd_armv7.tar.gz
tar -xzf tuna_freebsd_armv7.tar.gz
chmod +x tuna
sudo mv -f tuna /usr/local/bin/tuna
Verify the installation
To make sure the installation was successful, run the command:
tuna help
Authorization
Sign up in the dashboard and log in to the CLI:
tuna login
The CLI asks how you want to log in:
- in the browser — a confirmation page opens. The session is stored in the system keyring: Keychain on macOS, Credential Manager on Windows, Secret Service on Linux;
- with a link — for a machine without a browser, such as a server over SSH. The CLI shows a link and a code: open the link on any device and check that the code matches. The CLI detects SSH sessions and offers this method first;
- with an API key — paste the key, and the CLI saves it to the configuration file.
tuna login flags:
| Flag | Description |
|---|---|
--web | Log in through the browser without asking for the method |
--no-browser | Log in with a link without asking for the method |
--with-api-key | Read an API key from standard input |
--insecure-storage | Save the session to credentials.json next to the configuration file when there is no system keyring |
--hostname | Device name in the list of sessions, the computer name by default |
Check the login and log out:
tuna whoami # which account you are logged in to
tuna session list # all sessions of the account
tuna logout # revoke the session and remove the saved key
You can view and revoke sessions in your profile.
Logging in on a server and in CI
Where you can't log in through a browser, use an API key. When you create the key, choose the For tunnels preset or enable Run tunnels — without it, the key can't start tunnels. Pass the key through standard input so that it doesn't stay in the shell history:
echo "$TUNA_API_KEY" | tuna login --with-api-key
Or set the TUNA_API_KEY variable — then you don't need to log in:
export TUNA_API_KEY=<your_key>
tuna http 8080
Since tuna-cli 0.39, tt_… tokens, the --token flag, the TUNA_TOKEN variable, and the tuna config save-token command are deprecated. They still work, but the CLI warns you to replace them: log in with tuna login or switch to TUNA_API_KEY and --api-key. For the steps on a laptop, a server, in CI, and in services, see Migrating to sessions and API keys.
Get started
Everything is ready to start working. Run tuna with a port and share the link with your colleagues:
tuna http 8080
Each time you start a tunnel it gets a new address. To keep the address, use your free permanent subdomain: tuna http 8080 --subdomain=<your-subdomain>. The subdomain is bound to your account and only works with your account from the Authorization step.
What's next?
- Explore HTTP tunnel configuration examples
- Need access to a non-HTTP service? Learn more in the TCP tunnel section