Updated How to: Hosting a Friendica site at home (markdown)

MartinFarrent 2012-04-26 15:04:10 -07:00
parent 0f50e60de6
commit 0191ff4d99

@ -1,15 +1,39 @@
You can host a fully federated Friendica site at home using Dyndns or a similar dynamic DNS service service - either on a physical computer of its own or in a Virtual Box.
You can host a fully federated Friendica site at home using DynDns or a similar dynamic DNS service service - either on a physical computer of its own or in a Virtual Box.
We have a ready-made and very easily configured Virtual Box image for this purpose. It makes 'home Friendica' a viable option for a great many people - not just 'geeks'.
The basic steps are as follows (we will be providing a more detailed guided very shortly):
1) Get yourself a Dyndns or similar account and install the respective IP updater on your machine (that is the host computer). This ensures that other sites can find your server, even though it is probably running on a dynamic IP.
1) Get yourself a DynDns or similar account and install the respective IP updater on your machine (that is the host computer). This ensures that other sites can find your server, even though it is probably running on a dynamic IP. You will get a subdomain from the dynamic DNS service you choose: e.g. ``yourname.dyndns.org``
2) Download this image: [[http://downloads.friendica.eu/Friendica.zip]]
2) Install Virtual Box on your machine: [[https://www.virtualbox.org/]]
2) Install a Linux operating system like Debian on the computer or in the Virtual Box. Then configure your router to send incoming http/https traffic to the respective real or virtual computer.
3) Download and unzip this image: [[http://downloads.friendica.eu/Friendica.zip]] Make a copy of it in case something goes wrong and you want to start over again.
3) Make sure you can send mail from your designated Friendica server, even though it is probably running on a dynamic IP. This document explains how: [http://www.howtoforge.com/how-to-relay-email-on-a-postfix-server](http://www.howtoforge.com/how-to-relay-email-on-a-postfix-server). Mail is very important, not only for notifications - your initial admin/user password is mailed to you, and you will be locked out of your own system if you can't read it.
4) In Virtual Box, set up a new virtual machine for a Linux/Debian system, specifying the downloaded disk as your hard disk. 256 MB of RAM should suffice. The network mode should be set to "bridged".
4) Install Friendica as described here: [https://github.com/friendica/friendica/blob/master/INSTALL.txt ](https://github.com/friendica/friendica/blob/master/INSTALL.txt). Important: When you reach the browser-based stage of installation, point your browser at your public address (e.g. ``you.dyndns.org``), not at the server's internal IP.
5) Start the new machine and log on as "root" (password: "friendica").
6) Enter the command ``ifconfig`` to discover the virtual machine's internal IP.
7) Configure your router to pass http and https traffic to that IP. This means forwarding traffic on ports 80 and 443 to it. Consult your router documentation on how to do this.
8) At the command prompt, type ``bash setup-friendica.sh all``
9) You will prompted to change the keyboard configuration for your region and language, if you so wish.
10) You will be prompted to enter your (normal) email address, your domain (which should be your DynDns subdomain) and a legitimate SMTP account to relay mail from. The latter can be taken from the SMTP settings in any standard mail client you use - also use the port specified there. Your user name for this account will usually be your mail address (but just use the settings that work for the mail client) and your password is your standard mail password.
11) Press ``crtl-x`` and then ``y`` to save these settings.
12) The process continues and asks you to select locales (or all) and whether you want to change the root password. Change the password and remember it. If you don't know what locales are, select ``all`` .
13) You are also asked for the admin mail address your Friendica site will use. Enter your normal email address.
14) When installation is complete, point a browser at your DynDns address and register an account on your new Friendica site using the admin email address you specified in #13.
_Note: Now that you have configured your router to forward port 80 (optionally also 443 for https) to the virtual machine, you will need to make sure that the machine's IP doesn't change too often. The easiest way of achieving this is to check the router's DHCP settings and to set leases for the longest time period the router allows - e.g. three weeks. But that still means that your Friendica server may become unreachable after that time period, especially if you reboot it. To solve that problem. just run ifconfig again and reconfigure the router to reflect the new IP._
_Of course, if you are a GNU/Linux expert, you will know how to configure your virtual machine to use a static IP and solve the problem permanently._
12) Wait for the registration mail, log on, change the password and activate the cron plugins (or configure cron on the command line).