Prerequisites
Before installing EmbyTok, ensure you have:- Node.js v14 or higher (v20 recommended)
- npm, yarn, or pnpm package manager
- Git (to clone the repository)
Installation
Install dependencies
Install the required npm packages using your preferred package manager:This will install all dependencies including:
- React 18 and React DOM
- Vite (build tool)
- TypeScript
- Tailwind CSS
- Capacitor (for mobile apps)
- Lucide React (icons)
- PWA plugin
The
npm run dev command starts both the frontend development server and the local file server backend for testing the Folder Server mode.Development Commands
| Command | Description |
|---|---|
npm run dev | Start full stack (frontend + backend file server) |
npm run dev:web | Start frontend only (Vite dev server) |
npm run dev:lan | Start frontend with LAN access (0.0.0.0) |
npm run dev:stack | Alias for dev - full stack mode |
npm run build | Build production bundle |
npm run preview | Preview production build locally |
Building for Production
Build the application
Compile TypeScript and bundle assets for production:This command:
- Runs TypeScript compiler (
tsc) - Builds optimized production bundle with Vite
- Outputs to the
dist/directory
Preview the production build (optional)
Test the production build locally:The preview server will start on port 4173 by default.
Running with File Server Backend
EmbyTok includes a built-in file server for serving local media files without Emby/Plex:File Server Environment Variables
| Variable | Default | Description |
|---|---|---|
PORT | 5176 | Server port |
HOST | 0.0.0.0 | Listen address (0.0.0.0 for LAN access) |
SERVE_WEB | true | Serve static web files |
WEB_ROOT | dist | Web files directory |
LAN_CONFIG_FILE | ./lan-media-config.json | Service configuration file |
MEDIA_ROOT | - | Default media directory for initial setup |
BROWSE_ROOTS | - | Comma-separated browsable root directories |
The file server provides both the web UI and REST API endpoints for folder browsing and video streaming.
Troubleshooting
API proxy errors in development
API proxy errors in development
If you see errors like:Solution: The backend file server is not running. Use
npm run dev (which starts both frontend and backend) instead of npm run dev:web.Port already in use
Port already in use
If port 5173 (Vite) or 5176 (file server) is already in use:Solution: Change the port using environment variables:
Build fails with TypeScript errors
Build fails with TypeScript errors
Solution: Ensure you’re using TypeScript 5.2 or higher:
Progressive Web App (PWA)
EmbyTok is configured as a PWA with offline support:- Automatic updates: Service worker updates automatically
- Install prompt: Available on mobile browsers and desktop Chrome/Edge
- Offline assets: Static files are cached for offline use
- Portrait mode: Optimized for vertical video viewing
- Open EmbyTok in Chrome/Edge/Safari
- Look for the install prompt in the address bar
- Click “Install” to add to home screen
Next Steps
Docker Deployment
Deploy with Docker for production environments
Android App
Build native Android application with Capacitor
iOS App
Create native iOS app with UIKit
Configuration
Configure Emby/Plex servers and settings