Skip to content

Subroz/seedrccweb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ CloudTorrent - Seedr Web Interface

A beautiful, feature-rich web interface for Seedr.cc cloud torrent service. Built with Flask and a stunning cyberpunk-inspired UI with dual access modes for public sharing and private management.

Status Python Flask License


🌟 Overview

CloudTorrent provides a modern, intuitive web interface to interact with your Seedr.cc cloud storage. It features two distinct operational modes:

  • 🌐 Public Mode - Share your Seedr files with anyone via a web interface (read-only access with torrent adding)
  • πŸ” Owner Mode - Full administrative control with authentication for managing your account

Why CloudTorrent?

  • Beautiful UI: Cyberpunk-inspired design with Aurora animations and responsive layout
  • Dual Access Modes: Public file sharing + secure owner management
  • Real-time Updates: Live download progress tracking with auto-refresh
  • Video Streaming: Built-in video player for supported formats
  • Smart Storage Alerts: Automatic warnings when storage is running low
  • Zero Configuration: Auto-saves token on owner login for instant public access

✨ Features

🌐 Public Access Features

  • πŸ“ File Browser - Navigate through shared Seedr folders
  • ⬇️ Direct Downloads - Get direct download links for any file
  • 🎬 Video Streaming - Stream MP4, WebM, and other supported formats in-browser
  • 🧲 Add Torrents - Add magnet links or torrent URLs (if enabled)
  • πŸ“Š Storage Monitor - Real-time storage usage visualization
  • ⏱️ Download Progress - Live tracking of active torrent downloads
  • 🎨 Beautiful UI - Aurora-animated background with modern cyberpunk aesthetics
  • πŸ“± Responsive Design - Optimized for desktop, tablet, and mobile devices

πŸ” Owner Mode Features

  • πŸ”‘ Secure Login - Authenticate with Seedr email/password
  • πŸ’Ύ Auto Token Save - Automatically saves access token to config.json
  • πŸ—‘οΈ File Management - Delete files and folders directly from the interface
  • 🧲 Torrent Management - Full control over adding torrents
  • πŸ”„ Session Management - Secure owner sessions with logout functionality
  • 🎯 Token Extraction - View and manage access tokens

πŸš€ Quick Start

Prerequisites

  • Python 3.8+ installed on your system
  • A Seedr.cc account (free or premium)

Installation

1️⃣ Clone the Repository

git clone https://github.com/Subroz/seedrccweb.git
cd seedrccweb

2️⃣ Install Dependencies

pip install -r requirements.txt

Or install packages individually:

pip install flask flask-cors seedr

3️⃣ Configure (Optional)

You can enable public access by either:

Option A: Using Environment Variables (Recommended)

export SEEDR_EMAIL="your@email.com"
export SEEDR_PASSWORD="your-password"

This automatically logs in on startup and keeps public access working even if tokens expire.

Option B: Using config.json

{
    "seedr_token": "your-access-token-here"
}

Option C: Using Token Environment Variable

export SEEDR_TOKEN="your-access-token-here"

Note: You don't need to configure manually. Just login via the owner panel, and the token will be auto-saved! For Replit deployment, use Secrets to store SEEDR_EMAIL and SEEDR_PASSWORD.

4️⃣ Run the Application

python app.py

5️⃣ Access the Interface

  • Public Interface: http://localhost:5000
  • Owner Panel: http://localhost:5000/owner-login

πŸ“– Usage Guide

🌐 Public Mode (File Sharing)

  1. Navigate to http://localhost:5000
  2. Browse files and folders
  3. Click on files to download
  4. Use the ▢️ button to stream videos
  5. Add torrents using the magnet link input (if enabled)

Note: Public mode requires a valid token to be configured (automatically done after owner login).

πŸ” Owner Mode (Administration)

First Time Setup

  1. Navigate to http://localhost:5000/owner-login
  2. Enter your Seedr.cc email and password
  3. Click "Sign In"
  4. βœ… Token is automatically saved to config.json
  5. πŸŽ‰ Public access is now enabled!

Managing Files

  • View Files: Browse all your Seedr files and folders
  • Delete Items: Use delete buttons on files/folders (owner mode only)
  • Add Torrents: Add magnet links or torrent URLs
  • Monitor Storage: Real-time storage usage with warnings

API Access

Owner mode provides secure API endpoints:

// Example: Add a torrent (requires owner session)
fetch('/api/owner/torrent', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'X-Session-ID': 'your-session-id'
    },
    body: JSON.stringify({ link: 'magnet:?xt=...' })
});

πŸ”§ Configuration

Environment Variables

Variable Description Default
SEEDR_EMAIL Seedr account email for auto-login (recommended) None
SEEDR_PASSWORD Seedr account password for auto-login (recommended) None
SEEDR_TOKEN Seedr access token for public mode (alternative) None
FLASK_DEBUG Enable Flask debug mode False
FLASK_RUN_PORT Port to run the server on 5000

Configuration File (config.json)

{
    "seedr_token": "your-seedr-access-token-here"
}

The token is automatically saved when you login through the owner panel.

Running on a Custom Port

python app.py  # Runs on port 5000 by default

To change the port, modify the app.run() line in app.py:

app.run(debug=True, host='0.0.0.0', port=8080)

🐳 Docker Deployment

Using Docker

1️⃣ Create Dockerfile

FROM python:3.11-slim

WORKDIR /app

# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy application files
COPY . .

# Expose port
EXPOSE 5000

# Run application
CMD ["python", "app.py"]

2️⃣ Build and Run

# Build the image
docker build -t cloudtorrent .

# Run the container
docker run -d \
  -p 5000:5000 \
  -v $(pwd)/config.json:/app/config.json \
  --name cloudtorrent \
  cloudtorrent

3️⃣ With Environment Variables

docker run -d \
  -p 5000:5000 \
  -e SEEDR_TOKEN="your-token-here" \
  --name cloudtorrent \
  cloudtorrent

Using Docker Compose

Create docker-compose.yml:

version: '3.8'

services:
  cloudtorrent:
    build: .
    ports:
      - "5000:5000"
    volumes:
      - ./config.json:/app/config.json
    environment:
      - SEEDR_TOKEN=${SEEDR_TOKEN}
    restart: unless-stopped

Run with:

docker-compose up -d

πŸš€ Production Deployment

Using Gunicorn

# Install Gunicorn
pip install gunicorn

# Run with 4 worker processes
gunicorn -w 4 -b 0.0.0.0:5000 app:app

Using Gunicorn + Nginx

1️⃣ Gunicorn Configuration (gunicorn_config.py)

bind = "127.0.0.1:8000"
workers = 4
worker_class = "sync"
timeout = 120
keepalive = 5

2️⃣ Run Gunicorn

gunicorn -c gunicorn_config.py app:app

3️⃣ Nginx Configuration

server {
    listen 80;
    server_name your-domain.com;

    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Using systemd (Linux Service)

Create /etc/systemd/system/cloudtorrent.service:

[Unit]
Description=CloudTorrent Seedr Web Interface
After=network.target

[Service]
Type=simple
User=www-data
WorkingDirectory=/path/to/seedrccweb
Environment="PATH=/path/to/venv/bin"
ExecStart=/path/to/venv/bin/gunicorn -w 4 -b 0.0.0.0:5000 app:app
Restart=always

[Install]
WantedBy=multi-user.target

Enable and start:

sudo systemctl enable cloudtorrent
sudo systemctl start cloudtorrent
sudo systemctl status cloudtorrent

πŸ“ Project Structure

seedrccweb/
β”œβ”€β”€ app.py                 # Flask backend application with dual-mode API
β”œβ”€β”€ index.html            # Public interface (beautiful file browser)
β”œβ”€β”€ owner.html            # Owner login and management interface
β”œβ”€β”€ requirements.txt      # Python package dependencies
β”œβ”€β”€ config.json           # Configuration file (auto-generated)
β”œβ”€β”€ LICENSE               # MIT License
└── README.md             # This documentation

Key Files

  • app.py: Main Flask application with public and owner API routes
  • index.html: Public-facing interface with file browsing and streaming
  • owner.html: Administrative interface for owner authentication
  • config.json: Auto-generated configuration with saved token

πŸ”Œ API Documentation

Public Endpoints

GET /api/status

Check API status and public access availability.

Response:

{
    "status": "online",
    "seedr_available": true,
    "public_access": true,
    "message": "Public access ready"
}

GET /api/drive

Get root folder contents and storage information.

Response:

{
    "space_used": 1073741824,
    "space_max": 10737418240,
    "folders": [...],
    "files": [...],
    "torrents": [...]
}

GET /api/folder/<folder_id>

Get contents of a specific folder.

GET /api/file/<file_id>

Get file information including download URL.

POST /api/torrent

Add a torrent (public mode).

Request:

{
    "link": "magnet:?xt=urn:btih:..."
}

Owner Endpoints (Require Authentication)

POST /api/owner/login

Authenticate as owner with Seedr credentials.

Request:

{
    "email": "your@email.com",
    "password": "your-password"
}

Response:

{
    "success": true,
    "session_id": "abc123...",
    "token_saved": true,
    "space_used": 1073741824,
    "space_max": 10737418240
}

POST /api/owner/logout

Logout from owner session.

DELETE /api/owner/file/<file_id>

Delete a file (owner only).

DELETE /api/owner/folder/<folder_id>

Delete a folder (owner only).


πŸ›‘οΈ Security Considerations

Best Practices

  • βœ… Use HTTPS in production to encrypt token transmission
  • βœ… Restrict Access to owner panel using firewall rules or authentication proxy
  • βœ… Regular Backups of config.json containing your token
  • βœ… Environment Variables for sensitive data in production
  • βœ… Secure Sessions - Sessions are stored in memory (consider Redis for production)

Token Security

  • πŸ” Tokens are stored in config.json with restricted file permissions
  • πŸ” Never commit config.json to version control (already in .gitignore)
  • πŸ” Owner sessions use cryptographically secure session IDs
  • πŸ” Credentials are never stored on the server

Production Recommendations

  1. Use a reverse proxy (Nginx/Apache) with HTTPS
  2. Configure firewall to restrict owner panel access
  3. Enable rate limiting to prevent abuse
  4. Monitor logs for suspicious activity
  5. Use Redis for session storage in production

πŸ› Troubleshooting

"Seedr package not installed"

pip install seedr
# or
pip install -r requirements.txt

"Public access not configured"

Solution: Login via the owner panel at /owner-login. The token will be auto-saved.

"Invalid login credentials"

  • βœ… Verify your email and password are correct
  • βœ… Check your Seedr.cc account status
  • βœ… Ensure your account has verified email

"Connection refused" / Port Already in Use

# Check if port 5000 is in use
lsof -i :5000

# Kill the process using the port
kill -9 <PID>

# Or run on a different port
python app.py  # Edit app.py to change port

Files Not Showing / Empty State

  • πŸ”„ Click the "Refresh" button
  • πŸ”„ Check your Seedr.cc account directly
  • πŸ”„ Verify the token is valid and not expired
  • πŸ”„ Check browser console for JavaScript errors

Video Streaming Not Working

  • βœ… Ensure the file format is supported (MP4, WebM, MOV, M4V)
  • βœ… Check that the file has finished downloading in Seedr
  • βœ… Verify your browser supports HTML5 video
  • βœ… Try downloading the file instead of streaming

Storage Warning Shows Incorrect Data

  • πŸ”„ Refresh the page to update storage information
  • πŸ”„ Login to Seedr.cc directly to verify storage usage
  • πŸ”„ Delete some files to free up space

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Development Setup

# Clone the repository
git clone https://github.com/Subroz/seedrccweb.git
cd seedrccweb

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run in debug mode
export FLASK_DEBUG=1
python app.py

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License

Copyright (c) 2024 CloudTorrent

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

πŸ™ Credits & Acknowledgments


πŸ“ž Support

If you encounter any issues or have questions:

  1. Check the Troubleshooting section above
  2. Search existing issues on GitHub Issues
  3. Create a new issue with detailed information about your problem.

⭐ Star History

If you find this project useful, please consider giving it a star on GitHub! ⭐


Made with ❀️ by Subro
Powered by Flask β€’ Seedr.cc β€’ Python

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors