Include fuse module in the kernel of the VM

Hello,

Could it be possible to include the fuse module in the kernel of the VM?

Fuse is very useful for example to mount a s3 bucket using s3fs as a way of having a small persistent storage for the application.

Thank you in advance for considering my request.

This might be doable. Give us a few days to look into it!

@kurt This would be a really awesome feature. I did a round of comparisons among the different PAAS platforms and none of them allow to mount an S3 bucket:

  • Google CloudRun: No
  • Digital Ocean App Platform: No
  • AWS Fargate: No
  • Google App Engine: Partly (more a hack)

The closest that I got was with Google App Engine, but this requires enabling SSH on the VM and then restarting the container to run in privileged mode. More info: docker - Problem running gcsfuse on Google App Engine - Stack Overflow

To use /dev/fuse it seems that running the container with: --cap-add SYS_ADMIN --device /dev/fuse is sufficient but using SYS_ADMIN might not be ideal? Not the export on this.

Some further digging shows that Linux kernel added namespace support for fuse in 4.18, which would remove the requirement for SYS_ADMIN. Following info might be helpful: Allow FUSE functionality by default · Issue #321 · docker/for-linux · GitHub

Really enjoying getting my feet wet with Fly, keep up the good work!

You shouldn’t run into capability problems here, since we’re not actually running containers at all — we convert them into full-fledge VMs with their own kernel, so root here actually means root.

We do run a deliberately stripped down kernel, though, so we’ll probably have to add fuse deliberately. :slight_smile:

Thanks @thomas, much appreciated. Lots of learning to do still. Was getting the same errors, … assumptions … you know the story.

Adding my own +1 (and a half) for this feature then.

Hi @kurt, are there any news on this? I am looking to move some personal hosting to fly.io and would be really happy about FUSE.

Any progress? I read that you’re using FUSE to support LiteFS; I’m looking to use juicefs in my container which depends on FUSE too.

Yes, we’re using FUSE with LiteFS. I’m not aware of any kernel changes we made to enable it though. It should “just work”. I’ve been able to run FUSE v2 & v3 without a problem.

I’ve used it with both Ubuntu & Alpine images:

# Ubuntu
$ apt install fuse   # FUSE v2
$ apt install fuse3  # FUSE v3
# Alpine
$ apk add fuse   # FUSE v2
$ apk add fuse3  # FUSE v3

Thanks!

Yes; apk add python3, fuse, fuse3 works with juicefs. Now I can do asset updates or deployments from any machine and have them available on my flyio container instantly.

Been out of the loop for quite some time … this is awesomeness news!