Skip to content

Maxi2555/tolinofileshare

Repository files navigation

TolinoShare v0.8

πŸ“š 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)

✨ Features

βœ… 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

πŸš€ Quick Start (30 seconds)

Requirements

  • Docker & Docker Compose installed

Installation

git clone https://github.com/Maxi2555/tolinofileshare.git
cd tolinofileshare
docker compose up

Access at: http://localhost:7847

That's it! The app is running.

πŸ“– How to Use

For First-Time Users

  1. Register an account

  2. Upload files

    • Click "Home"
    • Select a file (PDF, EPUB, TXT, or FB2)
    • Click Upload
  3. Access your library

    • Click "My Library"
    • Download your files anytime

For Tolino E-Reader Users

  1. On your computer: Go to http://your-server:7847
  2. Register and upload books
  3. On your Tolino: Open browser
  4. Visit http://your-server:7847/u/yourusername
  5. Bookmark this page for quick access
  6. Download books directly to Tolino

🌐 Server Deployment

Deploy to VPS / Cloud Server

# 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:7847

Configuration

Create 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.db

Generate a strong SECRET_KEY:

python3 -c 'import secrets; print(secrets.token_hex(32))'

πŸ”’ Security Checklist

Before going public:

  • Changed SECRET_KEY to 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

πŸ“¦ Supported File Types

Format Max Size Use Case
PDF 100 MB Documents, ebooks
EPUB 100 MB E-reader format
TXT 100 MB Plain text
FB2 100 MB FictionBook format

οΏ½ Device Compatibility

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 ⚠️ Limited 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.

οΏ½πŸ”„ Updating

To get the latest version:

git pull origin main
docker compose down
docker compose up --build

πŸ› Troubleshooting

Port 7847 already in use?

Edit docker-compose.yml, change the first 7847 to another port:

ports:
  - "9999:8080"  # Now use http://localhost:9999

Docker permission denied?

sudo usermod -aG docker $USER
newgrp docker

Can'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 intact

πŸ“ Project Structure

tolinofileshare/
β”œβ”€β”€ 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

πŸ”§ Development

Local Setup

# Install dependencies
pip install -r requirements.txt

# Run development server
python -m flask run --reload

With Docker (Development)

docker compose up --build

View logs:

docker compose logs -f app

Stop:

docker compose down

🌍 Screenshots

  • 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

πŸ“‹ API Routes

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

πŸ” Privacy & Security

  • 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

πŸ“„ License

MIT License - See LICENSE file

οΏ½ Transparency Note

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

🀝 Contributing

  • Found a bug? Open an Issue
  • Have a feature idea? Submit a Pull Request
  • Questions? Discussions welcome!

See CONTRIBUTING.md for guidelines.

πŸ“ž Support

  • 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

About

Simple Web-app to drop Files of all supported kind to Tolino and Rakuten Kobo

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors