ChiFS

Logo pending™

ChiFS Share Guide

This guide will help you install & configure the necessary software to publish files on the ChiFS network.

This guide assumes that you are on a Linux-based system. Windows and OS X should also work, but have not yet been tested.

Installation

You'll need to install the chifs-share command-line utility. There are no prebuilt binaries at the moment, so for now you'll need to build it from source.

Make sure you have the following prerequisites:

Now you're all set to download and install the latest version of ChiFS-Share from source:

cargo install --force --git https://code.blicky.net/chifs/chifs-share

Configuration

Create a chifs-share.conf:

# Optional information about your Share, you can remove these lines if you
# don't want to publish any information. Remember: This will be public!
Title This is my super cute share!
ContactInfo user@example.com

# Directory to share
Share / /home/user/shared-files

By default, metadata will be written to .chifs-share/ in your shared directory. If you prefer to have this written somewhere else, you can change that with the Metadata option:

Metadata /home/user/.chifs-share

These settings are enough to get you up and running, for more customization check out the manual for the complete list of settings.

Indexing and serving

Now it's time to let chifs-share index your files and to setup a web server to actually publish the files. The simplest option is to use the built-in web server. If you go this route, all you need to do is run:

chifs-share -c chifs-share.conf -vv server

This will index your files and start a web server on port 9080. Indexing can take a while, so sit back and relax. The server will automatically re-scan your shared directory every hour to pick up any changes in your shared files.

Different web server (optional)

If you prefer to use a different web server (e.g. thttpd, Apache, nginx or Lighttpd), you should instead run:

chifs-share -c chifs-share.conf -vv index

This will scan your shared directory, generate/update the metadata and then exit. You can run this command regularly as a cron job or manually every time something has changed in your shared directory. You should configure your web server to publish the shared directory (the Share setting in chifs-share.conf) at the root of web service. If you set a custom Metadata directory, make sure that this directory is still accessible at /.chifs-share/.

Creating the Onion service

Finally, install the Tor client. In most Linux distributions this is available as a package named tor. If you want to build from source, you should get the tor-$version.tar.gz tarballs from dist.torproject.org.

Add the following two lines to your torrc:

HiddenServiceDir /var/lib/tor/chifs-share
HiddenServicePort 80 127.0.0.1:9080

The HiddenServiceDir should point to a private directory that (only) Tor has write access to. The HiddenServicePort tells Tor to route all traffic destined for port 80 to your local web server.

After enabling Tor with that configuration, you can find the hostname of your Onion service at /var/lib/tor/chifs-share/hostname. Register that hostname with your favourite ChiFS Hub and you're all setup!

Stay safe!