Taller de servidors i autoallotjament utilitzant Yunohost

From FouWiki
Jump to navigation Jump to search

Apropament a la distribució de linux que ens permet instal·lar un servidor sense grans complicacions i allotjar els nostres propis serveis i aplicacions web.

Documentació del Taller

Why is it necessary to consider self hosting the web services we use everyday ?

Because there is a concentration of our uses of internet : GAFAM, surveillance, data capitalism, ...

You can consult a:

The user interface will look like that : https://yunohost.org/images/home_panel.jpg : each square correspond to a web application The admin interface look like that : https://yunohost.org/images/manage_en.png https://yunohost.org/#/admin

How is it possible to self host services when we are not a system administrator / king of computer and terminal command line ?

Let's follow Yunohost initiative ! Yunohost allow you to install in a easy way nice and ethic web services (e-mail, PADs, cloud, file sharing, ...) on an old computer, a server, a Raspberry Pi (cheap and small computer), or in a virtual machine. It also offer an admin interface with which you can easily create users, add applications, update the system and the web applications, check the status of the system and the services, create and restore backups, ...

Pratical approach


We'll see how to install a Yunohost instance on a debian 8 (jessie) machine. At this moment (end of march 2018), Yunohost is not ready yet for Debian 9 We start on a fresh Debian 8 light installation (or with a graphic interface, as you wish) following https://yunohost.org/#/install_manually So open a terminal and install a few components :

Install git

sudo apt-get update ; sudo apt-get install ca-certificates dialog git

Clone the Yunohost install script repository

git clone https://github.com/YunoHost/install_script /tmp/install_script

The root user must have a password set, if it isn't the case, set it (otherwise, the install script fails):

sudo passwd root

Execute the installation script

cd /tmp/install_script && sudo ./install_yunohost

Post installation process

Once everything is installed, you can go to the post installation process : https://yunohost.org/#/postinstall https://yunohost.org/images/postinstall_cli.png The post installation process can be done threw your web browser opening the url with the local ip of your server (like https://yunohost.org/images/postinstall_web.png At first, Yunohost provide a self signed certificate, so you have to create an exception and accept this self signed certificate

You can also launch the post installation process in command line with :

yunohost tools postinstall

Then, you have to answer 2 questions :

  • What will be the domain name of your server
    • you already have a domain name and you can create a sub domain that will be routed to your public IP
    • you don't have a domain, Yunohost project propose you to provide a DNS like : thedomainnameichoose.nohost.me (change thedomainnameichoose by what you want), of course this sub domain must be available, if not, the process will tell it.
  • Give an administrator password

Then you have to configure your Internet router (at home, at the office) https://yunohost.org/#/isp_box_config

You can use a workaround to make your computer think that your domain correspond to your local IP (it allows you to test your installation, create users, install applications) modifying the /etc/Hosts file, adding for exemple a line like this (see also https://yunohost.org/#/dns_local_network) : thedomainnameichoose.nohost.me

Some additionnal configuration

If you install a yunohost server during a workshop, when you go back home / at your office, you have to inform the dyndns nohost.me that your public IP has changed, you can do this with the command :

yunohost dyndns update

You can find the documentation of this nice CLI yunohost tool here https://yunohost.org/#/moulinette

Documentation for administration : https://yunohost.org/#/admindoc Documentation for user : https://yunohost.org/#/userdoc If you want to contribute : https://yunohost.org/#/contributordo

Documentació addicional

Documentation in french : https://wiki.labomedia.org/index.php/LaboM_Yunohost_sur_raspberrypi

Altre informació a tenir en compte

Well ... to administrate a server with Yunohost is easy ... till there is a problem, but at least it is a good way to learn step by step how services and servers works, starting really quickly with nice results (install a nexcloud, PADs in less than an hour) There is a nice community around Yunohost project and a forum, so if you have a problem, it can be a good place to look at and to ask https://forum.yunohost.org/

Other projects of this kind :

Contacte tallerista o col·lectiu

b@labomedia.org (but if you have questions / problems with an installation of Yunohost, it may be better to make a post on https://forum.yunohost.org/ where there are more people that can answer and more people that can benefit from the answer, + drop me a mail in parallele