This document illustrates how to use Upspin and the
upspin command to do some
common Upspin tasks.
It is assumed that the user has fully signed up as
described in Signing up a new user and has set up
upspinserver as a combined dirserver/storeserver for
Substitute your own user and domain names in the examples that follow.
Allowing a family member to share your Upspin installation
When you followed the server setup instructions,
upspin setupserver created an initial version of the access controls
files for your Upspin installation that allows access for
the server user
The easiest way to modify the access control file is to use the
setupwriters command. The arguments list the users (or wildcards) to be
The server user
email@example.com is always included automatically.
$ upspin setupwriters -domain=example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org
# ... or with wildcards
$ upspin setupwriters -domain=example.com email@example.com *@example.com
Every time you call
upspin setupwriters the access control files would be
written from scratch.
So the following two commands would result in
firstname.lastname@example.org not being in
$ upspin setupwriters -domain=example.com email@example.com firstname.lastname@example.org
$ upspin setupwriters -domain=example.com email@example.com firstname.lastname@example.org
It is easy to edit the
Writers file locally on your machine.
upspin get to store its contents to your local machine, edit to your
upspin put it back on the server.
For this to work, explicitly make
upspin use the server user config with the
-config flag, pointing it to the config file for the server’s user
upspin -config=$HOME/upspin/deploy/example.com/config get email@example.com/Group/Writers > Writers
# Modify Writers with your text editor of choice
upspin -config=$HOME/upspin/deploy/example.com/config put firstname.lastname@example.org/Group/Writers < Writers
Using your Upspin configuration and keys on another machine
To use your Upspin user configuration and keys on a different machine, you need
to transfer two things to that machine:
- The file
$HOME/upspin/config which contains the user configuration.
- The public/private key pair for the user, which is located in
~/.ssh/*.upspinkey to the second device into the same
$HOME and make sure that they have the same restrictive
permissions as on the source machine.
One way to do that is to use the following commands on the destination machine,
assuming it is a Unix machine:
$ test -d ~/upspin || (mkdir ~/upspin && chmod 0700 ~/upspin)
$ scp -p sourcemachine:upspin/config ~/upspin
$ test -d .ssh || (mkdir ~/.ssh && chmod 0700 ~/.ssh)
$ scp -p sourcemachine:.ssh/*.upspinkey ~/.ssh