klonkt.

Klonkt for Android alpha

Run a full Klonkt server on your Android phone. One APK, everything bundled β€” Node.js, the app, ffmpeg and a Cloudflare tunnel. Nothing to download during setup, and it works over both Wi-Fi and mobile data.

Download

Download klonkt.apk~300 MB Β· Android Β· always the latest build

The APK is big because everything is inside: the first run installs completely offline.

Supported devices

Not supported: Android 6 and older, 32-bit-only phones (older or very cheap devices), and Intel/x86 tablets or emulators β€” the prebuilt server inside the APK is built for 64-bit ARM.

Install

  1. Download klonkt.apk on your phone and open it.
  2. Android will ask you to allow installs from this source β€” allow it (it's a normal sideload prompt).
  3. Open the app. You'll see a terminal that installs and starts everything by itself. The first run takes 1–2 minutes β€” just wait.
  4. When you see the status block, open http://localhost:3020 in your browser (Chrome). That's your Klonkt β€” the first-run wizard creates your admin account.
==============================================
[Klonkt] Local:    http://localhost:3020  (open in your browser)
[Klonkt] Public:   https://xxxx.trycloudflare.com
[Klonkt] Own domain:  klonkt-token <token> <domain>
==============================================

Your public address

Out of the box you get a free temporary address on trycloudflare.com β€” it's shown in the terminal. Anyone can reach your site through it. It changes every time the tunnel restarts, so it's for trying things out and sharing in the moment.

A fixed address with Cloudflare

For a permanent address (and for joining the fediverse) you connect your own domain through a free Cloudflare tunnel:

  1. You need a domain whose DNS is managed by Cloudflare (the free plan is fine).
  2. In the Cloudflare dashboard go to Zero Trust β†’ Networks β†’ Tunnels β†’ Create a tunnel (type: Cloudflared) and give it a name.
  3. On the connector page you'll see a command like cloudflared service install eyJhbGci… β€” copy only the long eyJ… string. That's your token (150–300 characters).
  4. In the tunnel's configuration, add a route for your domain. Depending on the dashboard version this is called Public Hostname or Published application:
    • Subdomain: e.g. phone β€” Domain: your domain
    • Type: HTTP β€” URL: localhost:3020
  5. In the Klonkt app's terminal, on one line (single quotes around the token):
    klonkt-token 'eyJ…your-token…' phone.yourdomain.com
  6. Restart the app (or run bash ~/.klonkt-start.sh). The status block now says your own domain is live.

The domain you pass to klonkt-token also configures Klonkt's public base URL, so share links and federation use the right address automatically. klonkt-token clear switches back to temporary addresses.

Note: the Cloudflare account, tunnel and domain are your own, and Cloudflare's terms apply to your use of them. Cloudflare's free plan is generous and fine for a personal or small site, but it does restrict serving a disproportionate amount of non-HTML content (video/audio) through its free tier β€” so if you ever stream a lot of music at scale, consider a suitable Cloudflare plan or serving media another way. For a phone or a small artist site this won't come up.

Keeping it running

Troubleshooting

The terminal is stuck / nothing seems to happen

The first run installs packages and can look quiet for a minute. If nothing changes for several minutes, type bash ~/.klonkt-start.sh and press enter β€” it's safe to run again at any time and prints what it's doing.

localhost:3020 shows nothing in the browser

The server may have failed to start. In the app's terminal:

tail -30 ~/klonkt.log

That shows the server's own error. Run bash ~/.klonkt-start.sh to try again.

No public URL appears / the tunnel won't connect

Check the tunnel's log:

tail -15 ~/.klonkt-tunnel.log

Then restart it: pkill cloudflared followed by bash ~/.klonkt-start.sh. Some networks block tunnels entirely β€” try switching between Wi-Fi and mobile data.

Cloudflare error 1033 on my domain

1033 means: Cloudflare knows your domain, but the tunnel on your phone isn't connected. Usually the app is closed or Android stopped it. Open the app so the tunnel reconnects, and check the "Keeping it running" steps above. With your own domain the address stays the same after every reconnect.

"Provided tunnel token is not valid"

The token wasn't pasted exactly. It's the single long string starting with eyJ β€” without cloudflared service install in front of it, and not the tunnel ID (a short code with dashes). Verify what's stored:

wc -c ~/.klonkt-tunnel-token

Expect roughly 150–300 characters. Set it again with klonkt-token '<token>' <domain> (single quotes matter).

My public address stopped working after a while

Android put the app to sleep. Re-open the app (the tunnel reconnects by itself) and enable the wakelock + unrestricted battery steps above. Temporary trycloudflare addresses get a new URL after a reconnect β€” your own domain does not.

Start over with a clean install

Uninstall the app (this deletes your site and its data on the phone!) and install the APK again. The first run sets everything up fresh.

Good to know

Licenses & credits

The app is a modified build of Termux β€” all credit to the Termux maintainers β€” distributed under the GPLv3. The complete modification (a single patch) and the build recipe are open source at github.com/roboburr/klonkt-android; each release ships a BUILD-INFO.txt recording the exact upstream Termux commit. The bundled Klonkt server is AGPL-3.0 (source); also bundled: Node.js (MIT), ffmpeg (GPL/LGPL) and cloudflared (Apache-2.0) from the Termux package repository. Not affiliated with or endorsed by the Termux project.

← klonkt.com