Using Github as Infinite Storage
This is basically just a better version of this post from Buzzheavier.
wtf is this?
This thing lets you use GitHub as infinite storage. It’s got an FTP frontend which you can mount with rclone and use as just another folder in your filesystem. Feel free to use this for storing a bunch of torrented content.
Tested on
- Linux
- MacOS
If you’re on Windows, figure it out yourself.
Download and build
Download the source from here. You’ll be compiling this from source, so install Go if you haven’t already.
Extract the zip and open the fafda-main
folder. Open a terminal in the same folder and run go build -ldflags="-s -w" -o ./bin/fafda ./cmd/fafda
. You should now have a compiled binary in the bin
folder.
Setup
- You SHOULD create a new GitHub account for this. Not saying it is necessary, but GitHub will most definitely shadowban your account for this.
- Create a GitHub repository and create a release. It doesn’t need to have any files, just put gibberish for the repo name and the release name. You might want to make this private so your files aren’t public (fafda doesn’t have encryption)
- Create a GitHub personal access token. Give it any name and set it to never expire. Give it access to the repository you just created. In the “Repository permissions” section, set “Contents” to “Read and write”, then generate the token.
- Copy the token somewhere as you will not be able to see it again.
- While in the
fafda-main/bin
folder, execute./fafda --list-releases <token>
where<token>
is your personal access token. It should return something similar to this:
[
{
"authToken": "github_pat_1234567890abcdefghijklmnopqrstuvwxyz",
"username": "foenem",
"repository": "skills-introduction-to-github",
"releaseId": 123456789,
"releaseTag": "tag"
}
]
- Create a new file in the
fafda-main/bin
folder and call itconfig.yaml
. Paste this into the file:
ftpServer:
addr: ':6969'
username: 'foenem'
password: 'foenem'
github:
partSize: 10485760
concurrency: 3
releases:
- readOnly: false
authToken: 'github_pat_123456789abcdefghijklmnopqrstuvwxyz'
username: 'foenem'
releaseId: 123456789
releaseTag: 'tag'
repository: 'skills-introduction-to-github'
Replace the stuff below releases:
with the stuff ./fafda --list-releases <token>
returned.
- Start fafda with
./fafda
or with./fafda --debug
if you feel like it - Use any FTP client to connect to
127.0.0.1:6969
with userfoenem
and passfoenem
or use rclone (you have to configure it first).
- Command for mounting:
rclone mount -v --allow-other --vfs-cache-mode=writes --vfs-cache-max-age=10s fafda: ./GitHubDrive
(wherefafda
is the name of the remote you created in rclone and where./GitHubDrive
is a path to a folder you want to mount fafda on)
- That’s it!