dsfs
An experimental Filesystem in USErspace (FUSE) with Discord attachments
using cgofuse.
⚠ Use at your own risk! This is an unfinished project and only
for research or recreational purposes only.
Files are backed on Discord with a very primitive append-only filesystem.
This is considered pre-alpha software and there will be bugs pertaining to
synchronization and functionality.

Here is a blog post going over some implementation
details: FUSEing for fun
Building
Go 1.18+ is required due to the use of generics.
Windows cgo
Prerequisites: WinFsp,
gcc (e.g. from Mingw-builds)
set CPATH=C:\Program Files (x86)\WinFsp\inc\fuse
go build
Windows !cgo
Prerequisites: WinFsp
set CGO_ENABLED=0
go build
macOS
Prerequisites: FUSE for macOS,
command line tools
go build
Linux
Prerequisites: libfuse-dev, gcc
go build
Usage
A drive letter is chosen for Windows if the mount point is not provided.
To run:
dsfs -t <Bot token> -s <Server ID> -m <Mount point>
To run with user token:
dsfs -t <Bot token> -s <Server ID> -m <Mount point> -u
To run with transaction compaction:
dsfs -t <Bot token> -s <Server ID> -m <Mount point> -x
To run with FUSE options:
dsfs -t <Bot token> -s <Server ID> -m <Mount point> -o <FUSE option>
To get more information about the available options:
dsfs --help
You can also use DSFS_TOKEN
and DSFS_SERVER
environment variables in place of -t
and -s
flags.
# use `set` instead of `export` on Windows
export DSFS_TOKEN=<Bot token>
export DSFS_SERVER=<Server ID>
dsfs -m <Mount point>
Common fixes to issues
- If you are using a bot token, you must allow the Message Content Intent for
your bot in the Discord Developer Portal.
- If you are having problems with realtime file synchronization, make sure you
are using a different token for each instance of dsfs.
- If you are experiencing slow startup times, try using the
-c
flag to
compact transactions.
- If you are using Windows and encountering errors with FUSE, try
updating WinFsp to the latest version.