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.
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:
- Rust. Not all Linux distributions have a recent enough version in their repositories, so the safest way to install Rust right now is to follow the instructions for installing rustup.
- Git. I'm willing to bet that this is available in your Distribution's package manager.
- A C compiler and supporting tools. If you're on Debian or Ubuntu,
apt-get install build-essentialwill do the trick. For Arch Linux
pacman -S base-develwill suffice.
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
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 email@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
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
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
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!
- First of all, and most obviously: Don't share anything that might get you into trouble!
- Remember that everything in your shared directory is public. If you wish to remain anonymous, don't publish files that might identify you!
- ChiFS-Share will, by design, expose the last modification timestamps of all published files. This may leak information about the times when you are active or the date and time that you obtained the files, which in turn may be correlated with other activities. It may help to randomize the modification timestamps if this is an issue.
- Read the general security tips on running Onion services.
- Always remember that no software is perfect. This program, your chosen web server, Tor and any other used software may contain bugs.