Files
2026-04-29 14:49:07 +00:00

113 lines
3.3 KiB
Markdown

# Kino — Personal Media Server (Netflix Clone)
A self-hosted Netflix-style streaming app for movies you legally own.
Built with FastAPI + React + MongoDB.
## Features
- Cinematic browse UI with hero banner, horizontal carousels, hover details
- HTML5 video player with **HTTP Range request** support (proper seeking)
- **JWT auth** (admin + member roles)
- **Admin upload** for adding movies (multipart, large files OK)
- **My List** (watchlist) and **Continue Watching** (resume playback)
- **Search** by title/director/cast
- **Request queue** — users request movies, admin approves & uploads them
*(Legal alternative to auto-downloading — auto-download of copyrighted material is not implemented.)*
## Default admin
- Email: `admin@kino.local`
- Password: `kino-admin-2026`
Change `ADMIN_EMAIL` / `ADMIN_PASSWORD` in `backend/.env` before first start
to set your own admin credentials.
## Self-hosting on Proxmox
You can run this stack on any Proxmox LXC or VM. Recommended layout:
1. **Create an Ubuntu 22.04 LXC** with at least:
- 2 CPU cores, 4 GB RAM
- 20 GB system disk
- Mount your bulk storage (zfs/nfs) at `/mnt/media`
2. **Install dependencies**:
```bash
apt update && apt install -y python3-pip nodejs npm yarn mongodb git
```
3. **Clone & configure**:
```bash
git clone <your-fork> /opt/kino
cd /opt/kino
```
4. **Backend**:
```bash
cd backend
pip install -r requirements.txt
# edit .env:
# MONGO_URL=mongodb://localhost:27017
# DB_NAME=kino
# MEDIA_ROOT=/mnt/media
# ADMIN_EMAIL=you@yourdomain
# ADMIN_PASSWORD=<strong>
# JWT_SECRET=<openssl rand -hex 32>
uvicorn server:app --host 0.0.0.0 --port 8001
```
5. **Frontend**:
```bash
cd frontend
yarn install
# edit .env:
# REACT_APP_BACKEND_URL=https://kino.yourdomain.tld
yarn build
# serve build/ via nginx or caddy
```
6. **Recommended**: front with **Caddy** for HTTPS:
```
kino.yourdomain.tld {
handle /api/* {
reverse_proxy localhost:8001
}
handle {
root * /opt/kino/frontend/build
try_files {path} /index.html
file_server
}
}
```
## GitHub backup
This repo is the source of truth for code and configuration.
**Do not commit your `.env` files** — they contain secrets.
Movie media files should live on your Proxmox storage, not Git.
## Adding movies
- **Via web UI**: Sign in as admin → "Upload" in nav → drag MP4 + fill metadata
- **Manually**: drop MP4 into `$MEDIA_ROOT/videos/`, then create the movie via
`POST /api/movies` with `storage_type=local` and `storage_path=<filename>`
## API quickstart
```bash
# Login
curl -X POST $URL/api/auth/login \
-H 'Content-Type: application/json' \
-d '{"email":"admin@kino.local","password":"kino-admin-2026"}'
# List movies
curl $URL/api/movies
# Stream a local movie (note: needs ?auth=<token> for <video> tags)
curl $URL/api/stream/<movie_id>?auth=<token>
```
## Why no auto-download?
Auto-downloading copyrighted movies from the internet is illegal in most
jurisdictions (DMCA, EU copyright directive, etc.). Kino is built as a
**personal media server** for content you legally own or that is in the
public domain (Internet Archive, Blender Open Movies, etc.).
The "Requests" feature lets users wishlist titles for the admin to add
manually — preserving the request UX without crossing into piracy.