Install
Three ways in. All of them need ffmpeg on the machine: ffprobe reads durations, tags and chapters, and ffmpeg pulls embedded cover art out of files that have it.
Linux or Mac binary
- Download the build for your machine from the latest release (linux/amd64, linux/arm64 for a Raspberry Pi or ARM NAS, linux/arm, or macOS), make it executable, and put it somewhere on your path such as
/usr/local/bin. - Install ffmpeg:
sudo apt install ffmpegon Debian and Ubuntu,brew install ffmpegon a Mac. - Create a user. It asks for a password of eight characters or more, and the first user you create is the admin:
kithara-server user add phil - Serve the folder:
kithara-server serve --library ~/Audiobooks --data ~/.kithara-server --name "Phil's shelf"
That is the whole server. kithara-server scan --library ~/Audiobooks prints what it sees without serving, which is the quickest way to check that a folder reads the way you expect. To keep it running after a reboot, the README has a systemd unit; the environment variables KITHARA_LIBRARY, KITHARA_DATA, KITHARA_ADDR and KITHARA_NAME take the place of the flags.
Docker
The image is multi-arch, so the same line works on a PC and on a Raspberry Pi:
docker run -d --name kithara \
-v /srv/audiobooks:/library:ro -v kithara-data:/data -p 8080:8080 \
ghcr.io/philcharitou/kithara-server
docker exec -it kithara kithara-server user add phil
Change /srv/audiobooks to your folder. ffmpeg is inside the image. The :ro keeps the library read-only, which means book ids live in the data volume rather than in small sidecar files beside each book; drop it if you would rather have the sidecars (they let a book keep its id when you rename its folder).
Windows
- Download
kithara-server.exefrom the latest release into a folder of its own. - Get ffmpeg from ffmpeg.org (a Windows build such as the gyan.dev release), unzip it, and either put its
binfolder on your PATH or copyffmpeg.exeandffprobe.exenext tokithara-server.exe. - In a terminal in that folder:
kithara-server.exe user add phil kithara-server.exe serve --library "D:\Audiobooks" --data "%LOCALAPPDATA%\kithara-server" --name "Home"
Allow it through Windows Firewall when asked, or your phone will not be able to reach port 8080.
Then, in Kithara
- Open Library. On a fresh install, pick a server from the empty screen; otherwise open the menu, Manage libraries, Add a library.
- Choose Kithara sync server.
- Server address:
http://your-machine:8080, using the machine's name or its IP on your network. User name and password: the ones you created. Give the library a name if you like, then Connect.
The app checks /api/health, signs in, and syncs. Your books appear as a tab; tap a cover to stream, tap the cloud badge to download. From then on your position and bookmarks travel with you: pause on the phone, pick up on the tablet, and a stretch of offline listening never gets rewound by a stale copy elsewhere. Server libraries are free; nothing here needs Pro.
The web page
Open the server's address in a browser (http://your-machine:8080) and sign in with the same account. It is part of the binary, dark by default in the apps' colours, and it talks to the server exactly as the apps do.
- Listen in the browser. A player with chapters, 30-second skips, speed, a sleep timer, bookmarks and media keys. Your place is saved the way the apps save it, so you can carry on from your phone.
- Browse as a table or as covers, or by series and by author. Mark books finished or start them over, and download a whole book as a zip.
- Collections and playlists. Admins make collections everyone can see, such as a series in reading order or "For the car". Anyone can make playlists of their own, which nobody else sees.
- Read along. A book's transcript follows the player, with the passage being spoken lit up; tap any passage to play from it, and search what is said across every transcribed book.
- Your listening: time per day, streaks, and books started and finished, across all your devices. Kithara 1.9 sends its listening up, books in a folder on the phone included, so every device counts it.
- Your devices, with sign-out for each one, and your own password.
Admins also get:
- Libraries: add folders from a picker over the server's own disk, and upload audiobooks into them by dragging in files or folders.
- Metadata: look a book up with Audible, Open Library or Google Books, edit its details by hand, change its cover and edit its chapters. A Maintenance page lists books missing a cover, author, narrator or description and matches them in bulk, and shows any files the last scan skipped.
- Users, each an admin or a listener, and optionally limited to some libraries, so the children's account sees only the Kids shelf.
- Activity: who listened to what, and recent sessions.
- Settings: the server's name, how often it rescans, single sign-on, and a backup of everything that cannot be rebuilt from the audiobook folders.
More than one library
Give --library once per folder, optionally named, or add them later from the web page or the command line without a restart:
kithara-server serve --library ~/Audiobooks --library Kids=/srv/kids
kithara-server library add Lectures /srv/talks
The apps still see one catalogue, and each book says which library it belongs to. A folder that cannot be read at scan time, such as an unmounted share, keeps the books from its last good scan instead of vanishing from every device.
Transcripts on the server
Transcribing on a phone takes minutes per chapter. The machine your library lives on is usually far faster, and it is plugged in. Kithara Server transcribes with whisper.cpp, entirely on your own hardware: nothing leaves it but the one-time model download. The Docker image includes whisper.cpp; on other installs, put whisper-cli on the PATH.
In Settings, Transcription, pick a model, from the small English-only ones the phone uses up to large-v3-turbo for other languages. Then transcribe a book from its page, or the whole library overnight, and tick Transcribe new books automatically to have every book that arrives queued as soon as it is found. Chapters are worked through one at a time, and each passage starts where speech does. Everyone who can see a book shares its transcript. In the app, transcripts are part of Pro.
On a graphics card. The -vulkan Docker image transcribes on an AMD, Intel or NVIDIA GPU, usually several times faster than the processor, and falls back to the processor when there is no GPU. The README shows how to hand the card to the container.
Chapter names, and fixing the files
Rips without chapter marks leave titles like "001" or "Chapter 12". Once a book has a transcript, Name chapters on its page suggests names from what the narrator says at the start of each chapter, for you to check and save, or does it across many ticked books at once, changing only titles that are just a number. The Android app names chapters the same way.
Change the files writes what the server shows (title, author, narrator, series, description, chapters and cover) into the audio files themselves, so they are right in any other player, or merges a book's many files into one m4b with chapters. Each new file is checked before it replaces the old one, and the book keeps its id, so everyone's place and its transcript carry over.
Backups and notifications
Settings, Backups makes a backup now, downloads one, or makes one every day at a set hour, keeping the newest few. A backup holds everything that cannot be rebuilt from the audiobook folders: accounts, everyone's progress, bookmarks and listening, transcripts, collections, libraries, edited details and covers, and the settings.
Settings, Notifications tells you when things happen: a book added, a book transcribed, a backup made, a scan that could not use some files, or a job that failed. It sends to ntfy, a Discord channel, or as JSON to anything else, such as Home Assistant.
Single sign-on
If you already run an identity provider that speaks OpenID Connect (Authelia, Authentik, Keycloak, Google and others), people can sign in to the web page through it. Register Kithara with the provider using the redirect address https://your.server/api/oidc/callback, then fill in Settings, Single sign-on. Existing accounts are linked by their owners from their Account page, and after that the provider's sign-in reaches them. Passwords keep working alongside it.
Away from home
Plain http:// is fine on your own Wi-Fi. To listen anywhere else you need one of two things, and you should not open port 8080 on your router without either. The token in every request is a bearer credential, so treat the connection like a password.
The quick way: the setup script
On a fresh Ubuntu or Debian machine, one script does the lot: Docker, the server, and the first account. In the cloud it puts Caddy in front for HTTPS on your own domain (or a free sslip.io address if you have none) and opens the right ports, Oracle Cloud's included. With --home it sets up a computer at home behind Tailscale instead, and --restore brings a backup across from another server.
curl -fsSLO https://raw.githubusercontent.com/philcharitou/kithara-server/main/deploy/deploy.sh
sudo bash deploy.sh --domain books.example.com --name "Our books"
Tailscale (recommended, no configuration)
Tailscale puts your phone and the server on a private network wherever you are. Install it on both, and the server keeps its plain http:// address, just with the machine's Tailscale name instead of the LAN one. Nothing is exposed to the internet, so there is no certificate to manage and no port to forward.
A reverse proxy with TLS
If you want a public address, bind the server to 127.0.0.1 (KITHARA_ADDR=127.0.0.1:8080) and put a proxy in front. Caddy gets a certificate on its own; the whole configuration is:
audiobooks.example.com {
reverse_proxy 127.0.0.1:8080
}
Point the domain at your public IP and forward ports 80 and 443 to the proxy. nginx with certbot works too. Either way the proxy must pass Range requests through untouched (they all do by default) and should not buffer large responses; in nginx, proxy_buffering off; keeps seeking snappy. Start the server with --trust-proxy so that its limit on failed sign-ins counts each client rather than the proxy.
How the folder is read
- A folder with audio files in it is a book. The files are its parts, in natural order, so
part 10comes afterpart 2. - A folder holding only
CD 1,CD 2,Disc 3,Part 4subfolders is one book, the discs joined in order. - A single audio file beside book folders, or at the top level, is a book of its own.
- Anything above that is just organisation.
Author/Series/Book/works. - Formats: m4b, m4a, mp4, aac, mp3, ogg, opus, flac, wav, wma, mka.
- Metadata comes from several places, each overriding the one before: folder names (
Author/Series/3 - Title {Narrator}gives all four), the files' tags,desc.txtandreader.txt, an.opffile as Calibre writes them, and Audiobookshelf'smetadata.json, so a library Audiobookshelf has already tidied comes across as it was. Anything an admin matches or edits on the web page wins over all of it. - Chapters are read from the files (m4b chapter atoms, mp3 chapter frames) and laid onto one combined timeline across the parts. Files without embedded chapters become one chapter each, named from their
titletag or file name. No chapters at all? Add them in ten minutes, or edit them on the web page. - Cover:
cover.jpg,cover.pngorfolder.jpgin the folder, else the artwork embedded in the first file. - Ids survive renames. Each book folder gets a tiny
.kithara-idfile, so moving or renaming the folder keeps your listening position attached. On a read-only library the id is kept in the data folder instead, keyed by path.
New and changed books are picked up every ten minutes by default, at start, and on demand from the web page. Probing is cached by file size and modification time, so a rescan of a large unchanged library costs almost nothing.
What it keeps
A handful of JSON files in the data folder: users and their password hashes, device tokens, each user's progress, bookmarks, playlists and listening history, collections, transcripts, the libraries and settings added from the web page, edited metadata, the probe cache, and covers. Backups of all of it are covered above. Removing a user signs their devices out and sets their listening state aside rather than deleting it.
Requirements
- Linux (amd64, arm64 or arm, so a Raspberry Pi or an ARM NAS is fine), macOS, or Windows. Any architecture Go builds for, if you build it yourself; the standard library is the only dependency.
- ffmpeg and ffprobe on the PATH, or inside the Docker image.
- Kithara 1.2 or later on the phone. Server libraries are free.
Writing your own client or server
Kithara Server is the reference implementation of version 1 of the Kithara sync protocol: a few JSON routes and range-served audio, small enough to implement in an afternoon in whatever you already run. The protocol page is the contract. Everything the server adds on top, such as several libraries, listening sessions, collections and transcripts, is an optional extension that a client finds through /api/health, so a plain version 1 server or client never notices it. The README lists every route.
Still young
This is version 0.8.1. It runs well for a household, and the data folder stays readable from one version to the next, but read the release notes when you upgrade. Issues on GitHub are the place for bugs; the contact form works too.