Multi-format, Multi-platform, Multi-user Private E-book Management Platform
Friendly Reminder: This system is for personal learning and book/document management only!
💡 Special Notes:
- The Android APP works well on open e-ink devices (such as iReader e-readers, etc.) after installation, providing an excellent reading experience for e-ink screens.
- iPad or iPhone and other iOS devices can use it via PWA (Progressive Web App). No need to install through the App Store - simply access the website in Safari browser and add it to the home screen to use.
ReadKnows is a powerful private e-book management platform that supports reading and management of e-books in multiple formats including EPUB, PDF, TXT, MOBI, DOCX, MD, etc. Built with modern web technologies, it provides a smooth reading experience and powerful management features.
- 📚 Multi-format Support: EPUB, PDF, TXT, MOBI, DOCX, MD
- 🌐 Multi-platform Access: Web, iOS (PWA), Android (APK), macOS, Windows
- 👥 Multi-user System: Independent personal libraries and reading progress
- 📱 PWA Support: Install to device home screen
- 🎨 Professional Reader: Built-in EPUB and PDF readers with multiple themes
- 🔍 Smart Search: Full-text search support
- 📊 Reading Statistics: Detailed reading history and progress
- 🤖 AI Integration: Supports Ollama and other AI services
- 📦 Batch Import: Scan and import local books automatically
- 🔐 Secure & Reliable: JWT authentication, IP access control
- 📝 Note Management: Reading notes, highlights, export as note books
- 🏷️ Category Management: Book categories and tag management
- 📡 OPDS Support: Compatible with mainstream readers
- 🔊 Voice Reading: Online TTS voice reading (Beta)
- 📄 Office Documents: Word, Excel, PowerPoint support
- 🎧 Audiobooks: Import, organize and play audiobooks
- 💬 Book Friends & Chat: Friends, groups, messaging, file sharing
- 🔤 OCR Recognition: Image text recognition for PDF and images (supports multiple languages)
- Multi-format reader (EPUB, PDF, TXT, MOBI, DOCX, MD)
- Multiple reading themes (light, dark, eye-care, green)
- Customizable font size, font type, line spacing
- Custom fonts support
- Table of contents navigation
- Bookmark management
- Notes and highlights (offline sync)
- Full-text search
- Reading progress sync across devices
- OCR text recognition for PDF images (supports multiple languages)
- Upload, delete, edit book information
- Automatic metadata extraction
- Douban API integration for book info
- Book categories and tags
- Batch operations
- Personal library management
- Batch import with file monitoring
- Recursive directory scanning
- Multi-user support
- User registration and login
- Admin backend
- Reading statistics
- Personal settings
- Ollama local AI service support
- Intelligent reading assistance
- Book content analysis
- AI conversation
- JWT authentication
- IP access control (whitelist/blacklist)
- Captcha protection
- Password encryption (bcrypt)
- Docker: 20.10+ and Docker Compose 2.0+
- Memory: At least 2GB available (4GB+ recommended)
- Disk Space: At least 5GB available (10GB+ recommended)
- Network: Internet access required
- macOS: 10.15+ (Catalina or later) with Docker Desktop
- Windows: 10/11 (64-bit) with WSL 2 or Docker Desktop
- Linux: Ubuntu 20.04+ / Debian 11+ / CentOS 8+ / Fedora 34+ with Docker Engine
- Synology NAS: DSM 7.0+ or DSM 6.2+ with Docker Package
This is the simplest and fastest installation method. The script will automatically complete all configurations.
git clone https://github.com/ttbye/readknows.git
cd readknows# Grant execute permission
chmod +x install-en.sh
# Run installation script
./install-en.shThe installation script will:
- Check Docker and Docker Compose installation
- Check Docker service status
- Auto-detect your platform (macOS/Windows/Linux/Synology)
- Create
.envenvironment file with random JWT_SECRET - Create data directories
- Check port availability (1280 for frontend, 1281 for backend)
- Build Docker images (if needed)
- Start containers
- Initialize admin account (optional)
After installation completes, you will see:
========================================
Installation Complete
========================================
✅ ReadKnows has been successfully installed and started!
Access addresses:
🌐 Frontend: http://localhost:1280
🔌 Backend API: http://localhost:1281
Default Admin Account:
Username: books
Password: readknows
⚠️ Please change the default password after first login!
Open your browser and visit: http://localhost:1280
If you want to manually control the deployment process, follow these steps.
git clone https://github.com/ttbye/readknows.git
cd readknowsCreate .env file in the project root:
cat > .env << EOF
# JWT Configuration
JWT_SECRET=$(openssl rand -base64 32)
JWT_EXPIRES_IN=7d
# Douban API Configuration (Optional)
DOUBAN_API_BASE=
# AI Configuration (Optional)
AI_PROVIDER=ollama
AI_API_URL=http://frontend:1280/ollama-proxy
AI_API_KEY=
AI_MODEL=llama2
# Ollama Server Address
OLLAMA_URL=http://host.docker.internal:11434
# CORS Configuration (Required for Public Domain Access)
# Replace 'your-domain.com' with your actual domain name
# Multiple domains can be separated by commas
ALLOWED_ORIGINS=https://your-domain.com:1280
EOF
⚠️ Important: If deploying to a public domain, replaceyour-domain.cominALLOWED_ORIGINSwith your actual domain name. For local development, you can omit this configuration.
# Create data directory structure
mkdir -p data/backend/{data,books,covers,fonts,import}Choose the appropriate configuration file based on your platform:
- Standard Environment:
sh/docker-compose.yml - macOS:
sh/docker-compose-MACOS.yml - Windows:
sh/docker-compose-WINDOWS.yml - Linux:
sh/docker-compose-Linux.yml - Synology NAS:
sh/docker-compose-Synology.yml
# Enter sh directory
cd sh
# Build and start with standard configuration
docker compose -f docker-compose.yml up -d --build
# Or use platform-specific configuration (Linux example)
docker compose -f docker-compose-Linux.yml up -d --build# Check container status
docker compose -f docker-compose.yml ps
# View logs
docker compose -f docker-compose.yml logs -f
# View backend logs only
docker compose -f docker-compose.yml logs -f backend
# View frontend logs only
docker compose -f docker-compose.yml logs -f frontend# Execute initialization script
docker compose -f docker-compose.yml exec backend node scripts/initAdmin.js
# Or use script in project root
cd ..
chmod +x sh/init-admin.sh
./sh/init-admin.shOpen your browser and visit: http://localhost:1280
Login with default credentials:
- Username:
books - Password:
readknows
⚠️ Security Warning: Please change the default password immediately after first login!
The .env file contains the following configuration items:
# JWT Authentication Configuration
JWT_SECRET=your-secret-key-here-change-in-production
JWT_EXPIRES_IN=7d
# Douban API Configuration (Optional)
DOUBAN_API_BASE=https://api.douban.com/v2
# AI Configuration (Optional)
AI_PROVIDER=ollama
AI_API_URL=http://frontend:1280/ollama-proxy
AI_API_KEY=
AI_MODEL=llama2
# Ollama Server Configuration
OLLAMA_URL=http://host.docker.internal:11434
# CORS Configuration (Required for Public Domain Access)
# Format: Multiple domains separated by commas
# Example: https://example.com:1280,https://www.example.com:1280
# If not configured, only local network access is allowed
ALLOWED_ORIGINS=https://your-domain.com:1280
⚠️ Important: If you are deploying to a public domain, you must configureALLOWED_ORIGINSin your.envfile or docker-compose configuration file. Replaceyour-domain.comwith your actual domain name. Multiple domains can be separated by commas.
Default data directory structure:
data/
└── backend/
├── data/ # SQLite database files
├── books/ # Book file storage
├── covers/ # Cover image storage
├── fonts/ # Font file storage
└── import/ # Import directory (monitored for auto-import)
Default ports:
- Frontend: 1280 (HTTP)
- Backend API: 1281 (HTTP)
To modify ports, edit the ports section in docker-compose.yml:
services:
frontend:
ports:
- "8080:1280" # Change frontend port to 8080
backend:
ports:
- "8081:1281" # Change backend port to 8081If you are deploying ReadKnows to a public domain (not just localhost), you must configure the ALLOWED_ORIGINS environment variable to allow CORS requests from your domain.
Add to your .env file:
ALLOWED_ORIGINS=https://your-domain.com:1280For multiple domains:
ALLOWED_ORIGINS=https://example.com:1280,https://www.example.com:1280,https://app.example.com:1280If you're using platform-specific docker-compose files (e.g., docker-compose-MACOS.yml, docker-compose-Linux.yml), you can modify the ALLOWED_ORIGINS environment variable directly in the file:
environment:
- ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-https://your-domain.com:1280}Replace your-domain.com with your actual domain name.
- Local Development: If you're only accessing via
localhostor local network, you can omit this configuration. - Public Domain: If deploying to a public domain, this configuration is required to prevent CORS errors.
- Port Number: Make sure the port number in
ALLOWED_ORIGINSmatches your frontend port (default is 1280). - HTTPS: If using HTTPS, use
https://in the URL. For HTTP, usehttp://. - Multiple Domains: Separate multiple domains with commas (no spaces).
After installation, login with default admin account:
- Username:
books - Password:
readknows - Email:
admin@readknows.local
⚠️ Security Warning: Please change the default password immediately after first login!
If you need MOBI to EPUB conversion, install Calibre:
chmod +x sh/install-calibre.sh
./sh/install-calibre.sh- Login to system
- Go to Upload page
- Click Batch Import or Scan Import
- Select directory to import
- Place book files in
data/backend/import/directory - System will automatically monitor and import new files
# Check service status
docker compose -f sh/docker-compose.yml ps
# View logs
docker compose -f sh/docker-compose.yml logs -f
# Restart services
docker compose -f sh/docker-compose.yml restart
# Stop services
docker compose -f sh/docker-compose.yml stop
# Start services
docker compose -f sh/docker-compose.yml start
# Stop and remove containers
docker compose -f sh/docker-compose.yml down
# Rebuild images
docker compose -f sh/docker-compose.yml build --no-cache-
Check Docker service:
docker info
-
Check port availability:
# Linux/macOS lsof -i :1280 lsof -i :1281 # Windows netstat -ano | findstr :1280 netstat -ano | findstr :1281
-
View container logs:
docker compose -f sh/docker-compose.yml logs backend docker compose -f sh/docker-compose.yml logs frontend
Usually a directory permission issue:
# Fix permissions
sudo chmod -R 777 data/backend/covers
# Restart container
docker compose -f sh/docker-compose.yml restart backendCheck network configuration:
-
Use host.docker.internal:
OLLAMA_URL=http://host.docker.internal:11434
-
Linux requires additional configuration:
# Add to docker-compose.yml extra_hosts: - "host.docker.internal:host-gateway"
Install Calibre:
./sh/install-calibre.shReset password:
docker compose -f sh/docker-compose.yml exec backend node scripts/resetPassword.js- Change Default Password: Change default admin password immediately after first login
- Use Strong JWT_SECRET: Generate a strong random string for JWT_SECRET
- Configure HTTPS: Use Nginx reverse proxy to configure HTTPS
- Regular Backups: Regularly backup database and book files
- IP Access Control: Configure IP whitelist to limit access
- Update Dependencies: Regularly update dependencies to fix security vulnerabilities
- Firewall Configuration: Configure firewall rules to limit port access
This project is licensed under Apache License 2.0.
- EPUB.js - EPUB reader
- PDF.js - PDF reader
- Calibre - E-book management tool
- React - UI framework
- Express - Web framework
- Author: ttbye
- Project URL: https://github.com/ttbye/readknows
- Issue Tracker: https://github.com/ttbye/readknows/issues
Made with ❤️ by ttbye