this post was submitted on 16 Feb 2024
28 points (91.2% liked)

Selfhosted

40313 readers
185 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I have SSHFS on my server and would like to have it automatically mounted and store all of the documents, desktop, downloads, etc. on a couple computers. I am able to get it to all work except for mounting on startup. The server is Debian 12 and both clients are Tumbleweed. Nothing in fstab seems to work. When I add x-systemd.automount, well, at best programs that try to use it crash and at worst I have to go through recovery mode to get the system to boot properly. I am using ed25519 keys with no passwords for authentication. Does anyone know how I could get this to work?

you are viewing a single comment's thread
view the rest of the comments
[–] cygon@lemmy.world 2 points 9 months ago (1 children)

I'm on OpenRC, so I can't say anything about systemd, but I have several SSHFS mounts (non-auto) listed in my fstab:

sshfs#root@192.168.0.123:/random-folder/ /mnt/random-folder fuse noauto,uid=1000,gid=100,allow_other 0 0

Is that similar to what you've tried in your fstab? I'd assume replacing noauto with auto should just work, but then again, I haven't tried it (and rebooting my system right now would be very inconvenient, sorry).

It also might require you to either use password-based login and specify the password or store the SSH keys in the .ssh directory of the user doing the mount (should be root with auto set).

[–] HumanPerson@sh.itjust.works 1 points 9 months ago

I already have SSH keys set up but auto doesn't work. I think fstab mounts things before network is up.