source: Klonkt/README.md@ bbbfa3c

main
Last change on this file since bbbfa3c 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
Line 
1# Klonkt
2
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.
6
7## What it does
8
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).
20
21### Lite mode (no audio)
22
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.
27
28## Self-hosting
29
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.
33
34### Option A — Docker (recommended)
35
36Node, ffmpeg and cwebp are inside the image; you only need Docker.
37
38```bash
39git clone https://github.com/roboburr/klonkt.git && cd klonkt
40cp .env.example .env # set SESSION_SECRET + PUBLIC_BASE_URL
41docker compose up -d
42```
43
44Data (database + media) stays in the `klonkt-data` volume, even across updates.
45Updating: `git pull && docker compose up -d --build`.
46
47### Option B — VPS installer (Debian/Ubuntu)
48
49One command: installs Node 20, Caddy (automatic HTTPS) and a systemd service.
50Coexistence-safe (won't touch an existing Node/web server).
51
52```bash
53curl -fsSL https://raw.githubusercontent.com/roboburr/klonkt/main/scripts/install.sh \
54 | sudo bash -s -- --domain yourdomain.com
55```
56
57After that you can update with `klonkt-update`.
58
59### Option C — bare Node (20+)
60
61```bash
62git clone https://github.com/roboburr/klonkt.git && cd klonkt
63npm ci
64cp .env.example .env # set SESSION_SECRET + PUBLIC_BASE_URL
65npm start # the database is created on first start
66```
67
68For production, put it behind a process manager (pm2/systemd) and a
69reverse proxy. `cwebp` is optional (`apt install webp`) for WebP images.
70
71### HTTPS (Docker / bare Node)
72
73Put a reverse proxy in front of the app. With **Caddy** (automatic Let's Encrypt):
74
75```caddy
76yourdomain.com {
77 reverse_proxy localhost:3000
78 encode gzip zstd
79}
80```
81
82(The VPS installer sets up Caddy + HTTPS for you already.)
83
84### First run
85
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?
89`npm run reset-admin` (Docker: `docker compose exec klonkt npm run reset-admin`).
90
91## Configuration (`.env`)
92
93| Variable | Required | What |
94|---|---|---|
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) |
101
102## Stack
103
104- **Runtime:** Node 20+
105- **Web:** Express + Helmet + express-session
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)
110- **Fonts:** self-hosted variable woff2 (Fraunces / Plus Jakarta Sans)
111
112## Project structure
113
114```
115src/
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, …)
122├── views/ # shell.ejs + partials/ + pages/ (EJS)
123└── assets/ # css/ (palette tokens + components), js/ (htmx, player), fonts/
124```
125
126## License
127
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) ·
132<https://klonkt.com>
Note: See TracBrowser for help on using the repository browser.