π Simple, secure file sharing for ebook libraries
A self-hosted Flask application that lets you share, upload, and manage ebook files with built-in user authentication and library management. Designed for Tolino e-readers and any modern browser.
π± Device Support: Works great with Tolino β and Rakuten Kobo β | Limited support for Kindle (EPUB requires conversion)
β
User Authentication - Secure login and registration system
β
File Uploads - Upload books in PDF, EPUB, TXT, FB2 formats (max 100MB)
β
Share & Download - Share books with other users or download publicly shared files
β
Library Management - Organize your personal ebook library
β
Modern UI - Clean, responsive design; works on mobile, tablet, and desktop
β
Self-Hosted - Full control over your data, runs locally or on your server
β
Docker Ready - One-command deployment with Docker Compose
β
Tolino Compatible - Minimal, JavaScript-free interface works on Tolino e-readers
β
Kobo Compatible - EPUB, PDF, TXT support for Rakuten Kobo devices
- Docker & Docker Compose installed
git clone https://github.com/Maxi2555/tolinofileshare.git
cd tolinofileshare
docker compose upAccess at: http://localhost:7847
That's it! The app is running.
-
Register an account
- Go to http://localhost:7847
- Click "Register"
- Create username and password
-
Upload files
- Click "Home"
- Select a file (PDF, EPUB, TXT, or FB2)
- Click Upload
-
Access your library
- Click "My Library"
- Download your files anytime
- On your computer: Go to http://your-server:7847
- Register and upload books
- On your Tolino: Open browser
- Visit http://your-server:7847/u/yourusername
- Bookmark this page for quick access
- Download books directly to Tolino
# 1. SSH into your server
ssh user@your-server.com
# 2. Clone repository
git clone https://github.com/Maxi2555/tolinofileshare.git
cd tolinofileshare
# 3. Create environment config
cat > .env << EOF
SECRET_KEY=$(python3 -c 'import secrets; print(secrets.token_hex(32))')
EOF
# 4. Start services
docker compose up -d
# 5. Access at http://your-server-ip:7847Create a .env file in the project root:
# IMPORTANT: Generate a strong secret key!
SECRET_KEY=your-super-secret-key-change-this-in-production
# Default paths (change if needed)
UPLOAD_FOLDER=/data/uploads
DATABASE_URL=sqlite:////data/tolinoshare.dbGenerate a strong SECRET_KEY:
python3 -c 'import secrets; print(secrets.token_hex(32))'Before going public:
- Changed
SECRET_KEYto a strong random value - Set strong passwords for user accounts
- (Optional) Set up HTTPS/SSL with reverse proxy (nginx)
- Backed up
/data/directory regularly - Restricted network access to port 7847 if needed
- Updated Docker images:
docker compose down && docker compose pull && docker compose up -d
| Format | Max Size | Use Case |
|---|---|---|
| 100 MB | Documents, ebooks | |
| EPUB | 100 MB | E-reader format |
| TXT | 100 MB | Plain text |
| FB2 | 100 MB | FictionBook format |
| Device | Status | Supported Formats | Notes |
|---|---|---|---|
| Tolino | β Full | EPUB, PDF, TXT, FB2 | Works perfectly with Tolino browser |
| Rakuten Kobo | β Full | EPUB, PDF, TXT | No FB2 support; excellent with EPUB |
| Kindle | PDF, TXT only | EPUB needs conversion to MOBI/AZW3 | |
| Web Browser | β Full | All formats | Modern browser on PC/Mac/Linux |
Note: TolinoShare serves files directly to your device - you don't need to convert files, just ensure your device supports the format.
To get the latest version:
git pull origin main
docker compose down
docker compose up --buildPort 7847 already in use?
Edit docker-compose.yml, change the first 7847 to another port:
ports:
- "9999:8080" # Now use http://localhost:9999Docker permission denied?
sudo usermod -aG docker $USER
newgrp dockerCan't access from other devices?
Use your server's IP address instead of localhost:
http://192.168.1.100:7847 # Replace with your server IP
Data disappeared after restart?
Ensure you didn't use docker compose down -v (which deletes volumes). Use:
docker compose down # Keeps data
docker compose up # Restarts with data intacttolinofileshare/
βββ app/
β βββ templates/ # HTML templates (modern UI)
β β βββ base.html # Main layout
β β βββ index.html # Home & upload
β β βββ login.html # Login page
β β βββ register.html # Registration
β β βββ upload.html # Upload form
β β βββ user_library.html # User's library
β βββ routes/
β β βββ auth.py # Login/register routes
β β βββ upload.py # Upload routes
β β βββ share.py # Download/share routes
β βββ utils/
β β βββ file_check.py # File validation
β β βββ link_generator.py # Safe link generation
β βββ models.py # Database models
β βββ config.py # Configuration
β βββ __init__.py # Flask app factory
βββ docker-compose.yml # Docker setup
βββ Dockerfile # Container configuration
βββ requirements.txt # Python dependencies
# Install dependencies
pip install -r requirements.txt
# Run development server
python -m flask run --reloaddocker compose up --buildView logs:
docker compose logs -f appStop:
docker compose down- Modern UI - Light, gradient design optimized for all devices
- File Upload - Drag-and-drop or click to upload
- Library View - Easy access to all your files
- Tolino Compatible - Works in basic browsers
| Route | Method | Description |
|---|---|---|
/ |
GET | Home page & upload form |
/register |
GET, POST | User registration |
/login |
GET, POST | User login |
/logout |
GET | User logout |
/upload |
POST | Upload a file |
/u/<username> |
GET | View user's library |
/download/<file_id> |
GET | Download file |
- Local Storage: All files stored on your server, under your control
- Encrypted Sessions: User sessions are securely managed
- Password Hashing: Passwords stored securely with werkzeug
- No Telemetry: Zero external tracking or analytics
- Open Source: Full source code transparency
MIT License - See LICENSE file
This project includes code and documentation that were partially generated using AI (GitHub Copilot).
However:
- β All code has been reviewed and tested
- β All documentation is accurate and complete
- β Security is manually verified and production-ready
- β Source code is fully open and transparent
- β AI was used to accelerate development, not replace human review
- Found a bug? Open an Issue
- Have a feature idea? Submit a Pull Request
- Questions? Discussions welcome!
See CONTRIBUTING.md for guidelines.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Check README & code comments
Version: v0.8
Status: Stable & Production Ready
Last Updated: April 2026
Maintained by: @Maxi2555