> Markdown version of https://tuna.am/en/blog/tuna-tiny-and-sdk/. Documentation index: [llms.txt](https://tuna.am/en/llms.txt), full text in one file: [llms-full.txt](https://tuna.am/en/llms-full.txt). Any page is available as Markdown: append `.md` to its URL without the trailing slash.

[Blog](https://tuna.am/en/blog.md)|[New features](https://tuna.am/en/blog/tags/features)

# tuna-tiny and SDKs for eight languages — a tunnel on your router and right from your code

November 30 · 5 min

tuna CLI does a lot: middleware, the inspector, secrets, monitors, mesh. But its binary is about 25 MB, and a router with 16 MB of flash has no room for it. Often all you need from a client is one thing: keep a tunnel open to the router's web interface, to SSH, or to a service in a container.

That's why we released **tuna-tiny**, a 2 MB tunnel client. And to open a tunnel right from your application, we released **SDKs for eight languages**: Go, Node.js, Python, Java, .NET, PHP, Ruby, and Rust.

> **In brief**
>
> * **tuna-tiny** — a single HTTP or TCP tunnel, with a binary and image of about 2 MB. There are packages for Alpine and OpenWrt and a container for MikroTik. [Documentation](https://tuna.am/en/docs/guides/install/install-tiny.md).
> * **SDKs** — a tunnel from Go, Node.js, Python, Java, .NET, PHP, Ruby, or Rust code: accept connections yourself or forward them to a local address. [Documentation](https://tuna.am/en/docs/guides/install/sdk.md).

## tuna-tiny

tuna-tiny does one thing: it keeps a tunnel up. When the connection drops, it reconnects and keeps the address. The binary is static, with root certificates built in, and needs no system libraries. The amd64 build is 2.1 MB, the mipsle build is 1.9 MB, and the Docker image is built `FROM scratch` and is the same size.

Where it fits:

* **OpenWrt routers.** Access LuCI or the router's SSH without a public IP. The package installs a procd service and a UCI config.
* **MikroTik on RouterOS 7.** tuna-tiny runs in a RouterOS container on arm, arm64, and x86, including CHR.
* **Alpine and embedded Linux.** A package with an OpenRC service, and builds for 15 Linux architectures, from `mips` and `armv5` to `riscv64` and `s390x`.
* **Containers and CI.** A 2 MB image instead of the 13 MB tuna CLI image.

Version 0.2.0 adds builds for macOS, Windows, FreeBSD, and OpenBSD on amd64 and arm64. The macOS builds are signed and notarized.

### How it differs from tuna CLI

tuna-tiny has no middleware (password, headers, IP filter for HTTP), no inspector, no file server, no config file with multiple tunnels, no services, and no browser login. It authenticates only with an [API key](https://tuna.am/en/docs/guides/sessions-and-api-keys.md) with **Run tunnels** enabled (the **For tunnels** preset). The subnet filter for TCP (`--cidr-allow`, `--cidr-deny`) is there: the Tuna node checks subnets, so unwanted connections never reach the device.

> **Warning.** An HTTP tunnel in tuna-tiny can't be protected with a password. Only publish services that have their own authentication.

### How to install

Linux binary:

```shell
curl -fLo tuna-tiny https://releases.tuna.am/tuna-tiny/latest/tuna-tiny_linux_amd64
chmod +x tuna-tiny
TUNA_API_KEY=tak_xxx ./tuna-tiny http 8080

```

Docker:

```shell
docker run -d --name tuna --restart unless-stopped --network host \
  -e TUNA_API_KEY=<your_key> yuccastream/tuna-tiny http 3000

```

OpenWrt 25.12 and later — from the repository, with updates through `apk upgrade`:

```shell
K=tuna@fd6ba1797a0fb356fb4aa79dbbc8ce2a43346700b64e9f20be2d759e2724549c.rsa.pub
wget -O /etc/apk/keys/$K https://code.tuna.am/api/packages/tuna/alpine/key
echo https://code.tuna.am/api/packages/tuna/alpine/openwrt/main > /etc/apk/repositories.d/tuna.list
apk update && apk add tuna-tiny

```

The `/etc/config/tuna-tiny` config already contains disabled tunnels to the router's LuCI and SSH. To open LuCI, set the key and enable the tunnel:

```shell
uci set tuna-tiny.main.api_key=tak_xxx
uci set tuna-tiny.luci.enabled=1
uci commit tuna-tiny
/etc/init.d/tuna-tiny enable
/etc/init.d/tuna-tiny start

```

The package for OpenWrt 24.10 and earlier, Alpine, MikroTik, and the architecture table are in the [tuna-tiny documentation](https://tuna.am/en/docs/guides/install/install-tiny.md).

> **Permanent address.** Without a [reserved subdomain](https://tuna.am/en/docs/tunnels/http.md#reserved-subdomain) or [port](https://tuna.am/en/docs/tunnels/ports.md), the tunnel address changes every time the router reboots. For devices that run unattended, reserve an address and pass it with `-s` or `-p`.

## SDKs

An SDK opens a tunnel right from your application without installing `tuna`: the tunnel lives in your process and, after a dropped connection, reconnects with the same address. The API is the same in every language, and so is the key: an API key with **Run tunnels** enabled, passed in `TUNA_API_KEY`.

| Language                                                       | Installation                                |
| -------------------------------------------------------------- | ------------------------------------------- |
| [Go](https://tuna.am/en/docs/guides/install/sdk/go.md)         | `go get github.com/yuccastream/tuna-sdk-go` |
| [Node.js](https://tuna.am/en/docs/guides/install/sdk/node.md)  | `npm install @tuna-am/sdk`                  |
| [Python](https://tuna.am/en/docs/guides/install/sdk/python.md) | `pip install tuna-sdk`                      |
| [Java](https://tuna.am/en/docs/guides/install/sdk/java.md)     | `am.tuna:tuna-sdk`                          |
| [.NET](https://tuna.am/en/docs/guides/install/sdk/dotnet.md)   | `Tuna.Sdk`                                  |
| [PHP](https://tuna.am/en/docs/guides/install/sdk/php.md)       | `composer require yuccastream/tuna-sdk-php` |
| [Ruby](https://tuna.am/en/docs/guides/install/sdk/ruby.md)     | `gem install tuna-sdk`                      |
| [Rust](https://tuna.am/en/docs/guides/install/sdk/rust.md)     | `cargo add tuna-sdk`                        |

The Java and .NET packages will reach Maven Central and nuget.org a little later. Until then, install them from the `code.tuna.am` registry; the [Java](https://tuna.am/en/docs/guides/install/sdk/java.md#installation) and [.NET](https://tuna.am/en/docs/guides/install/sdk/dotnet.md#installation) pages show how. The PHP SDK wraps tuna-tiny: it downloads the binary and verifies its checksum on its own.

The SDKs are handy for showing a demo straight from your application, receiving webhooks in an embedded agent, or giving access to a device that runs your code. Examples, options, and events are in the [SDK documentation](https://tuna.am/en/docs/guides/install/sdk.md). The package APIs may still change before v1.

No SDK for your language? Let us know in our [Telegram chat](https://telegram.me/+Kgbtt0_gJwI5ZmEy). Until it exists, you can run tuna-tiny as a separate process and read its events with `--log-format json`.

## Leave feedback

If you enjoy using Tuna, or on the contrary you are not happy with something, please [leave feedback](https://my.tuna.am/?show_feedback=1&lang=en).

![](/blog/img/2024-08-22/feedback.gif)

## News

We announce new features and posts on our [Telegram channel](https://t.me/tuna_am). Subscribe so you don't miss anything.

## Help

We value our users and carefully review every request. If you have any problems with tuna, please contact us in one of the following ways:

* [Email](mailto:info@tuna.am)
* [Telegram community](https://telegram.me/+Kgbtt0_gJwI5ZmEy)

Categories: [New features](https://tuna.am/en/blog/tags/features)

[← newer🗞️ Tuna update — team security, traffic policy on all paid plans, SDKs, and a skill for AI agents](https://tuna.am/en/blog/platform-update-late-november-2026.md)[older →🤖 tuna skills: an AI agent skill built into the CLI](https://tuna.am/en/blog/agent-skills.md)
