Keybase

Initialize Keybase Tool and Filesystem

NixOS

See NixOS options and packages.

services.keybase.enable = true;
services.kbfs.enable = true;

Desktop

systemctl --user start keybase
keybase login ${KB_USER_NAME}
systemctl --user start kbfs
keybase status
# disable journaling so that a sync or close of a file does ensure the data has made it to KBFS servers and will soon be visible to other devices
echo 1 > ~/keybase/.kbfs_disable_auto_journals
cat ~/keybase/private/${KB_USER_NAME}/.kbfs_status

Android Phone

See Google Play.

Team Storage with git-annex

Initializing Keybase Repository and Remote

# initialize a git-annex storage
cd ${STORAGE_DIRECTORY}
git init
git annex init
git annex add .
# add keybase special remote
keybase team create ${KB_TEAM_NAME}
git annex initremote keybase-team-${KB_TEAM_NAME} type=directory directory=~/keybase/team/${KB_TEAM_NAME} encryption=none
# disable journaling (see above; this is necessary for each local instance of the remote as it can be enabled by default)
echo 1 > ~/keybase/team/${KB_TEAM_NAME}/.kbfs_disable_journal
# add keybase git repository
keybase git create --team ${KB_TEAM_NAME} ${KB_TEAM_REPO_NAME}
git remote add origin keybase://team/${KB_TEAM_NAME}/${KB_TEAM_REPO_NAME}
# sync the content
git annex sync --content
# check quota
cat ~/keybase/team/${KB_TEAM_NAME}/.kbfs_status

Importing Keybase Remote and Direct SSH Access

# clone the git-annex storage
git clone keybase://team/${KB_TEAM_NAME}/${KB_TEAM_REPO_NAME} ${STORAGE_DIRECTORY}
cd ${STORAGE_DIRECTORY}
# enable keybase special remote
git annex enableremote keybase-team-${KB_TEAM_NAME} directory=~/keybase/team/${KB_TEAM_NAME} encryption=none
# disable journaling (see above; this is necessary for each local instance of the remote as it can be enabled by default)
echo 1 > ~/keybase/team/${KB_TEAM_NAME}/.kbfs_disable_journal
# enable also direct ssh access to bypass Keybase if possible (when ${OTHER_HOSTNAME} is available)
git remote add ${OTHER_HOSTNAME%%.*}_${STORAGE_DIRECTORY//\//-} ssh://${USER}@${OTHER_HOSTNAME}:${OTHER_PORT:-22}/${STORAGE_DIRECTORY}

SSH Rsync Backup Remote

git annex initremote ${OTHER_HOSTNAME%%.*}_${STORAGE_DIRECTORY//\//-} type=rsync rsyncurl=${USER}@${OTHER_HOSTNAME}:${OTHER_PORT:-}/${STORAGE_DIRECTORY} keyid=${USER_EMAIL} encryption=hybrid

 Share!

 
comments powered by Disqus