Setting Up Yunohost on Debian 9
Yunohost Overview
Yunohost is an open-source solution designed for the administration of a personal server. It allows mange users, domains, websites and comes with a full email stack. The tool is designed to be lightweight and intuitive and is designed to work with Debian 9 (Stretch).
Requirements
- You have an account and are logged into console
- You have configured your SSH Key
- You have a compute instance running on Debian 9 (Stretch)
- You have a domain name pointed to your instance
Installing Yunohost
1 . Connect to the compute instance via SSH.
2 . Update the APT packet cache and the software already installed on the instance:
apt update && apt upgrade -y
3 . Create a non-root user which will be used for the installation of Yunohost:
adduser jamie
4 . Give root permission to the user by adding it to the sudoers file and switch into the users account:
usermod -aG sudo jamie && su jamie
5 . Enter into the /tmp directory. This is a temporary directory and files located within are deleted upon the next reboot. As there is no need to keep the Yunohost installation script, it can be downloaded into this folder.
cd /tmp
6 . Download the installation script. It will be saved in the file yunohost:
wget -O yunohost https://install.yunohost.org/
7 . The installation of Yunohost is automated. Run the script with sudo to launch the installation process. Once prompted enter the password of the non-root user to start the installation:
wget -O yunohost https://install.yunohost.org/
During the installation, a prompt will ask for permission to overwrite configuration files. Confirm this by selecting Yes. Yunohost might ask to reconfigure SSH, select Yes to disable the root login and to login with the administrator account created by the application.
The installation may take some time to download and install all required packages. Once it has completed the following message appears:
[ OK ] YunoHost installation completed !
8 . Run the post-installation script to set the administrator password and main domain name:
sudo yunohost tools postinstall
Once completed, can open a web browser and open the IP Address of the instance.
9 . A warning may appear in your browser, as the SSL certificate of Yunohost is self-signed:
Click on Advanced to proceed to the site, which will display the login prompt:
10 . To retrieve the DNS zone information which is required for the configuration of the domain name with Yunohost, click on Domain in the main menu:
11 . Click on the domain name, then on DNS Configuration to display an ideal DNS configuration of the domain name:
Important: Yunohost does not manage the DNS Zone. It is required to enter this information in the DNS interface of the domains registrar.
12 . Once DNS zone has been updated with the required information, request a Let’s Encrypt SSL certificate to encrypt the connection between a visitor and the server. Yunohost manages the certificate handling. Request it by clicking on SSL Certificate in the Overview of the domain, then on Install a Let’s Encrypt Certificate:
Yunohost will request the certificate now, this may take a few minutes. Once the certificate has been issued, it will be visible in the configuration interface:
Creating a User
To use the server, it is recommended to create a user. It will have an e-mail address [email protected] and can be used to configure additional applications.
1 . Go to the admin interface of Yunohost and click on Users > New User. Fill in the required information for the new user:
Installing an Application
Yunohost comes with a bunch of pre-packaged Applications that can easily be installed on the server with two simple clicks from the management interface. A full list of all available applications is available here.
Install a webmail application to write and read emails of the previously created user directly in a web browser:
1 . Go to the admin Interface of Yunohost and click on Applications to land on the applications list:
2 . Scroll down to Roundcube and click on Install to install a Webmail client. Fill in the required details for the application and click on Install to launch the installation of the tool:
3 . Once installed go to yourdomain.tld/webmail to connect to the Webmail interface to read and write mails:
The basic installation of Yunohost is done now, it is possible to install other Applications like a WordPress Blog, a Torrent application and much more to have a personal server.