Kitty tok. Your domain, your people, your videos.
Kittok is a self-hosted backend for TikTok's own desktop web client. The site looks and works like TikTok, but the accounts, videos and messages all live on your server. Think Xitter, but for TikTok. Every instance is its own thing, with its own database, accounts, media and settings.
It's early (0.1.0) and there are rough edges, but most of what people actually use works: the feed, uploads, likes, comments, follows, DMs and group chats, stories, private accounts, reports and moderation. COMPATIBILITY.md has the full list.
You need Docker with Compose, a domain, and a reverse proxy that handles HTTPS.
git clone https://github.com/xmvo/kittok.git
cd kittok
npm run setupNo Node on the host? This does the same thing:
docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/work" -w /work node:22-bookworm-slim node scripts/setup.mjsOpen .env, set PUBLIC_ORIGIN to your domain and pick an INSTANCE_NAME. The database password is already filled in. Leave registration closed until you've made your own account:
docker compose up -d --build
docker compose exec app node scripts/create-user.mjs yourname --adminPoint your proxy at 127.0.0.1:3210 (there's a Caddy example). Log in through TikTok's normal login page: Use phone / email / username, then Log in with email or username.
The repo includes the copy of TikTok's web client that Kittok is built against (client/), so every instance runs the same version. Kittok patches parts of it, which is why it doesn't just grab TikTok's latest.
A few extras you'll probably want, all covered in HOSTING.md:
- email, for sign-up codes and password resets (in
.envor the admin panel) - an IP security key:
npm run ip-key - Discord's collectibles catalog, for avatar decorations and nameplates (admin panel → Misc)
Other docs: API, architecture, contributing.
You need Node 22+, PostgreSQL 18 and ffmpeg with libx264. The only npm dependency is pg.
npm ci
npm run setupCreate a database and put its URL in .env as DATABASE_URL, then:
npm run migrate
npm run user:create -- yourname --admin
npm startFor local use, keep PUBLIC_ORIGIN=http://127.0.0.1:3210. A new instance is empty: upload at /account, import a file with npm run video:import -- yourname video.mp4 "caption", or run npm run demo for a generated test video.
npm testThis makes a throwaway database, runs the real server against it with ffmpeg, and deletes the database afterwards. Your Postgres user needs permission to create databases; otherwise point KITTOK_TEST_ADMIN_URL at one that can.
npm run source builds dist/kittok-0.1.0.tar.gz from the source files only: no .env, database, uploads, cached TikTok files or node_modules. Instances serve it at /source, and Docker builds make it automatically. Rebuild it if you change your copy.
Kittok is AGPL-3.0-or-later (LICENSE). The copy of TikTok's web client in client/ belongs to TikTok and isn't covered by that license. The fonts in public/fonts are Discord's builds of open source fonts under the SIL Open Font License (OFL.txt).