There is a kbfsd daemon available in ports now, which automates all those steps.
We assume here that you've got a Keybase account and you are already logged in. We use beastie as a username of your non-root user account.
# pw groupmod operator -m beastie
Otherwise you are going to get /dev/fuse: Permission denied. Also you might need to log out and log in after adding your user to the operator group.
keybased.sock. It could be done by simply asking the Keybase client to interact with KBFS somehow. Although the following command fails because KBFS is not mounted just yet it configures the system to be ready to mount KBFS.$ keybase fs ls /keybase
# kldload fuse
# sysctl vfs.usermount=1
# mkdir -p /keybase # chown beastie /keybase
$ kbfsfuse /keybase
You should get an output like this:
▶ INFO KBFS version 1.0.2 ▶ WARNING adding NotifyService protocol ▶ INFO | net.Listen on unix:/home/beastie/.config/keybase/kbfsd.sock ▶ INFO OnConnect called with a new connection ▶ INFO authentication successful; ping interval: 30s ▶ INFO authentication successful; ping interval: 30s ▶ INFO MDServerRemote: auth token refreshed ▶ INFO Mounting the filesystem was a success ▶ INFO Created new folder-branch for 1e163a1a3bb7d37a20eabc130d015406 [tags:FID=XNhXFtI-T6rksgAAGdI7Fg]
You have to leave your terminal open running kbfsfuse. If you stop the program, the KBFS volume is unmounted.
When I run kbfsfuse /keybase as root or sudo kbfsfuse /keybase I get the following error messages:
▶ INFO KBFS version 1.0.2 ▶ WARNING (CONN KeybaseDaemonRPC ebdc0ab8) Connection: error dialing transport: dial unix /root/.config/keybase/keybased.sock: connect: no such file or directory ▶ WARNING KeybaseDaemonRPC: connection error: "dial unix /root/.config/keybase/keybased.sock: connect: no such file or directory"; retrying in 2s ▶ WARNING (CONN CryptoClient c9e050c7) Connection: error dialing transport: dial unix /root/.config/keybase/keybased.sock: connect: no such file or directory ▶ WARNING CryptoClient: connection error: "dial unix /root/.config/keybase/keybased.sock: connect: no such file or directory"; retrying in 2s ▶ INFO | net.Listen on unix:/root/.config/keybase/kbfsd.sock ▶ INFO OnConnect called with a new connection ▶ WARNING (CONN KeybaseDaemonRPC ebdc0ab8) Connection: error dialing transport: dial unix /root/.config/keybase/keybased.sock: connect: no such file or directory ▶ WARNING KeybaseDaemonRPC: connection error: "dial unix /root/.config/keybase/keybased.sock: connect: no such file or directory"; retrying in 2s ▶ WARNING Background keep alive hit an error: context deadline exceeded
You problably don't want to mount KBFS as root. Try to run kbfsfuse /keybase as a normal user.
If you're getting similar errors when mounting KBFS as a normal user then try running keybase fs ls /keybase first. This way the required keybased.sock file is created.
When I run kbfsfuse /keybase I get the following error messages:
▶ INFO KBFS version 1.0.2 ▶ WARNING adding NotifyService protocol ▶ INFO | net.Listen on unix:/home/beastie/.config/keybase/kbfsd.sock ▶ INFO OnConnect called with a new connection ▶ INFO authentication successful; ping interval: 30s ▶ INFO authentication successful; ping interval: 30s ▶ INFO MDServerRemote: auth token refreshed 2018/05/11 13:43:55 mount helper error: mount_fusefs: /dev/fuse on /keybase: Operation not permitted 2018/05/11 13:43:55 mount helper error: mount_fusefs: /dev/fuse on /keybase: Operation not permitted ▶ ERROR Mounting the filesystem failed: mount_fusefs: exit status 71
It looks like you forgot to enable normal users to mount FUSE volumes:
# sysctl vfs.usermount=1
When I run keybase fs ls /keybase I get the following error messages:
▶ ERROR Keybase services aren't running - KBFS client not found.
You've got to mount your KBFS volume with kbfsfuse.
Whenever I want to unmount KBFS and I hit Ctrl-C to kill kbfsfuse I get the following messgae
▶ ERROR Mount interrupter callback failed: %!(EXTRA *errors.errorString=Forced unmount is not supported on this platform yet)
You have got some files open which are stored on the KBFS volume. Close all the programs interacting with KBFS and the issue will be solved.
You may also think of contributing a patch or two to KBFS to add support for FreeBSD. ;)
This wiki page is mentioned in the README of the KBFS repository. Remember to ping Keybase developers if you are willing to rename this page.