source: Klonkt/README.md@ d774679

main
Last change on this file since d774679 was bbbfa3c, checked in by Robin Genis <roboburr@…>, 3 months ago

docs: README to English (public repo)

Translate the repo front page to English for an international open-source
audience; fill in the real GitHub clone URL + install.sh one-liner.

Co-Authored-By: Claude <noreply@…>

  • Property mode set to 100644
File size: 5.1 KB
RevLine 
[184393c]1# Klonkt
[7bc636b]2
[bbbfa3c]3Your own, **self-hosted** corner of the web — for your story, your visuals and
4your sound. Built on **Node + SQLite + htmx**: lightweight, server-rendered, and
5yours. No algorithm, no ads, no platform sitting in between.
[7bc636b]6
[bbbfa3c]7## What it does
[7bc636b]8
[bbbfa3c]9- **Solo or hub** — one personal site, or a label/collective with multiple
10 makers under one roof.
11- **Blog & photos** — posts with cover, tags, timeline or grid.
12- **Host your own music** — built-in audio player with tracks, albums and playlists.
13- **Fans & comments** — visitors sign in with Google (optional) and comment.
14- **Grow**: newsletter, download-for-email, EPK/press kit, link-in-bio,
15 show calendar, and **cookie-free statistics**.
16- **Circles** — connect your site with other Klonkt sites and show each other's
17 public posts; decentralized, with no central platform (Ed25519-signed federation).
18- **Themes & languages** — multiple palettes (light + dark), interface in EN/NL/DE.
19- **Installable (PWA)**, **privacy-first** (self-hosted fonts, no tracking).
[7bc636b]20
[bbbfa3c]21### Lite mode (no audio)
[7bc636b]22
[bbbfa3c]23Set `KLONKT_AUDIO=off` in `.env` to disable the entire audio/music feature.
24Klonkt then runs as a lightweight **blog/photo/EPK/links site without ffmpeg** —
25ideal for minimal hosting. Hub, Circles and external embeds
26(YouTube/SoundCloud/Spotify) keep working.
[7bc636b]27
[bbbfa3c]28## Self-hosting
[5a2cb69]29
[bbbfa3c]30Klonkt is a **Node app** — run it on a **VPS, in Docker, or on a Node hosting
31platform (PaaS)**. **Not** on classic shared PHP hosting. The database (SQLite)
32creates itself on first start.
[5a2cb69]33
[bbbfa3c]34### Option A — Docker (recommended)
[5a2cb69]35
[bbbfa3c]36Node, ffmpeg and cwebp are inside the image; you only need Docker.
[7bc636b]37
38```bash
[bbbfa3c]39git clone https://github.com/roboburr/klonkt.git && cd klonkt
40cp .env.example .env # set SESSION_SECRET + PUBLIC_BASE_URL
[5a2cb69]41docker compose up -d
[7bc636b]42```
43
[bbbfa3c]44Data (database + media) stays in the `klonkt-data` volume, even across updates.
45Updating: `git pull && docker compose up -d --build`.
[184393c]46
[bbbfa3c]47### Option B — VPS installer (Debian/Ubuntu)
[184393c]48
[bbbfa3c]49One command: installs Node 20, Caddy (automatic HTTPS) and a systemd service.
50Coexistence-safe (won't touch an existing Node/web server).
[5a2cb69]51
52```bash
[bbbfa3c]53curl -fsSL https://raw.githubusercontent.com/roboburr/klonkt/main/scripts/install.sh \
54 | sudo bash -s -- --domain yourdomain.com
[5a2cb69]55```
56
[bbbfa3c]57After that you can update with `klonkt-update`.
[184393c]58
[bbbfa3c]59### Option C — bare Node (20+)
[5a2cb69]60
61```bash
[bbbfa3c]62git clone https://github.com/roboburr/klonkt.git && cd klonkt
[5a2cb69]63npm ci
[bbbfa3c]64cp .env.example .env # set SESSION_SECRET + PUBLIC_BASE_URL
65npm start # the database is created on first start
[5a2cb69]66```
67
[bbbfa3c]68For production, put it behind a process manager (pm2/systemd) and a
69reverse proxy. `cwebp` is optional (`apt install webp`) for WebP images.
[5a2cb69]70
[bbbfa3c]71### HTTPS (Docker / bare Node)
[5a2cb69]72
[bbbfa3c]73Put a reverse proxy in front of the app. With **Caddy** (automatic Let's Encrypt):
[5a2cb69]74
75```caddy
[bbbfa3c]76yourdomain.com {
[5a2cb69]77 reverse_proxy localhost:3000
78 encode gzip zstd
79}
80```
81
[bbbfa3c]82(The VPS installer sets up Caddy + HTTPS for you already.)
[184393c]83
[bbbfa3c]84### First run
[5a2cb69]85
[bbbfa3c]86Open your site → you get the **setup wizard**: pick your language, name your site
87and create your admin. The **first user automatically becomes the administrator**;
88registration then closes. Lost your password?
[184393c]89`npm run reset-admin` (Docker: `docker compose exec klonkt npm run reset-admin`).
90
[bbbfa3c]91## Configuration (`.env`)
[184393c]92
[bbbfa3c]93| Variable | Required | What |
[184393c]94|---|---|---|
[bbbfa3c]95| `SESSION_SECRET` | ✅ | Random string of ≥32 characters |
96| `PUBLIC_BASE_URL` | ✅ | Canonical URL (e.g. `https://yourdomain.com`) |
97| `GOOGLE_CLIENT_ID` / `_SECRET` / `_REDIRECT_URI` | — | Google login for listeners (your own OAuth client; never grants admin) |
98| `SMTP_HOST` / `_PORT` / `_USER` / `_PASS` / `_FROM` | — | Email for password reset + newsletter |
99| `KLONKT_DEFAULT_LANG` | — | Default language for visitors (`en`/`nl`/`de`) |
100| `KLONKT_AUDIO` | — | `off` = lite mode (no audio/ffmpeg) |
[7bc636b]101
102## Stack
103
104- **Runtime:** Node 20+
105- **Web:** Express + Helmet + express-session
[bbbfa3c]106- **DB:** better-sqlite3 (WAL), self-migrating on boot
107- **Templates:** EJS (server-rendered) + **htmx 1.9** (vendored, no build step)
108- **Audio:** ffmpeg-static (bundled)
109- **Circles:** Ed25519-signed pull (libsodium via Node crypto)
[184393c]110- **Fonts:** self-hosted variable woff2 (Fraunces / Plus Jakarta Sans)
[7bc636b]111
[bbbfa3c]112## Project structure
[7bc636b]113
114```
115src/
[bbbfa3c]116├── server.js # Express bootstrap + route mounting
117├── config/ # database, mailer, google, feature flags
118├── db/migrations/ # SQLite schema (001-init.sql)
119├── middleware/ # site resolving, auth, render (htmx-aware)
120├── routes/ # per-resource Express routers (posts, auth, admin-*, circle, …)
121├── services/ # domain logic (federation, stats, mailer, permissions, …)
[184393c]122├── views/ # shell.ejs + partials/ + pages/ (EJS)
[bbbfa3c]123└── assets/ # css/ (palette tokens + components), js/ (htmx, player), fonts/
[7bc636b]124```
125
[bbbfa3c]126## License
[7bc636b]127
[bbbfa3c]128**AGPL-3.0-or-later** — see [LICENSE](LICENSE). Klonkt is free software: you may
129use, study, modify and distribute it. The AGPL does require that a modified
130version you offer as a network service makes its source code available to the
131users of that service. Made by robo.burr (Robin Genis) ·
[184393c]132<https://klonkt.com>
Note: See TracBrowser for help on using the repository browser.