Get the platform
myDoc24 ships as a downloadable source bundle. Run it on your own infrastructure — your domain, your auth, your database, your container (or no container at all). Three install paths cover the common cases; pick whichever matches your stack.
Download
kb-app-latest.tar.gz (~410 KB, source-only — no node_modules baggage)
The tarball contains the full Next.js source plus a Dockerfile, a reference docker-compose.yml, deploy/ templates for native installs, and docs/DEPLOYMENT.md with the complete operational contract.
What you'll need
- A Linux box you control — Proxmox LXC, plain VPS, EC2, your laptop
- Node.js 20+ (any current LTS)
- MySQL 8 or MariaDB 10.5+ (or a managed instance — see the database compatibility section below)
- A domain name pointing at the box (for TLS and OIDC redirect URIs)
Option 1 — Native install (LXC / VPS / bare-metal)
No Docker required. Solar MD's own three deployments run this way: systemd + nginx + native Node. The tarball ships everything you need.
curl -L https://mydoc24.org/downloads/kb-app-latest.tar.gz | tar xz
cd kb-app
npm ci && npm run build
sudo ./deploy/install-native.sh --domain=kb.example.com
sudo certbot --nginx -d kb.example.com
The install-native.sh script:
- Creates a
kb-appsystem user. - Substitutes
<DOMAIN>and<INSTALL_DIR>into the supplied systemd unit (deploy/systemd/kb-app.service) and nginx site (deploy/nginx/kb-app.conf), then drops them into/etc/. - Scaffolds a minimal
.env.localwith a freshly-generatedAUTH_SECRET. systemctl enable --now kb-app+systemctl reload nginx.- Waits for the app to respond on port 3000.
After certbot finishes, visit https://kb.example.com — the first-run wizard appears. Paste your DATABASE_URL, click through five screens, and you're live.
For a manual walkthrough (without the helper script), see deploy/README.md in the tarball.
Option 2 — Docker Compose (turnkey, bundles MySQL)
For customers who don't already have MySQL available. The reference compose file in the tarball wires kb-app up against a sibling mysql:8 container.
curl -L https://mydoc24.org/downloads/kb-app-latest.tar.gz | tar xz
cd kb-app
cp .env.compose.example .env
Edit .env and set three secrets (any random strings — generate via openssl rand -base64 32):
AUTH_SECRET=<paste>
MYSQL_ROOT_PASSWORD=<paste>
MYSQL_USER_PASSWORD=<paste>
Then:
docker compose up -d
Visit http://your-server:3000 for the wizard.
Option 3 — Build your own container (k8s / Coolify / ECS / Portainer / …)
If you've already standardised on your own container orchestration, kb-app slots in cleanly. The repo includes a Dockerfile you can build from source, and docs/DEPLOYMENT.md documents the full operational contract:
- Required env: just
AUTH_SECRET(one base64 string). Everything else is collected by the wizard or editable from/admin/settings. - Port: 3000 inbound only.
- Volume: mount
/data(or whereverKB_DATA_DIRpoints) for persistentconfig.json+.setup-lock. Asset blobs live INLINE in MySQL — no second backup target. - Healthcheck:
GET /api/healthreturns 200 +{"ok":true,"db":"up"}when reachable, 503 +{"ok":false,"db":"down"}when not. Wire into k8s livenessProbe + readinessProbe, Dockerhealthcheck:, or your monitoring of choice. - Graceful shutdown: 30 s
terminationGracePeriodSecondsis plenty — kb-app drains the mysql2 pool in ~3 s typical.
Build your image:
docker build -t your-registry/kb-app:latest .
docker push your-registry/kb-app:latest
Then point your platform at it. docs/DEPLOYMENT.md includes worked sketches for k8s, Coolify, Render, and plain docker run.
First-run wizard (all three paths)
Five screens:
- Welcome — version + doc links.
- Database — paste your
DATABASE_URL. The wizard tests the connection before letting you continue; a bad URL never reaches disk. Same screen whether you're on npm, Docker Compose, or BYO container. - Site settings — title, tagline, accent colour, icon. All editable later from
/admin/settings. - First admin account — email, name, password. This user becomes the bootstrap admin with every role. Subsequent users join via the invite system or the open-signup toggle.
- Done — wizard locks itself permanently (
/data/.setup-lock) and lands you on/auth/signin.
Database compatibility
kb-app uses the MySQL wire protocol via the mysql2 driver. Anything that speaks it should work:
| Flavour | Status |
|---|---|
| MySQL 8.0+ | ✅ Tested. Solar MD's reference DB. |
| MariaDB 10.5+ | ✅ Tested. Drop-in replacement. |
| Amazon RDS for MySQL | ✅ Tested. Standard connection string. |
| Amazon Aurora MySQL (3.x, MySQL 8 compat) | ✅ Tested. |
| PlanetScale | ✅ Tested. Use the dashboard's connection string (TLS pre-configured). |
| DigitalOcean Managed MySQL | ✅ Tested. CA cert mount documented in DEPLOYMENT.md. |
| MySQL 5.7 | ⚠️ Best-effort. Some JSON SQL paths may differ. Not regression-tested. |
| Postgres / SQLite / MS SQL | ❌ Unsupported. Schema uses MySQL-specific features (LONGBLOB, FULLTEXT, JSON_EXTRACT). A different engine is a 2–4 week rewrite. |
After install
A few common settings you'll likely want to flip in /admin/settings:
- Sign-in providers — Magic-link email, Google OAuth, Microsoft Entra ID. Paste credentials per provider, toggle on, done. Per-provider consent screen verification (Google, Microsoft) is your responsibility per deployment.
- Public vs private —
KB_PUBLIC_READ_MODE. Off = every read requires auth. On = anonymous browsers can read articles, edits still require sign-in. - Embedded widget — paste the
<kb-widget data-base="https://your-domain">snippet into any other web app to surface your knowledge base inside it. Contract in the API Docs tab.
Backups
Just mysqldump. Asset blobs + config + everything live in MySQL. No second backup target needed.
mysqldump -h <host> -u <user> -p<password> <db> > kb-app-backup-$(date +%F).sql
Upgrades
Download the newer tarball, extract over your install, run migrations:
curl -L https://mydoc24.org/downloads/kb-app-latest.tar.gz | tar xz
# rsync over your install (skip node_modules / .next / .env.local / data):
rsync -a kb-app/ /opt/kb-app/ --exclude=node_modules --exclude=.next --exclude=.env.local --exclude=data
cd /opt/kb-app
npm ci
npm run db:migrate
npm run build
systemctl restart kb-app # or: docker compose up -d # or: kubectl rollout restart deployment/kb-app
Migrations are idempotent — a failed mid-deploy is safe to re-run.
Help
Full operational reference: docs/DEPLOYMENT.md inside the tarball.
For questions, see the Support tab on this site. For the REST + agent-authoring contract, see the API Docs tab. For end-user docs (how to use a published deployment), see the User Guide tab.