Zero Install

the antidote to app-stores


0share provides for local peer-to-peer distribution of Zero Install implementations (versions of programs). This means that once one machine on your local network has downloaded something, other machines can get it directly from the first one.

Name 0share
Maintainer Thomas Leonard
License GNU General Public License
Run it Zero Install feed
SCM GIT repository
This program is an experimental proof-of-concept. It currently requires a modified version of 0install, which can be found in the peer2peer branch. This branch is now very out-of-date. If you'd like to take over this project, please get in touch!



To try it out, run this command on one machine:

machine1 $ 0launch
INFO:root:0share started and listening for requests...
INFO:root:Serving implementations from Store '/home/me/.cache/'
INFO:root:Serving implementations from Store '/var/cache/'

On another machine on the same network, run this command, replacing DIGEST with the digest of a program installed on the first machine (e.g. the name of a subdirectory of /var/cache/ The digest will be in the program's feed file.

machine2 $ 0launch -f DIGEST

The second machine will broadcast a request (to UDP port 38339) to see if anyone has the given implementation. The first machine should respond. The second machine will then fetch it from the first:

machine2 $ ./0share -f sha1new=84e37424bbb87a077e25cec87d3c668f12726817
INFO:root:Broadcasting query for ['sha1new=84e37424bbb87a077e25cec87d3c668f12726817'] on local network... has sha1new=84e37424bbb87a077e25cec87d3c668f12726817
INFO:root:Connecting to to request sha1new=84e37424bbb87a077e25cec87d3c668f12726817
INFO:root:Caching new implementation (digest sha1new=84e37424bbb87a077e25cec87d3c668f12726817)

The requested version should now be in machine2's cache. On the source machine, you should see something like:

INFO:root:Request from ('', 53182): '0share\nsha1new=84e37424bbb87a077e25cec87d3c668f12726817'
INFO:root:Yes, we have sha1new=84e37424bbb87a077e25cec87d3c668f12726817
INFO:root:Sending reply...
INFO:root:GET /implementation/sha1new=84e37424bbb87a077e25cec87d3c668f12726817
machine2 - - [13/Dec/2008 21:52:49] "GET /implementation/sha1new=84e37424bbb87a077e25cec87d3c668f12726817 HTTP/1.1" 200 -


If it doesn't work:

  • Check that your firewall allows TCP and UDP connections to port 38339 on the first machine.
  • Try using -H on the second machine to give the hostname of the first machine explicitly.
  • If you get "Network is unreachable", you may be missing a default route (see "ip route").

Realistic configuration

Before you start, you should enable sharing on all machines. This ensures that implementations all go in the single machine-wide shared cache (/var/cache/

You'll probably want to run 0share without write access anywhere (for security), so create a new user for that and try running it:

$ sudo adduser --system zeroshare
$ sudo su zeroshare -s /usr/bin/env -- 0launch -vc

You can then add a line to your crontab file to make it start on boot:

@reboot zeroshare 0launch -vc 2>&1 >/dev/null

Using with 0launch

As this is experimental, you'll need to use the peer2peer branch of 0install. In that branch, P2P support is turned on when using the GUI for downloads.