Turn Discord into unlimited cloud storage with FTP support.
ddrv is a Go application that exploits Discord's feature of unlimited file attachments (up to 25MB per file) to provide virtually unlimited cloud storage. It uses an FTP frontend, allowing users to upload any size of file. Behind the scene, ddrv cuts the file into 25MB chunks and uploads it to Discord, all the while maintaining the file's metadata in a PostgreSQL database.
- Theoretically unlimited file size
- Unlimited space, tested with 200TB of data
- Robust FTP frontend which supports various FTP clients such as Filezilla, RClone, Windows Explorer, Ubuntu (Nautilus) and many more
- File splitting and reassembly: Larger files are split into 25MB chunks for storage on Discord and then reassembled upon retrieval
- PostgreSQL-based file metadata management: File metadata is systematically stored and managed in a PostgreSQL database, enabling efficient file access and manipulation.
- PostgreSQL (Data provider - To store file metadata)
- Discord WebhookURLs (To store actual file data)
- Navigate to the Release page and download the latest release suitable for your platform.
- Decompress the binary file and initialize ddrv with the command provided below:
./ddrv --dburl=postgres://user:pass@host:port/dbname?sslmode=false --webhooks=webhookURL1,webhookURL2
- An FTP server will launch on ftp://localhost:2525.
- To connect to the server, you can use an FTP client like Filezilla or Windows Explorer. Default credentials are empty for both username and password fields.
- Ensure that you have Go (version 1.20 or newer) installed on your system.
- Clone the repository:
git clone https://github.com/forscht/ddrv.git
- Navigate to the cloned directory:
cd ddrv
- Build the project:
go build -race -o ddrv ./cmd/ddrv # If you're on linux and make is installed # make build
- Run the executable:
./ddrv --dburl=postgres://user:pass@host:port/dbname?sslmode=false --webhooks=webhookURL1,webhookURL2
usage: ddrv --dburl=DBURL --webhooks=WEBHOOKS [<flags>]
A utility to use Discord as a file system!
Flags:
--[no-]help Show context-sensitive help (also try --help-long and --help-man).
--[no-]version Show application version.
--ftpaddr=":2525" Network address for the FTP server to bind to. It defaults to ':2525' meaning it listens on all interfaces. ($FTP_ADDR)
--ftppr="" Range of ports to be used for passive FTP connections. The range is provided as a string in the format 'start-end'. ($FTP_PORT_RANGE)
--username="" Username for the ddrv service, used for FTP and HTTP access authentication. ($USERNAME)
--password="" Password for the ddrv service, used for FTP and HTTP access authentication. ($PASSWORD)
--dburl=DBURL Connection string for the Postgres database. The format should be: postgres://user:password@localhost:port/database?sslmode=disable ($DATABASE_URL)
--webhooks=WEBHOOKS Comma-separated list of Discord webhook URLs used for sending attachment messages. ($DISCORD_WEBHOOKS)
--csize=25165824 The maximum size in bytes of chunks to be sent via Discord webhook. By default, it's set to 24MB (25165824 bytes). ($DISCORD_CHUNK_SIZE)
We welcome contributions to ddrv! Here's how you can help:
- Report Issues: If you find a bug or a problem, please open an issue here on GitHub. When describing your issue, please include as much detail as you can. Steps to reproduce the problem, along with your environment (OS, Go version) and relevant logs, are very helpful.
- Suggest Enhancements: If you have an idea for a new feature or an improvement to existing functionality, please open an issue to discuss it. Clear explanations of what you're looking to achieve are appreciated.
- Open a Pull Request: Code contributions are welcomed! If you've fixed a bug or implemented a new feature, please submit a pull request (PR). For significant changes, please consider discussing them in an issue first.
- Fork the repository and create a new branch from main where you'll do your work.
- Commit your changes, writing clear, concise commit messages.
- Open a PR with your changes, and describe the changes you've made and why. If your PR closes an issue, include "Closes #123" (where 123 is the issue number) in your PR description.
- Add HTTP Frontend with video playback support: This will allow for direct video streaming from the storage
- Add support for FTP TLS config: This will secure the data transfer process between the FTP client and the ddrv server
- Write tests for 100% coverage: Ensuring that all code paths are tested will greatly increase the reliability of the software
- Enable parallel upload for single file: This will speed up the upload process by sending multiple chunks of a single file simultaneously.
ddrv is licensed under the MIT License. See the LICENSE file for full license details. For quick reference, the MIT License permits use, duplication, modification, distribution, and private use of the software, given that the conditions of the license are met. However, the software is provided "as is" and without any warranty. For more information, please read the full license text.