freedombone(1)

NAME
freedombone - A home server configuration

SYNOPSIS
    freedombone -c [configuration file]
    -h --help Show help
       menuconfig Easy interactive installation
    -c --config Installing from a configuration file
       --bbb Installing on Beaglebone Black
    -u --user User to install the system as
    -d --domain Default domain name
    -s --system System type
       --ip Static LAN IP address of the system
       --iprouter LAN IP address of the internet router
       --ddns Dynamic DNS provider domain
       --ddnsuser Dynamic DNS provider username
       --ddnspass Dynamic DNS provider password
       --microblogdomain Microblog domain name
       --wikidomain Wiki domain name
       --blogdomain Blog domain name
       --ownclouddomain Owncloud domain name
       --redmatrixdomain Redmatrix domain name
       --gitdomain Git hosting domain name
    -t --time Domain used as a TLS time source
       --ssh ssh port number
       --list Public mailing list name
       --cores Number of CPU cores
       --name Your name
       --email Your email address
       --usb Path for the USB drive (eg. /dev/sdb1)
       --cjdns Enable CJDNS
       --vpass VoIP server password
       --vport VoIP server port
       --ns1 First DNS nameserver
       --ns2 Second DNS nameserver
       --repo Debian repository

DESCRIPTION
The freedombone command provides the ability to install a complete pre-configured home server system onto any machine with a fresh installation of Debian Jessie. It was originally created for use on the Beaglebone Black SBC, but isn't limited to that particular hardware. There are a few possible variants.
  * Full install: Installs eveything
  * Mailbox: An email server with GPG encryption and mailing list
  * Cloud: Share files, maintain a calendar and collaborate on document editing
  * Social: Social networking with Red Matrix and GNU Social
  * Media: Runs media services such as DLNA to play music or videos on your devices
  * Writer: Host your blog and wiki
  * Chat: Encrypted IRC, XMPP and VoIP services for one-to-one and many-to-many chat
  * Developer: Host your own git projects with a Github-like user interface
  * Nonmailbox: Installs eveything except for the email server Freedombone has more emphasis on security and privacy, and when installed on a Beaglebone Black it uses the built-in hardware random number generator as an entropy source. All communications with the box are encrypted by default using the recommendations from https://bettercrypto.org. The firewall is configured to only allow communications on the necessary ports and to drop all other packets, icmp is disabled by default, emails are stored in encrypted form using your public key and time synchronisation occurs via TLS only. Backups are also encrypted, and can be local or remote. A server system installed via the freedombone command entirely consists of free software. Non-free repositories are removed automatically upon installation. So there is no inscrutible code waiting to become a security problem.

INSTALLATION
If you have the debian package then you can just:
    dpkg -i freedombone_x.xx.deb Or alternatively you can download the latest code and install it.
    sudo apt-get update
    apt-get install git dialog build-essential
    git clone https://github.com/bashrc/freedombone
    cd freedombone
    make install

AUDIT
Since this is a server system which will be connected to the internet - and therefore subjected to all of the potential hazards which that entails - it's important to be able to check what the system does and that it doesn't contain any antifeatures or "implants". The freedombone command isn't actually a binary. It's just a bash script. So by loading /usr/bin/freedombone into a text editor you can check what gets installed and in what sequence and whether you think the encryption settings or the firewall or the configuration is as good as it could be. There is no secret source.

PREPARATION FOR BEAGLEBONE BLACK
If you're not installing onto a Beaglebone Black then you can skip this section. Otherwise see the manpage for freedombone-prep which gives details of how to prepare a microSD card.

CHECKLIST
Before running the freedombone command you will need a few things.
  * Have some domains, or subdomains, registered with a dynamic DNS service
  * System with a new installation of Debian Jessie
  * Ethernet connection to an internet router
  * It is possible to forward ports from the internet router to the system
  * If you want to set up a social network or microblog then you will need SSL certificates corresponding to those domains
  * Have ssh access to the system

GPG KEYS
If you have existing GPG keys then copy the .gnupg directory onto the system.
    scp -r ~/.gnupg username@freedombone_IP_address:/home/username

INTERACTIVE SETUP
The interactive server configuration setup is recommended for most users. On the system where freedombone is to be installed create a configuration file.
    ssh myusername@freedombone_IP_address
    su
    sudo apt-get update
    apt-get install git dialog build-essential
    git clone https://github.com/bashrc/freedombone
    cd freedombone
    make install Now the easiest way to install the system is via the interactive setup.
    freedombone menuconfig You can select which variant you wish to install and then enter the details as requested.

PARTIALLY INTERACTIVE SETUP
It's also possible to install in two stages. First you can interactively create a configuration file and then install using it.
    ssh myusername@freedombone_IP_address
    su
    sudo apt-get update
    apt-get install git dialog build-essential
    git clone https://github.com/bashrc/freedombone
    cd freedombone
    make install Now create the configuration file. By default it will be called freedombone.cfg and be saved to the same directory that you are currently in. You might want to save the generated file elsewhere for possible future reinstallations.
    freedombone-config Now you can use the generated file to install the system.
    freedombone -c freedombone.cfg

NON-INTERACTIVE SETUP
If you don't want to install interactively then it's possible to manually create a configuration file as follows: On the system where freedombone is to be installed create a configuration file.
    ssh myusername@freedombone_IP_address
    su
    sudo apt-get update
    apt-get install git build-essential
    git clone https://github.com/bashrc/freedombone
    cd freedombone
    make install
    nano /home/myusername/freedombone/freedombone.cfg Add the following, and set the values as needed. DEFAULT_DOMAIN_NAME is where your email/xmpp/irc/voip will be accessed from. It could be the same as one of your other domains, or separate.
    MY_USERNAME=myusername
    DEFAULT_DOMAIN_NAME=mywikidomain
    SYSTEM_TYPE=full
    INSTALLING_ON_BBB=no
    DDNS_PROVIDER=default@freedns.afraid.org
    DDNS_USERNAME=ddnsusername
    DDNS_PASSWORD=ddnspassword3471326
    MY_NAME=MyFullNameOrNick
    MY_EMAIL_ADDRESS=myusername@mywikidomain
    LOCAL_NETWORK_STATIC_IP_ADDRESS=192.168.1.60
    ROUTER_IP_ADDRESS=192.168.1.254
    ENABLE_CJDNS=no
    DEBIAN_REPO=ftp.us.debian.org
    NAMESERVER1=85.214.73.63
    NAMESERVER2=213.73.91.35
    WIKI_TITLE=my wiki title
    WIKI_DOMAIN_NAME=mywikidomain
    MY_BLOG_TITLE=my blog
    FULLBLOG_DOMAIN_NAME=myblogdomain
    MICROBLOG_DOMAIN_NAME=mymicroblogdomain
    REDMATRIX_DOMAIN_NAME=myredmatrixdomain
    OWNCLOUD_DOMAIN_NAME=myownclouddomain Both of the IP addresses are local IP addresses, typically of the form 192.168.x.x, with one being for the system and the other being for the internet router. Save the configuration file and exit from your editor. Now you can begin the installation. If you are doing this on a Beaglebone Black:
    freedombone -c freedombone.cfg The above command should be run in the same directory in which your configuration file exists.

POST-SETUP
Setup of the server and installation of all the relevant packages is not quick, and depends upon which variant you choose and your internet bandwidth. Allow about three hours for a full installation on the Beaglebone Black. On the Beaglebone installation is in two parts, since a reboot is needed to enable the hardware random number generator and zram. When done you can ssh into the system with:
    ssh myusername@domain -p 2222 Any manual post-installation setup instructions or passwords can be found in /home/username/README. You should remove any passwords from that file and store them within a password manager such as KeepassX. On your internet router, typically under firewall settings, open the following ports and forward them to your server.
    | Service | Ports |
    |---------+------------|
    | HTTP | 80 |
    | HTTPS | 443 |
    | SSH | 2222 |
    | DLNA | 1900 |
    | DLNA | 8200 |
    | XMPP | 5222..5223 |
    | XMPP | 5269 |
    | XMPP | 5280..5281 |
    | IRC | 6697 |
    | IRC | 9999 |
    | Git | 9418 |
    | Email | 25 |
    | Email | 587 |
    | Email | 465 |
    | Email | 993 |
    | VoIP | 64738 |

PASSWORDS
Passwords for server applications are randomly generated and can be found within /home/username/README after the system has fully installed. You should move those passwords into a password manager, such as KeepassX.

ADMINISTERING YOUR EMAIL
You can administer email in the traditional manner by editing folders or procmail rules, but for convenience some commands are available to make that process simpler. See the relevant manpages for more details.
   freedombone-addlist - adds a mailing list
   freedombone-rmlist - removes a mailing list
   freedombone-addemail - transfers emails from an address to a given folder
   freedombone-rmemail - removes an email transferal rule
   freedombone-ignore - ignores email from an address or with a subject line containing text
   freedombone-unignore - removes an ignore rule Spamassassin is also available and within Mutt you can use the S (shift+s) key to mark an email as spam or the H (shift+h) key to mark an email as not being spam. So by using a combination of email rules and spam filtering you should be able to avoid any spammers or trolls.

ADMINISTERING XMPP USERS
You can use the following commands to add, remove and change the password for XMPP users on the system. See the relevant manpages for more details.
    freedombone-addxmpp - adds a new XMPP user
    freedombone-rmxmpp - removes an XMPP user
    freedombone-xmpp-pass - changes the password for an xmpp user

MEDIA SERVICE
If you installed the full or media version then to can plug in a USB drive and use the commands:
    attach-music
    remove-music To initiate or halt the DLNA service. You will need to be logged in as the root user. The USB drive sould contain a directory called Music which contains your music. Using a DLNA client running on any mobile device on your local network you will then be able to stream music from the Freedombone system. Note that DLNA has no password protection, so you should ensure that any media on the USB drive is suitable for anyone who uses your network. The DLNA service only exists on your local network, and isn't accessible from the wider internet.

BACKUPS
To backup the system plug in a USB drive, log into the Freedombone system as the root user, then type:
    backup You can restore from backup by typing:
    restore

BUGS
Report bugs at https://github.com/bashrc/freedombone/issues

SEE ALSO
freedombone-addcert(1), freedombone-clientcert(1), freedombone-addemail(1), freedombone-addlist(1), freedombone-addxmpp(1), freedombone-client(1), freedombone-ignore(1), freedombone-config(1), freedombone-prep(1), freedombone-remote(1), freedombone-renew-cert(1), freedombone-rmemail(1), freedombone-rmlist(1), freedombone-rmxmpp(1), freedombone-sec(1), freedombone-unignore(1), freedombone-xmpp-pass(1)

AUTHOR
Bob Mottram <bob@robotics.uk.to>
PGP/GPG: EA982E38
Bitmessage: BM-2cWuhmBvVdfrHhLoZTdspCkKeiTorUesSL
Web: http://robotics.uk.to