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.
The APK is big because everything is inside: the first run installs completely offline.
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.
klonkt.apk on your phone and open it.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>
==============================================
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.
For a permanent address (and for joining the fediverse) you connect your own domain through a free Cloudflare tunnel:
cloudflared service install eyJhbGciβ¦ β copy only the long eyJβ¦ string. That's your token (150β300 characters).phone β Domain: your domainHTTP β URL: localhost:3020klonkt-token 'eyJβ¦your-tokenβ¦' phone.yourdomain.com
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.
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.
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.
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.
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.
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).
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.
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.
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.