Freedombone
Installation
Building an image for a Single Board Computer or Virtual Machine
You don't have to trust images downloaded from random internet locations signed with untrusted keys. You can build one from scratch yourself, and this is the recommended procedure for maximum security. For guidance on how to build images see the manpage for the freedombone-image command.
Install the freedombone commands onto your laptop/desktop:
sudo apt-get install git build-essential dialog git clone https://code.freedombone.net/bashrc/freedombone cd freedombone git checkout stretch sudo make install
Then install packages needed for building images:
freedombone-image --setup debian
or on an Arch/Parabola system:
freedombone-image --setup parabola
A typical use case to build an 8GB image for a Beaglebone Black is as follows. You can change the size depending upon the capacity of your microSD card.
freedombone-image -t beagleboneblack -s 8G
If you prefer an advanced installation with all of the options available then use:
freedombone-image -t beagleboneblack -s 8G --minimal no
To build a 64bit Qemu image:
freedombone-image -t qemu-x86_64 -s 8G
Other supported boards are cubieboard2, cubietruck, olinuxino-lime, olinuxino-lime2 and olinuxino-micro.
If the image build fails with an error such as "Error reading from server. Remote end closed connection" then you can specify a debian package mirror repository manually with:
freedombone-image -t beagleboneblack -s 8G -m http://ftp.de.debian.org/debian
Checklist
Before installing Freedombone you will need a few things.
- Have some domains, or subdomains, registered with a dynamic DNS service. For the full install you may need two "official" purchased domains or be using a subdomain provider which is supported by Let's Encrypt.
- System with a new installation of Debian Stretch or a downloaded/prepared disk image
- Ethernet connection between the system and your internet router
- That it is possible to forward ports from the internet router to the system, typically via firewall settings
- Have ssh access to the system, typically via fbone@freedombone.local on port 2222
Installation
There are three install options: Laptop/Desktop/Netbook, SBC and Virtual Machine.
On a Laptop, Netbook or Desktop machine
If you have an existing system, such as an old laptop or netbook which you can leave running as a server, then install a new version of Debian Stretch onto it. During the Debian install you won't need the print server or the desktop environment, and unchecking those will reduce the attack surface. Once Debian enter the following commands:
su apt-get update apt-get -y install git dialog build-essential git clone https://code.freedombone.net/bashrc/freedombone cd freedombone git checkout stretch make install freedombone menuconfig
On a single board computer (SBC)
Currently the following boards are supported:
- Beaglebone Black
- Cubieboard 2
- Cubietruck (Cubieboard 3)
- PCDuino3
- olinuxino Lime
- olinuxino Lime2
- olinuxino Micro
If there is no existing image available then you can build one from scratch. See the section above on how to do that. If an existing image is available then you can download it and check the signature with:
gpg --verify filename.img.asc
And the hash with:
sha256sum filename.img
If the image is compressed then decompress it with:
unxz filename.img.xz
Then copy it to a microSD card. Depending on your system you may need an adaptor to be able to do that.
sudo dd bs=32M if=filename.img of=/dev/sdX conv=fdatasync,sync,noerror
Where sdX is the microSD drive. You can check which drive is the microSD drive using:
ls /dev/sd*
With the drive removed and inserted. Copying to the microSD will take a while, so go and do something less boring instead. When it's complete remove it from your system and insert it into the SBC. Connect an ethernet cable between the SBC and your internet router, then connect the power cable. On the Beaglebone Black you will see some flashing LEDs, but on other SBCs there may not be any visual indication that anything is booting.
With the board connected and running you can ssh into the system with:
ssh fbone@freedombone.local -p 2222
Using the password 'freedombone'. Take a note of the new login password and then you can proceed through the rest of the installation.
As a Virtual Machine
Qemu is currently supported, since it's s fully free software system. You can run a 64 bit Qemu image with:
qemu-system-x86_64 -m 1G filename.img
The default login will be username 'fbone' and password 'freedombone'. Take a note of the new login password and then you can proceed through the rest of the installation.
Final Setup
Any manual post-installation setup instructions or passwords can be found in /home/username/README.
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 |
Git | 9418 |
25 | |
587 | |
465 | |
993 | |
VoIP | 64738 |
VoIP | 5060 |
Tox | 33445 |
Syncthing | 22000 |
On Client Machines
You can configure laptops or desktop machines which connect to the Freedombone server in the following way. This alters encryption settings to improve overall security.
sudo apt-get update sudo apt-get install git dialog haveged build-essential git clone https://code.freedombone.net/bashrc/freedombone cd freedombone git checkout stretch sudo make install freedombone-client
Administering the system
To administer the system after installation log in via ssh, become the root user and then launch the control panel.
ssh myusername@freedombone.local -p 2222
Select Administrator controls then from there you will be able to perform various tasks, such as backups, adding and removing users and so on. You can also do this via commands, which are typically installed as /usr/local/bin/freedombone* and the corresponding manpages.