<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Hux Blog</title><link href="https://casse.freeboxos.fr/" rel="alternate"></link><link href="https://casse.freeboxos.fr/feeds/all.atom.xml" rel="self"></link><id>https://casse.freeboxos.fr/</id><updated>2026-02-16T07:13:00+01:00</updated><entry><title>Protecting the Server</title><link href="https://casse.freeboxos.fr/protecting-the-server.html" rel="alternate"></link><published>2026-02-16T07:13:00+01:00</published><updated>2026-02-16T07:13:00+01:00</updated><author><name>Hux</name></author><id>tag:casse.freeboxos.fr,2026-02-16:/protecting-the-server.html</id><summary type="html">&lt;p&gt;The server we are setting up needs to be protected. My goal
is to open as little as ports as possible. Specially, I would prefer that most services use &lt;code&gt;http&lt;/code&gt; i.e. port 80 and
to be secure &lt;code&gt;https&lt;/code&gt; (port 443).&lt;/p&gt;
&lt;p&gt;To achieve this goal, we need a certificate proving …&lt;/p&gt;</summary><content type="html">&lt;p&gt;The server we are setting up needs to be protected. My goal
is to open as little as ports as possible. Specially, I would prefer that most services use &lt;code&gt;http&lt;/code&gt; i.e. port 80 and
to be secure &lt;code&gt;https&lt;/code&gt; (port 443).&lt;/p&gt;
&lt;p&gt;To achieve this goal, we need a certificate proving that
our server is what it prenteds to be. This make be a big
mess with certifying authorities but fortunately, there
&lt;a href="https://letsencrypt.org/"&gt;letsencrypt&lt;/a&gt; that provides 3-month long certificates but there are bots to renew them.&lt;/p&gt;
&lt;h1&gt;Requirement&lt;/h1&gt;
&lt;p&gt;Doing this require (1) a domain name, celled thereafter &lt;em&gt;$DOMAIN&lt;/em&gt; and (2) to open port 80 of your box. With FreeBox,
we need to pass in full-stack mode (from the customer configuration page).&lt;/p&gt;
&lt;p&gt;The configuration of the port retargetting:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Destination IP: 192.$SERVER&lt;/li&gt;
&lt;li&gt;Source IP: all&lt;/li&gt;
&lt;li&gt;Protocol: TCP&lt;/li&gt;
&lt;li&gt;Port range: 80-80&lt;/li&gt;
&lt;li&gt;Port destination: 80&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Setting up the certificate&lt;/h1&gt;
&lt;p&gt;First, we install the bot:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;certbot&lt;span class="w"&gt; &lt;/span&gt;python3-certbot-apache
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And we can run it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;certbot&lt;span class="w"&gt; &lt;/span&gt;--apache&lt;span class="w"&gt; &lt;/span&gt;-d&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$DOMAIN&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It will install itself in the Apache 2 configuration files&lt;/p&gt;
&lt;h2&gt;Redirecting port 443&lt;/h2&gt;
&lt;p&gt;In orerto access your web pages at address: &lt;code&gt;http://$DOMAIN&lt;/code&gt;, you have to redirect port 443 in your preferred box:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Destination IP: 192.$SERVER&lt;/li&gt;
&lt;li&gt;Source IP: all&lt;/li&gt;
&lt;li&gt;Protocol: TCP&lt;/li&gt;
&lt;li&gt;Port range: 443-443&lt;/li&gt;
&lt;li&gt;Port destination: 443&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Final Words&lt;/h1&gt;
&lt;p&gt;It is important that all this software is free (from freedom) but not free (for price). Peoples are implementing it and maintaining convenient websites as &lt;a href="https://letsencrypt.org/"&gt;letsencrypt&lt;/a&gt;. From time to time, it could helpfull to donate to organization supporting them. In this case,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://letsencrypt.org/donate"&gt;letsencrypt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://eff.org/donate-le"&gt;EFF&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><category term="EHome"></category><category term="letsencrypt"></category><category term="https"></category></entry><entry><title>RaspberryPi storage</title><link href="https://casse.freeboxos.fr/raspberrypi-storage.html" rel="alternate"></link><published>2026-02-12T21:59:00+01:00</published><updated>2026-02-12T21:59:00+01:00</updated><author><name>Hux</name></author><id>tag:casse.freeboxos.fr,2026-02-12:/raspberrypi-storage.html</id><summary type="html">&lt;p&gt;My Raspberry Pi 2 uses its SD-Card as main storage for the OS and the user data, usually called &lt;em&gt;home directory&lt;/em&gt;. This won't be enough for the data I want to put (service web sites, PIM, saving, photos, movies, etc).&lt;/p&gt;
&lt;p&gt;So I need another storage and I buy an external …&lt;/p&gt;</summary><content type="html">&lt;p&gt;My Raspberry Pi 2 uses its SD-Card as main storage for the OS and the user data, usually called &lt;em&gt;home directory&lt;/em&gt;. This won't be enough for the data I want to put (service web sites, PIM, saving, photos, movies, etc).&lt;/p&gt;
&lt;p&gt;So I need another storage and I buy an external disk (everal Gb or less Tb) and connect to my Raspberry Pi with very cheap hard disk connector and USB-A connection to the Raspberry Pi. The total is not very expensive and will make my data independent from the OS. If I need to change it, just disconnect, install a new OS and reconnect it.&lt;/p&gt;
&lt;p&gt;First, I need to format it in order to using it as a classic hard disk. With my USB adapter, I can just connect to my lap/desktop and use a GUI tool to do it like &lt;code&gt;gparted&lt;/code&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select the disk in list.&lt;/li&gt;
&lt;li&gt;Create a partition table.&lt;/li&gt;
&lt;li&gt;Create a partition formatted as &lt;code&gt;ext4&lt;/code&gt; to benefit all Linux capacities (ownership, access right, robustness, etc).&lt;/li&gt;
&lt;li&gt;Something important, assign a label to retrieve easily in our &lt;em&gt;EHome&lt;/em&gt; server.&lt;/li&gt;
&lt;li&gt;Run the application (it will take a few minutes).&lt;/li&gt;
&lt;li&gt;Unmount the USB disk and connect to our EHome server.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In my case, I create two partitions:
* label &lt;code&gt;SERV&lt;/code&gt; to put my server data,
* label &lt;code&gt;SAVE&lt;/code&gt; to use this partition as backup.&lt;/p&gt;
&lt;p&gt;Now we have to mount the disk. The different disk partitions corresponds to device &lt;code&gt;/dev/sda1&lt;/code&gt;, &lt;code&gt;/dev/sda2&lt;/code&gt;, ...&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a directory of name $PART for mounting a partition.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;mkdir&lt;span class="w"&gt; &lt;/span&gt;/&lt;span class="nv"&gt;$PART&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;Add an entry (as root) to the &lt;code&gt;fstab&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;LABEL=&lt;/span&gt;&lt;span class="nv"&gt;$PART&lt;/span&gt;&lt;span class="s2"&gt; /&lt;/span&gt;&lt;span class="nv"&gt;$PART&lt;/span&gt;&lt;span class="s2"&gt; ext4 defaults 0 2&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;/etc/fstab
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;Mount the partition.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;mount&lt;span class="w"&gt; &lt;/span&gt;/&lt;span class="nv"&gt;$PART&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now, the partition can visited and changed as any other partition.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/&lt;span class="nv"&gt;$PART&lt;/span&gt;
$&lt;span class="w"&gt; &lt;/span&gt;ls
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It is also ready to get home directories of users, server data, etc.&lt;/p&gt;</content><category term="EHome"></category><category term="disk"></category><category term="partition"></category><category term="mount"></category><category term="ext4"></category></entry><entry><title>LDAP Server</title><link href="https://casse.freeboxos.fr/ldap-server.html" rel="alternate"></link><published>2022-12-19T11:33:00+01:00</published><updated>2026-02-12T19:04:00+01:00</updated><author><name>Hux</name></author><id>tag:casse.freeboxos.fr,2022-12-19:/ldap-server.html</id><summary type="html">&lt;p&gt;After a long break, I come back to my home server with, finally,a working version of &lt;strong&gt;LDAP&lt;/strong&gt;, &lt;em&gt;tadam&lt;/em&gt;! It is so much complex, such a mess but I finally get a working version of my &lt;strong&gt;LDAP&lt;/strong&gt; and I will explain now how.&lt;/p&gt;
&lt;p&gt;All along the presentation below, I will …&lt;/p&gt;</summary><content type="html">&lt;p&gt;After a long break, I come back to my home server with, finally,a working version of &lt;strong&gt;LDAP&lt;/strong&gt;, &lt;em&gt;tadam&lt;/em&gt;! It is so much complex, such a mess but I finally get a working version of my &lt;strong&gt;LDAP&lt;/strong&gt; and I will explain now how.&lt;/p&gt;
&lt;p&gt;All along the presentation below, I will use the following variables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;$PASSWD&lt;/code&gt; -- LDAP administrator password,&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$DOMAIN&lt;/code&gt; -- LDAP domain (dot-separated words)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$DC_DOMAIN&lt;/code&gt; -- LDAP domain as a comma-separated list with &lt;code&gt;dc=&lt;/code&gt; components.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, if the domain is &lt;code&gt;server.domain.fr&lt;/code&gt;, the &lt;em&gt;DC&lt;/em&gt; form is &lt;code&gt;dc=server,dc=domain,dc=fr&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Just to recall, &lt;strong&gt;LDAP&lt;/strong&gt; is a server providing user information and authentification where you can record the member of the family and use it with different servers.&lt;/p&gt;
&lt;h1&gt;Installing the server&lt;/h1&gt;
&lt;p&gt;First, we have to install the &lt;strong&gt;LDAP&lt;/strong&gt; server, &lt;code&gt;slapd&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;slapd&lt;span class="w"&gt; &lt;/span&gt;ldap-utils
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then, I we have to configure the server with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;dpkg-reconfigure&lt;span class="w"&gt; &lt;/span&gt;slapd
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Where you have to type the &lt;em&gt;domain&lt;/em&gt;, the administrator &lt;em&gt;password&lt;/em&gt;. For &lt;em&gt;organizition&lt;/em&gt;, I also use the &lt;em&gt;domain&lt;/em&gt; name.&lt;/p&gt;
&lt;p&gt;Then, we have to set up &lt;strong&gt;LDAP&lt;/strong&gt; the database structure and populate it with groups and user. This is very painful and was not able to find a completely satisfying solution.&lt;/p&gt;
&lt;p&gt;Consequently, I installed my own tool based on &lt;strong&gt;Python&lt;/strong&gt; and &lt;strong&gt;ldap3&lt;/strong&gt; library. This tools if freely available in &lt;a href="https://framagit.org/casse/ehome"&gt;EHome&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;Installing and using ehome-user.py&lt;/h1&gt;
&lt;p&gt;Install the following dependencies:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;python3-ldap3&lt;span class="w"&gt; &lt;/span&gt;git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;git&lt;/code&gt; here is required to fetch &lt;code&gt;ehome&lt;/code&gt; sources as below:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;https://framagit.org/casse/ehome.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And to use the command, a good idea is to put it on the path:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;export&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$PATH&lt;/span&gt;:&lt;span class="nv"&gt;$PWD&lt;/span&gt;/ehome/command
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now, we are able to set up the &lt;strong&gt;LDAP&lt;/strong&gt; database structure:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;ehome-user.py&lt;span class="w"&gt; &lt;/span&gt;--init
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It will ask for the &lt;strong&gt;LDAP&lt;/strong&gt; domain (dot-separated) and for administator password. After that, the administator password will not be asked anymore.
    [sssd]
    services = nss, pam
    config_file_version = 2
    domains = LDAP&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[domain/LDAP]&lt;/span&gt;
&lt;span class="na"&gt;id_provider&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;ldap&lt;/span&gt;
&lt;span class="na"&gt;auth_provider&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;ldap&lt;/span&gt;
&lt;span class="na"&gt;chpass_provider&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;ldap&lt;/span&gt;

&lt;span class="na"&gt;ldap_uri&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;ldap://localhost&lt;/span&gt;
&lt;span class="na"&gt;ldap_search_base&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;$DOMAIN&lt;/span&gt;

&lt;span class="na"&gt;ldap_default_bind_dn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;cn=admin,$DOMAIN&lt;/span&gt;
&lt;span class="na"&gt;ldap_default_authtok&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;$LDAP_PASSWORD&lt;/span&gt;

&lt;span class="na"&gt;cache_credentials&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;enumerate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;false&lt;/span&gt;

&lt;span class="na"&gt;ldap_tls_reqcert&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;demand&lt;/span&gt;
&lt;span class="na"&gt;ldap_tls_cacert&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;/etc/ssl/certs/ca-certificates.crt&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The configuration of &lt;code&gt;ehome-user.py&lt;/code&gt; is stored in &lt;code&gt;$HOME/.config/ehome/ldap.ini&lt;/code&gt;. Just edit it with your preferred editor.&lt;/p&gt;
&lt;p&gt;Then you can declare your groups with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;ehome-user.py&lt;span class="w"&gt; &lt;/span&gt;--add-group
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And user with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;ehome-user.py&lt;span class="w"&gt; &lt;/span&gt;--add-user
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;During this operation, &lt;code&gt;ehome-user.py&lt;/code&gt; has to create directories for users so that your password will be asked.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;A user has to belong to a group so a group has to be created before users. &lt;code&gt;ehome-user.py&lt;/code&gt; provides a bunch of functions to manage the &lt;strong&gt;LDAP&lt;/strong&gt; server. to get the list of these options, just type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;ehome-user.py&lt;span class="w"&gt; &lt;/span&gt;-h
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h1&gt;Connecting LDAP with Linux authentification&lt;/h1&gt;
&lt;p&gt;Here starts the tricky part. Maybe, one day, I will group all this in a command...&lt;/p&gt;
&lt;p&gt;The most modern way to do this is to use &lt;code&gt;sssd&lt;/code&gt;, so we install it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;sssd&lt;span class="w"&gt; &lt;/span&gt;libpam-sss&lt;span class="w"&gt; &lt;/span&gt;libnss-sss&lt;span class="w"&gt; &lt;/span&gt;ldap-utils
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In order to authenticate with &lt;strong&gt;LDAP&lt;/strong&gt;, a secure communication based has to be set up and first a key has to be generated:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;openssl&lt;span class="w"&gt; &lt;/span&gt;req&lt;span class="w"&gt; &lt;/span&gt;-new&lt;span class="w"&gt; &lt;/span&gt;-x509&lt;span class="w"&gt; &lt;/span&gt;-nodes&lt;span class="w"&gt; &lt;/span&gt;-days&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;365&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-out&lt;span class="w"&gt; &lt;/span&gt;/etc/ssl/certs/ldap.crt&lt;span class="w"&gt; &lt;/span&gt;-keyout&lt;span class="w"&gt; &lt;/span&gt;/etc/ssl/private/ldap.key
$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;chown&lt;span class="w"&gt; &lt;/span&gt;openldap:openldap&lt;span class="w"&gt; &lt;/span&gt;/etc/ssl/private/ldap.key
$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;chmod&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;600&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/etc/ssl/private/ldap.key
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The two last lines ensures that &lt;code&gt;slapd&lt;/code&gt; can access theis key but this it not enough as the directory &lt;code&gt;/etc/ssl/private&lt;/code&gt; can only be accessed by members of group &lt;code&gt;ssl-cert&lt;/code&gt;. So we have to add &lt;strong&gt;LDAP&lt;/strong&gt; server user, &lt;code&gt;openldap&lt;/code&gt;, to this group:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;usermod&lt;span class="w"&gt; &lt;/span&gt;-aG&lt;span class="w"&gt; &lt;/span&gt;ssl-cert&lt;span class="w"&gt; &lt;/span&gt;openldap
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This seems to be a defect of &lt;strong&gt;Ubuntu&lt;/strong&gt; but in the meantime it will be fixed, we have to do it.&lt;/p&gt;
&lt;p&gt;Now, we have to configure &lt;strong&gt;LDAP&lt;/strong&gt; for secured connection. We have to create file &lt;code&gt;tls.ldif&lt;/code&gt; with the content below:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;dn&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;cn&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;
&lt;span class="n"&gt;changetype&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;modify&lt;/span&gt;
&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;olcTLSCertificateFile&lt;/span&gt;
&lt;span class="n"&gt;olcTLSCertificateFile&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sr"&gt;/etc/ssl/certs/&lt;/span&gt;&lt;span class="n"&gt;ldap&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;crt&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt;
&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;olcTLSCertificateKeyFile&lt;/span&gt;
&lt;span class="n"&gt;olcTLSCertificateKeyFile&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sr"&gt;/etc/ssl/private/&lt;/span&gt;&lt;span class="n"&gt;ldap&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;key&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt;
&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;olcTLSCACertificateFile&lt;/span&gt;
&lt;span class="n"&gt;olcTLSCACertificateFile&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sr"&gt;/etc/ssl/certs/&lt;/span&gt;&lt;span class="n"&gt;ldap&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;crt&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Finally, we restart &lt;code&gt;slapd&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;systemctl&lt;span class="w"&gt; &lt;/span&gt;restart&lt;span class="w"&gt; &lt;/span&gt;slapd
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now, we have to configure by creating the file &lt;code&gt;sssd.conf&lt;/code&gt; and typing inside:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[sssd]&lt;/span&gt;
&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;nss, pam&lt;/span&gt;
&lt;span class="na"&gt;config_file_version&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;2&lt;/span&gt;
&lt;span class="na"&gt;domains&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;LDAP&lt;/span&gt;

&lt;span class="k"&gt;[domain/LDAP]&lt;/span&gt;
&lt;span class="na"&gt;id_provider&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;ldap&lt;/span&gt;
&lt;span class="na"&gt;auth_provider&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;ldap&lt;/span&gt;
&lt;span class="na"&gt;chpass_provider&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;ldap&lt;/span&gt;

&lt;span class="na"&gt;ldap_uri&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;ldap://localhost&lt;/span&gt;
&lt;span class="na"&gt;ldap_search_base&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;$DC_DOMAIN&lt;/span&gt;

&lt;span class="na"&gt;ldap_default_bind_dn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;cn=admin,$DC_DOMAIN&lt;/span&gt;
&lt;span class="na"&gt;ldap_default_authtok&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;$PASSWORD&lt;/span&gt;

&lt;span class="na"&gt;cache_credentials&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;enumerate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;false&lt;/span&gt;

&lt;span class="na"&gt;ldap_tls_reqcert&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;demand&lt;/span&gt;
&lt;span class="na"&gt;ldap_tls_cacert&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;/etc/ssl/certs/ca-certificates.crt&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Beware:&lt;/strong&gt; Of the use of $DC_DOMAIN and $PASSWORD defined at the head of the document.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Then we copy this file at right place and make it secure as it contains the **LDAP administrator password:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;cp&lt;span class="w"&gt; &lt;/span&gt;sssd.conf&lt;span class="w"&gt; &lt;/span&gt;/etc/sssd
$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;chmod&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;600&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/etc/sssd/sssd.conf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And we restart &lt;code&gt;sssd&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;systemctl&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;enable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sssd
$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;systemctl&lt;span class="w"&gt; &lt;/span&gt;restart&lt;span class="w"&gt; &lt;/span&gt;sssd
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Modify finally &lt;code&gt;nsswitch.conf&lt;/code&gt; and change it to look like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;passwd&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;systemd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;sss&lt;/span&gt;
&lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;systemd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;sss&lt;/span&gt;
&lt;span class="n"&gt;shadow&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;sss&lt;/span&gt;&lt;span class="err"&gt;```&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then, we can log with an &lt;strong&gt;LDAP&lt;/strong&gt; user:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;su&lt;span class="w"&gt; &lt;/span&gt;-&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$USER&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h1&gt;Final Notes&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;I finally give up with &lt;code&gt;ldapcherry&lt;/code&gt; as it does not fullfil my needs and specially with the creation of the Posix user home directories. But maybe, it was not its goal.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;References&lt;/h1&gt;
&lt;p&gt;LDAP&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://computingforgeeks.com/install-and-configure-ldap-account-manager-on-ubuntu/"&gt;ComputingForGeeks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="Service LDAP"&gt;https://ubuntu.com/server/docs/service-ldap&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Non-PHP LDAP Managers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ldapcherry.readthedocs.io"&gt;LdapCherry&lt;/a&gt; (Python)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;PAM (Linux authentification)
* &lt;a href="https://documentation.ubuntu.com/server/how-to/sssd/with-ldap/"&gt;PAM&lt;/a&gt;&lt;/p&gt;</content><category term="EHome"></category><category term="ldap"></category><category term="pam"></category><category term="sssd"></category><category term="slapd"></category><category term="authentification"></category></entry><entry><title>Lists</title><link href="https://casse.freeboxos.fr/lists.html" rel="alternate"></link><published>2022-12-19T08:44:00+01:00</published><updated>2022-12-19T08:44:00+01:00</updated><author><name>Hux</name></author><id>tag:casse.freeboxos.fr,2022-12-19:/lists.html</id><summary type="html">&lt;p&gt;This page is not really a page blog but provides miscellenaous  lists that are useful to set up &lt;strong&gt;EHome&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The list of configuration files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/etc/radicale/config&lt;/code&gt; -- PIM server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/etc/systemd/system/radicale.service&lt;/code&gt; -- PIM server&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The list of data directories and files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/var/lib/radicale/collections&lt;/code&gt; -- PIM server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/var …&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;p&gt;This page is not really a page blog but provides miscellenaous  lists that are useful to set up &lt;strong&gt;EHome&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The list of configuration files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/etc/radicale/config&lt;/code&gt; -- PIM server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/etc/systemd/system/radicale.service&lt;/code&gt; -- PIM server&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The list of data directories and files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/var/lib/radicale/collections&lt;/code&gt; -- PIM server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/var/www/html&lt;/code&gt; -- web server&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The list of installed packages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;apache2 (apt)&lt;/li&gt;
&lt;li&gt;pi (apt)&lt;/li&gt;
&lt;li&gt;python3 (apt)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The login of created user/group for the servers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;radicale&lt;/code&gt; (PIM server)&lt;/li&gt;
&lt;/ul&gt;</content><category term="EHome"></category></entry><entry><title>Installing my PIM Server</title><link href="https://casse.freeboxos.fr/installing-my-pim-server.html" rel="alternate"></link><published>2022-12-18T19:29:00+01:00</published><updated>2022-12-19T11:30:00+01:00</updated><author><name>Hux</name></author><id>tag:casse.freeboxos.fr,2022-12-18:/installing-my-pim-server.html</id><summary type="html">&lt;h1&gt;Package installation&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://radicale.org/v3"&gt;Radicale&lt;/a&gt; is a free Python-based PIM server. We need first to have Python 3.5 (at least) and PIP installed:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;python3
$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;pi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then we can install &lt;strong&gt;Radicale&lt;/strong&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;--upgrade&lt;span class="w"&gt; &lt;/span&gt;radicale
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h1&gt;Server side&lt;/h1&gt;
&lt;p&gt;We will install &lt;strong&gt;Radicale&lt;/strong&gt; as a &lt;a href="https://radicale.org/v3.html#running-as-a-service"&gt;service&lt;/a&gt;. So we …&lt;/p&gt;</summary><content type="html">&lt;h1&gt;Package installation&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://radicale.org/v3"&gt;Radicale&lt;/a&gt; is a free Python-based PIM server. We need first to have Python 3.5 (at least) and PIP installed:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;python3
$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;pi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then we can install &lt;strong&gt;Radicale&lt;/strong&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;--upgrade&lt;span class="w"&gt; &lt;/span&gt;radicale
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h1&gt;Server side&lt;/h1&gt;
&lt;p&gt;We will install &lt;strong&gt;Radicale&lt;/strong&gt; as a &lt;a href="https://radicale.org/v3.html#running-as-a-service"&gt;service&lt;/a&gt;. So we need first to create a dedicated user:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo useradd --system --user-group --home-dir / --shell /sbin/nologin radicale
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then create the data directory and fix the rights accordingly and protect the content from illegal access:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;sudo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mkdir&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;lib&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;radicale&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;collections&lt;/span&gt;
&lt;span class="n"&gt;sudo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;chown&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;R&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;radicale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;radicale&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;lib&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;radicale&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;collections&lt;/span&gt;
&lt;span class="n"&gt;sudo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;chmod&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;R&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;lib&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;radicale&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;collections&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then we have to create the user database:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;htpasswd&lt;span class="w"&gt; &lt;/span&gt;-c&lt;span class="w"&gt; &lt;/span&gt;/etc/radicale/passwd&lt;span class="w"&gt; &lt;/span&gt;ehome
New&lt;span class="w"&gt; &lt;/span&gt;password:
Re-type&lt;span class="w"&gt; &lt;/span&gt;password:
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Notice that this authentification way (based on local password file) will not be definitive: I aim really to have a central authentification system for &lt;strong&gt;Ehome&lt;/strong&gt;, basically &lt;em&gt;LDAP&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Now, we can fist configure the service. Create the file &lt;code&gt;/etc/radicale/config&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[server]&lt;/span&gt;
&lt;span class="na"&gt;hosts&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;0.0.0.0:5232, [::]:5232&lt;/span&gt;

&lt;span class="k"&gt;[auth]&lt;/span&gt;
&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;htpasswd&lt;/span&gt;
&lt;span class="na"&gt;htpasswd_filename&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;/etc/radicale/passwd&lt;/span&gt;
&lt;span class="na"&gt;htpasswd_encryption&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;md5&lt;/span&gt;

&lt;span class="k"&gt;[storage]&lt;/span&gt;
&lt;span class="na"&gt;filesystem_folder&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;/var/lib/radicale/collections&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And then record the service to &lt;strong&gt;systemd&lt;/strong&gt; Create the file &lt;code&gt;/etc/systemd/system/radicale.service&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[Unit]&lt;/span&gt;
&lt;span class="na"&gt;Description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;A simple CalDAV (calendar) and CardDAV (contact) server&lt;/span&gt;
&lt;span class="na"&gt;After&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;network.target&lt;/span&gt;
&lt;span class="na"&gt;Requires&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;network.target&lt;/span&gt;

&lt;span class="k"&gt;[Service]&lt;/span&gt;
&lt;span class="na"&gt;ExecStart&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/usr/bin/env python3 -m radicale&lt;/span&gt;
&lt;span class="na"&gt;Restart&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;on-failure&lt;/span&gt;
&lt;span class="na"&gt;User&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;radicale&lt;/span&gt;
&lt;span class="c1"&gt;# Deny other users access to the calendar data&lt;/span&gt;
&lt;span class="na"&gt;UMask&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;0027&lt;/span&gt;
&lt;span class="c1"&gt;# Optional security settings&lt;/span&gt;
&lt;span class="na"&gt;PrivateTmp&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;ProtectSystem&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;strict&lt;/span&gt;
&lt;span class="na"&gt;ProtectHome&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;PrivateDevices&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;ProtectKernelTunables&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;ProtectKernelModules&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;ProtectControlGroups&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;NoNewPrivileges&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;ReadWritePaths&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/radicale/collections&lt;/span&gt;

&lt;span class="k"&gt;[Install]&lt;/span&gt;
&lt;span class="na"&gt;WantedBy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;multi-user.target&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It is now time to start the service:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt;  &lt;/span&gt;systemctl&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;enable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;radicale
$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;systemctl&lt;span class="w"&gt; &lt;/span&gt;start&lt;span class="w"&gt; &lt;/span&gt;radicale
$&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;systemctl&lt;span class="w"&gt; &lt;/span&gt;status&lt;span class="w"&gt; &lt;/span&gt;radicale
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h1&gt;Client side&lt;/h1&gt;
&lt;p&gt;You have first to create calendars and address books on the &lt;strong&gt;Radicale&lt;/strong&gt; &lt;em&gt;rough&lt;/em&gt; interface:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;xdg-open&lt;span class="w"&gt; &lt;/span&gt;http://ehome:5232
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Notice that you have to add a port redirection on your Internet box in order to access &lt;strong&gt;Radicale&lt;/strong&gt; outside your local server. As I do not enabled full-stack on my FreeBox server, I redirected the port 5232 to 50001.&lt;/p&gt;
&lt;p&gt;Then you can choose your preferred calendar/address book browser (&lt;a href="https://wiki.gnome.org/Apps/Evolution"&gt;Gnome Evolution&lt;/a&gt; for me) and to open the corresponding calendar/address book.&lt;/p&gt;
&lt;p&gt;Switch to Calendar view:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select &lt;code&gt;New Calendar&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;code&gt;CalDAV&lt;/code&gt;for type.&lt;/li&gt;
&lt;li&gt;Enter &lt;code&gt;http://EHOME.freeboxos.fr:50001&lt;/code&gt; in URL.&lt;/li&gt;
&lt;li&gt;Enter your user name in &lt;code&gt;User&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Select your calendar from the list of available calendars by clicking on &lt;code&gt;Lookup calendars&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Finally click on &lt;code&gt;Validate&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Switch to Address book view:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select &lt;code&gt;New address book&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;code&gt;CardDAV&lt;/code&gt;for type.&lt;/li&gt;
&lt;li&gt;Enter &lt;code&gt;http://EHOME.freeboxos.fr:50001&lt;/code&gt; in URL.&lt;/li&gt;
&lt;li&gt;Enter your user name in &lt;code&gt;User&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Select your calendar from the list of available calendars by clicking on &lt;code&gt;Lookup address books&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Finally click on &lt;code&gt;Validate&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Finally, I tried with my &lt;em&gt;Android&lt;/em&gt; client. I used &lt;code&gt;OpenSync&lt;/code&gt; application. It worked very fine: the only trap is that you have to provide calendar/contact access by hand. In my Android version (pretty old), I had to long click on the &lt;code&gt;OpenSync&lt;/code&gt;icon to open and menu and select &lt;code&gt;Authorization Granting&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The configuration is pretty simple. It asks for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;URL: &lt;code&gt;http://EHOME.freeboxos.fr:50001&lt;/code&gt;,&lt;/li&gt;
&lt;li&gt;user name,&lt;/li&gt;
&lt;li&gt;password.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And now calendars and contacts are available on standard &lt;em&gt;Android&lt;/em&gt; applications.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Radicale&lt;/strong&gt; seems to provide to me all I was looking for but it remains a shortcoming: how to share calendars between users? As far as I understand, &lt;strong&gt;Radicale&lt;/strong&gt;, this is supported neither by plugin, nor by the application itself. This might require some development on my side.&lt;/p&gt;</content><category term="EHome"></category><category term="pim"></category><category term="agenda"></category><category term="addressbook"></category><category term="http"></category></entry><entry><title>Opening Ehome to the World</title><link href="https://casse.freeboxos.fr/opening-ehome-to-the-world.html" rel="alternate"></link><published>2022-12-18T18:31:00+01:00</published><updated>2026-02-14T15:04:00+01:00</updated><author><name>Hux</name></author><id>tag:casse.freeboxos.fr,2022-12-18:/opening-ehome-to-the-world.html</id><summary type="html">&lt;p&gt;Ok now it is time to open my &lt;strong&gt;EHome&lt;/strong&gt; to the world: mainly to make a bridge between my Internet box (a &lt;em&gt;FreeBox Revolution&lt;/em&gt;) and the internet. We have to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install an HTTPD server on &lt;strong&gt;EHome&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Redirect port from the Freebox to the port 80 of &lt;strong&gt;EHome&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Publish some content …&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;p&gt;Ok now it is time to open my &lt;strong&gt;EHome&lt;/strong&gt; to the world: mainly to make a bridge between my Internet box (a &lt;em&gt;FreeBox Revolution&lt;/em&gt;) and the internet. We have to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install an HTTPD server on &lt;strong&gt;EHome&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Redirect port from the Freebox to the port 80 of &lt;strong&gt;EHome&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Publish some content.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Installing Apache2&lt;/h1&gt;
&lt;p&gt;Very straigh-forward, we will use the default configuration that is perfect (optimization later):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;ssh&lt;span class="w"&gt; &lt;/span&gt;ehome
$&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;apache2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;That's it. Disconnecting, we can check wether the HTTPD server is answering:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;xdg-open&lt;span class="w"&gt; &lt;/span&gt;http://ehome
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And we should get the default Apache2 connection page:
&lt;img alt="Apache2 Default Page" src="https://casse.freeboxos.fr/images/apache2.png"&gt;&lt;/p&gt;
&lt;p&gt;It works!&lt;/p&gt;
&lt;h1&gt;Redirecting the ports&lt;/h1&gt;
&lt;p&gt;I suppose that today, all internet boxes supports port direction. With the Freebox, it remains an issue : while we do not configure the account as  &lt;em&gt;Full stack&lt;/em&gt;, we can only redirect ports above &lt;strong&gt;49531&lt;/strong&gt;. In the mean time, I will redirect port 50 000 to port 80 (HTTP) of Ehome.&lt;/p&gt;
&lt;p&gt;The final redirection configuration is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Destination IP: 192.168.1.3 (EHome)&lt;/li&gt;
&lt;li&gt;Source IP: all&lt;/li&gt;
&lt;li&gt;Protocol: TCP&lt;/li&gt;
&lt;li&gt;Port range: 50000-50000&lt;/li&gt;
&lt;li&gt;Port destination: 80&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the host name, I guess it depends on the Internet provided option. With Free, we can have domain name as &lt;code&gt;EHOME.freeboxos.fr&lt;/code&gt;. So I can connect now to my HTTP server with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;xdg-open&lt;span class="w"&gt; &lt;/span&gt;http://EHOME.freeboxos.fr:50000
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And I should get the same default Apache2 page.&lt;/p&gt;
&lt;h1&gt;Publish my Blog&lt;/h1&gt;
&lt;p&gt;I wrote this text with &lt;a href="https://docs.getpelican.com/en"&gt;Pelican&lt;/a&gt;. So, once the pages generated and ready for deployment:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;pelican&lt;span class="w"&gt; &lt;/span&gt;content&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;publishconf.py
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It remains to send files to EHome web server:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;rsync&lt;span class="w"&gt; &lt;/span&gt;-avc&lt;span class="w"&gt; &lt;/span&gt;--delete&lt;span class="w"&gt; &lt;/span&gt;output/&lt;span class="w"&gt; &lt;/span&gt;ehome:/var/www/html/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And I can try my first extern publication of this blog:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;xdg-open&lt;span class="w"&gt; &lt;/span&gt;http://EHOME.freeboxos.fr:50000
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And all works fine.&lt;/p&gt;
&lt;p&gt;My next step. Try to run (Radicale)[https://radicale.org/v3.html] the server of Calendars and Contacts.&lt;/p&gt;
&lt;h1&gt;Publishing a website out of /var/www&lt;/h1&gt;
&lt;p&gt;You can store different website served by the same Apach2 server and at different position than &lt;code&gt;/var/www&lt;/code&gt;. This is specially convenient as, with Raspberry Pi, the size of root directory &lt;code&gt;/&lt;/code&gt; is limited. On my installation, most of my data is stored on an external disk &lt;code&gt;/serve/www&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If the site is stored in &lt;code&gt;/serve/www/$MYSITE&lt;/code&gt;, then you provide access throught URL &lt;code&gt;http://localhost/$MYSITE&lt;/code&gt; bny adding to &lt;code&gt;/etc/apache2/sites-enabled/000-default.conf&lt;/code&gt;the lines:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="w"&gt;    &lt;/span&gt;Alias&lt;span class="w"&gt; &lt;/span&gt;/$MYSITE&lt;span class="w"&gt; &lt;/span&gt;/serve/www/$MYSITE
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;Directory&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/serve/www/$MYSITE&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;Options&lt;span class="w"&gt; &lt;/span&gt;Indexes&lt;span class="w"&gt; &lt;/span&gt;FollowSymLinks
&lt;span class="w"&gt;        &lt;/span&gt;AllowOverride&lt;span class="w"&gt; &lt;/span&gt;All
&lt;span class="w"&gt;        &lt;/span&gt;Require&lt;span class="w"&gt; &lt;/span&gt;all&lt;span class="w"&gt; &lt;/span&gt;granted
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/Directory&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Just before the line &lt;code&gt;&amp;lt;/VirtualHost&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h1&gt;References&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://lafibre.info/installation-free/redirection-de-port-80-impossible/"&gt;Information about Full-stack Free Box&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><category term="EHome"></category><category term="apache"></category><category term="http"></category></entry><entry><title>Restarting my Raspberry Pi</title><link href="https://casse.freeboxos.fr/restarting-my-raspberry-pi.html" rel="alternate"></link><published>2022-10-05T22:05:00+02:00</published><updated>2025-08-25T20:02:00+02:00</updated><author><name>Hux</name></author><id>tag:casse.freeboxos.fr,2022-10-05:/restarting-my-raspberry-pi.html</id><summary type="html">&lt;blockquote&gt;
&lt;p&gt;This is the second version of this article after a long break ( &lt;em&gt;Life is not a long quiet river&lt;/em&gt; ).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ok, first I to give life back to my old &lt;strong&gt;Raspberry Pi 3B+&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I will use an image for &lt;a href="https://ubuntu.com/download/raspberry-pi"&gt;Ubuntu Server 64-bit&lt;/a&gt;. Why? For a lot of reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Debian&lt;/strong&gt; packaging and …&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;blockquote&gt;
&lt;p&gt;This is the second version of this article after a long break ( &lt;em&gt;Life is not a long quiet river&lt;/em&gt; ).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ok, first I to give life back to my old &lt;strong&gt;Raspberry Pi 3B+&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I will use an image for &lt;a href="https://ubuntu.com/download/raspberry-pi"&gt;Ubuntu Server 64-bit&lt;/a&gt;. Why? For a lot of reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Debian&lt;/strong&gt; packaging and distribution is very robust.&lt;/li&gt;
&lt;li&gt;More packages are often available on Ubuntu.&lt;/li&gt;
&lt;li&gt;I'm used with Ubuntu-like distribution.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I think one could get mostly the same result with other main stream distributions.&lt;/p&gt;
&lt;p&gt;All installation details can be found &lt;a href="https://ubuntu.com/tutorials/how-to-install-ubuntu-on-your-raspberry-pi#2-prepare-the-sd-card"&gt;here&lt;/a&gt;. But it does not start well, I do not have &lt;code&gt;rpi-imager&lt;/code&gt;on my old Linux Mint. I get it from  &lt;a href="https://www.raspberrypi.com/software/"&gt;Raspberry Pi website&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Then I can install&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;rpi-imager
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And configure according to the downloaded image. Before writing to the SD-Card, click on the gear, specially to configure default login (named thereafter &lt;code&gt;LOGIN&lt;/code&gt;), password and activation of &lt;strong&gt;ssh&lt;/strong&gt; server (I do not want to use a screen with my RPi, only a pure server). It will take about 10 minutes.&lt;/p&gt;
&lt;p&gt;First boot:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I connect my RPi to one of my switch on my Free LAN,&lt;/li&gt;
&lt;li&gt;I power it up.&lt;/li&gt;
&lt;li&gt;LEDs blinks and the RPi boots.&lt;/li&gt;
&lt;li&gt;From my browser, I move to my network monitoring page provided by Free's router and find a new device named &lt;code&gt;ubuntu&lt;/code&gt; and retrieve its IP address, &lt;code&gt;ADDR&lt;/code&gt; thereafter.&lt;/li&gt;
&lt;li&gt;I ping it: seems to be alive.&lt;/li&gt;
&lt;li&gt;I try my first connection and all works well.&lt;/li&gt;
&lt;li&gt;I use Free's monitor page to assign the right name, &lt;code&gt;ehome&lt;/code&gt;, and a fix the IP &lt;code&gt;ADDR&lt;/code&gt; to my server, &lt;strong&gt;192.168.1.3&lt;/strong&gt; for example. Select this address depening your home router configuration. In the following, I will call it &lt;code&gt;ADDR&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;IP address &lt;strong&gt;192.168.1.2&lt;/strong&gt; is already used by my pretty old Banana Pi server used as a printer and file server. Why not using it? Its OS is very old and I'm not sure that Banana Pi is still actively developed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hint:&lt;/strong&gt; as we will use several fixed information like &lt;code&gt;LOGIN&lt;/code&gt;, &lt;code&gt;ADDR&lt;/code&gt;, etc. a good practice to gather this information in a note file (a) to not forget them and (b) to quicly retrieve them.&lt;/p&gt;
&lt;p&gt;Next step, put a public key in &lt;code&gt;.ssh&lt;/code&gt; to avoid retyping the password:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;scp id_rsa.pub LOGIN@ADDR&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Then I connect: &lt;code&gt;ssh LOGIN@ADDR&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Type the password.&lt;/li&gt;
&lt;li&gt;And copy the public at the right place: &lt;code&gt;cat id_rsa.pub &amp;gt;&amp;gt; .ssh/authorized_keys&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Disconnect.&lt;/li&gt;
&lt;li&gt;Reconnect with &lt;code&gt;ssh LOGIN@ADDR&lt;/code&gt; and no password is asked.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Finally, I upgrade my packages with the last version:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;sudo apt upgrade&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And, after lots of minutes, my server is ready to run.
I take advantage of this time to add an entry to my &lt;code&gt;/ets/hosts&lt;/code&gt; file for an easier access to my server:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ADDR ehome
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="EHome"></category><category term="raspberrypi"></category><category term="server"></category><category term="ubuntu"></category><category term="linux"></category></entry><entry><title>Birth of a Project</title><link href="https://casse.freeboxos.fr/birth-of-a-project.html" rel="alternate"></link><published>2022-10-03T20:29:00+02:00</published><updated>2022-10-03T20:29:00+02:00</updated><author><name>Hux</name></author><id>tag:casse.freeboxos.fr,2022-10-03:/birth-of-a-project.html</id><summary type="html">&lt;p&gt;It's decided, I'm fed up with &lt;a href="https://www.google.fr/"&gt;Google&lt;/a&gt; and equivalent commercial of emails and other &lt;strong&gt;PIMs&lt;/strong&gt; (&lt;strong&gt;Personnal Info Managers&lt;/strong&gt;). I need to share calendars, contacts, etc with my family and Google solution seemed to be promising. In fact, it perfectly worked for several years but, since one year, I encounter some …&lt;/p&gt;</summary><content type="html">&lt;p&gt;It's decided, I'm fed up with &lt;a href="https://www.google.fr/"&gt;Google&lt;/a&gt; and equivalent commercial of emails and other &lt;strong&gt;PIMs&lt;/strong&gt; (&lt;strong&gt;Personnal Info Managers&lt;/strong&gt;). I need to share calendars, contacts, etc with my family and Google solution seemed to be promising. In fact, it perfectly worked for several years but, since one year, I encounter some problems with my local clients.&lt;/p&gt;
&lt;p&gt;Since the support of &lt;a href="https://www.thunderbird.net"&gt;Thunderbird&lt;/a&gt; is discontinued, I cannot use &lt;a href="https://www.thunderbird.net/en-US/calendar/"&gt;Lightning&lt;/a&gt; anymore. So I migrate to &lt;a href="https://wiki.gnome.org/Apps/Evolution"&gt;Evolution&lt;/a&gt; (I'm currently using &lt;a href="https://linuxmint.com/"&gt;Linux Mint&lt;/a&gt; distribution with &lt;a href="https://www.gnome.org/"&gt;Gnome desktop&lt;/a&gt;). A great piece of software I used long time ago and that I give up as it was not following evolution (specially to use &lt;a href="https://www.google.fr/"&gt;Google&lt;/a&gt; solution). All seems to work nicely until July. Then I switched to a more up-to-date version of &lt;a href="https://wiki.gnome.org/Apps/Evolution"&gt;Evolution&lt;/a&gt; using &lt;a href="https://www.flatpak.org/"&gt;Flatpak&lt;/a&gt; and it worked like a charm. But today again, connections to &lt;a href="https://www.google.fr/"&gt;Google&lt;/a&gt; fail unexpectedly and I have no other solution than using the web interface to access my emails, my agenda and my contacts and I feel I reached the breakpoint: I definitively need a more sustainable solution my personnal information.&lt;/p&gt;
&lt;p&gt;I was not very confortable with &lt;a href="https://www.google.fr/"&gt;Google&lt;/a&gt;'s solution but a good point was it was working. Now, I want a long-term and open source solution and this blog aims to present my action to set up an open source to this problem, perhaps to help other user to get their freedom with their personnal information data. Not sure this process will be successful but I will try my best.&lt;/p&gt;
&lt;p&gt;First, I want my solution to be hosted at home (to have complete control on my personnal data):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;first, I have a &lt;a href="https://www.raspberrypi.org/"&gt;Raspberry Pi&lt;/a&gt; to use as a lower power server,&lt;/li&gt;
&lt;li&gt;the Linux distribution will be one &lt;a href="https://www.debian.org/"&gt;Debian&lt;/a&gt; or derived,&lt;/li&gt;
&lt;li&gt;a fixed IP ensured by my internet provided (&lt;a href="https://portail.free.fr/"&gt;Free&lt;/a&gt; in France).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I have to explorer the different alternative:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;for email server,&lt;/li&gt;
&lt;li&gt;for PIM server,&lt;/li&gt;
&lt;li&gt;for authentification (presumably LDAP).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And for this blog, I will use &lt;a href="https://getpelican.com/"&gt;Pelican&lt;/a&gt; because I like (1) static website generator, (2) text tools and (3) &lt;a href="https://www.python.org/"&gt;Python&lt;/a&gt; that runs almost everywhere.&lt;/p&gt;</content><category term="EHome"></category></entry></feed>