How samucamg/nebulaftp works
Nebula FTP exposes Telegram-backed files through FTP and SFTP, with a web panel for user and folder permissions. The main workflow is client authentication and file operations through a protocol server, PathIO metadata/local staging, background chunk uploads to Telegram, and on-demand part reads for downloads. SQLite is the default metadata store; MongoDB is an alternative. The README documents staging workers, cleanup, streaming, and metrics, but their exact wiring is only partly visible in the sampled source, so uncertain links are omitted.
Main entry points: pathio.py Virtual filesystem · sqlite_db.py Metadata store · main.py Upload workers · server.py FTP server
Components 20
Client access
- FTP server
ftp/server.py - SFTP server
ftp/sftp.py - User authentication
ftp/sqlite_db.py
File storage
- Virtual filesystem
ftp/pathio.py - SQLite filesystem
ftp/sqlite_db.py - SQLite adapter
ftp/sqlite_adapter.py - Metadata store
ftp/sqlite_db.py - Local staging
main.py - Telegram channel
- Telegram part reader
ftp/tg.py - MongoDB backend
ftp/pathio.py
Administration
- Admin panel
web/app.py
Runtime operations
- Staging watcher
main.py - Upload queue
ftp/common.py - Upload workers
main.py - Staging cleanup
main.py - Runtime metrics
main.py
Other components
- FTP client
- SFTP client
- Web administrator
Connections 23
- FTP client → FTP server: issues FTP commands
- SFTP client → SFTP server: issues SFTP requests
- Web administrator → Admin panel: manages accounts
- FTP server → User authentication: authenticates users
- SFTP server → User authentication: authenticates users
- FTP server → Virtual filesystem: performs file operations
- SFTP server → Virtual filesystem: performs file operations
- Virtual filesystem → SQLite filesystem: uses SQLite filesystem
- SQLite filesystem → Metadata store: reads and writes
- Virtual filesystem → MongoDB backend: uses MongoDB backend
- Admin panel → Metadata store: manages users
- Staging watcher → Local staging: scans files
- Staging watcher → Metadata store: registers files
- Staging watcher → Upload queue: enqueues uploads
- Virtual filesystem → Upload queue: enqueues completed writes
- Upload workers → Upload queue: dequeues uploads
- Upload workers → Telegram channel: uploads file parts
- Upload workers → Metadata store: stores part metadata
- Virtual filesystem → Telegram part reader: requests missing local data
- Telegram part reader → Telegram channel: reads file parts
- Virtual filesystem → Metadata store: loads file parts
- Staging cleanup → Local staging: removes stale files
- Runtime metrics → Upload workers: reports activity