Installazione EteSync · 9 min read · Sep 30, 2025
Come installare il server EteSync su Ubuntu 20.04

EteSync è una soluzione open-source per sincronizzare i tuoi contatti, calendari e attività. È auto-ospitato, fornisce crittografia end-to-end e ti consente di condividere dati con altri utenti. Può essere integrato con i desktop GNOME e KDE. Può essere accessibile tramite client desktop, web, Android e iOS.
In questo tutorial, ti mostrerò come installare EteSync con Apache su Ubuntu 20.04.
Prerequisiti
- Un server che esegue Ubuntu 20.04.
- Un nome di dominio valido puntato con l’IP del tuo server.
- Una password di root configurata sul server.
Iniziare
Per prima cosa, aggiorna i pacchetti di sistema alla versione aggiornata eseguendo il seguente comando:
apt-get update -yUna volta che tutti i pacchetti sono aggiornati, puoi procedere al passaggio successivo.
Installazione del server MariaDB
Per impostazione predefinita, EteSync utilizza il database SQLite per memorizzare le sue informazioni. Qui installeremo e utilizzeremo MariaDB come backend del database.
Per prima cosa, installa le dipendenze richieste utilizzando il seguente comando:
apt-get install software-properties-common gnupg2 -ySuccessivamente, aggiungi la chiave GPG e il repository di MariaDB utilizzando il seguente comando:
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirror.lstn.net/mariadb/repo/10.5/ubuntu focal main'Successivamente, aggiorna il repository di MariaDB e installa l’ultima versione di MariaDB con il seguente comando:
apt-get install mariadb-server -yDopo aver installato il server MariaDB, accedi alla shell di MariaDB con il seguente comando:
mysqlUna volta effettuato l’accesso, crea un database e un utente per EteSync con il seguente comando:
MariaDB [(none)]> create database etesync;
MariaDB [(none)]> create user etesync@localhost identified by 'securepassword';Successivamente, concedi tutti i privilegi al database EteSync con il seguente comando:
MariaDB [(none)]> grant all privileges on etesync.* to etesync@localhost;Successivamente, svuota i privilegi ed esci da MariaDB con il seguente comando:
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit;Una volta terminato, puoi procedere al passaggio successivo.
Installazione e configurazione di EteSync
Per prima cosa, dovrai installare alcune dipendenze Python richieste per EteSync. Puoi installarle tutte con il seguente comando:
apt-get install python3-virtualenv python3-pip gcc libmysqlclient-dev build-essential git -yDopo aver installato tutte le dipendenze, scarica l’ultima versione di EteSync utilizzando il seguente comando:
git clone https://github.com/etesync/server.git etesyncUna volta completato il download, cambia la directory in etesync e crea un ambiente virtuale Python con il seguente comando:
cd etesync
virtualenv -p python3 .venvSuccessivamente, attiva l’ambiente virtuale con il seguente comando:
source .venv/bin/activateSuccessivamente, installa tutti i requisiti utilizzando il seguente comando:
pip install -r requirements.txtSuccessivamente, copia il file di configurazione di esempio:
cp etebase-server.ini.example etebase-server.iniSuccessivamente, modifica il file di configurazione utilizzando il comando qui sotto:
nano etebase-server.iniAggiungi o modifica le seguenti righe in base alla tua configurazione:
media_root = /opt
allowed_host1 = etesync.example.com
;engine = django.db.backends.sqlite3
;name = db.sqlite3
engine = django.db.backends.mysql
name = etesync
user = etesync
password = securepassword
host = 127.0.0.1
port = 3306Salva e chiudi il file, quindi installa altri moduli utilizzando il seguente comando:
pip3 install daphne
pip3 install mysqlclient
pip3 install aioredisSuccessivamente, genera i file statici e migra il database con il seguente comando:
./manage.py collectstatic
./manage.py migrateInfine, avvia il server EteSync con il seguente comando:
daphne -b 0.0.0.0 -p 8001 etebase_server.asgi:applicationSe tutto va bene, dovresti ottenere il seguente output:
2021-07-09 05:42:28,510 INFO Starting server at tcp:port=8001:interface=0.0.0.0
2021-07-09 05:42:28,510 INFO HTTP/2 support not enabled (install the http2 and tls Twisted extras)
2021-07-09 05:42:28,511 INFO Configuring endpoint tcp:port=8001:interface=0.0.0.0
2021-07-09 05:42:28,512 INFO Listening on TCP address 0.0.0.0:8001Premi CTRL + C per fermare il server.
Successivamente, crea un utente amministrativo utilizzando il seguente comando:
./manage.py createsuperuserFornisci il tuo nome utente, password e email come mostrato di seguito:
Username: etesync
Email address: [email protected]
Password:
Password (again):
Superuser created successfully.Successivamente, disattiva l’ambiente virtuale Python con il seguente comando:
deactivateCrea un file di unità Systemd per EteSync
Successivamente, dovrai creare un file di unità systemd per gestire EteSync. Puoi crearlo con il seguente comando:
nano /etc/systemd/system/etesync.serviceAggiungi le seguenti righe:
[Unit]
Description=EteSync: End-to-End Encryption to Sync Calender, Contacts, Tasks and Notes.
[Service]
WorkingDirectory=/root/etesync
ExecStart=/root/etesync/.venv/bin/daphne -b 127.0.0.1 -p 8001 -u /tmp/etebase_server.sock etebase_server.asgi:application
User=root
Group=root
Restart=always
RestartSec=5s
[Install]
WantedBy=multi-user.targetSalva e chiudi il file, quindi ricarica il demone systemd per applicare le modifiche di configurazione:
systemctl daemon-reloadSuccessivamente, avvia e abilita il servizio EteSync con il seguente comando:
systemctl start etesync
systemctl enable etesyncPer verificare lo stato del servizio EteSync, esegui il seguente comando:
systemctl status etesyncDovresti ottenere il seguente output:
? etesync.service - EteSync: End-to-End Encryption to Sync Calender, Contacts, Tasks and Notes.
Loaded: loaded (/etc/systemd/system/etesync.service; disabled; vendor preset: enabled)
Active: active (running) since Fri 2021-07-09 05:45:45 UTC; 5s ago
Main PID: 16213 (daphne)
Tasks: 1 (limit: 2353)
Memory: 48.7M
CGroup: /system.slice/etesync.service
??16213 /root/etesync/.venv/bin/python /root/etesync/.venv/bin/daphne -b 127.0.0.1 -p 8001 -u /tmp/etebase_server.sock etebase_se>
Jul 09 05:45:45 node1 systemd[1]: Started EteSync: End-to-End Encryption to Sync Calender, Contacts, Tasks and Notes..
Jul 09 05:45:46 node1 daphne[16213]: 2021-07-09 05:45:46,993 INFO Starting server at tcp:port=8001:interface=127.0.0.1, unix:/tmp/etebase_>
Jul 09 05:45:46 node1 daphne[16213]: 2021-07-09 05:45:46,995 INFO HTTP/2 support not enabled (install the http2 and tls Twisted extras)
Jul 09 05:45:46 node1 daphne[16213]: 2021-07-09 05:45:46,995 INFO Configuring endpoint tcp:port=8001:interface=127.0.0.1
Jul 09 05:45:46 node1 daphne[16213]: 2021-07-09 05:45:46,997 INFO Listening on TCP address 127.0.0.1:8001
Jul 09 05:45:46 node1 daphne[16213]: 2021-07-09 05:45:46,998 INFO Configuring endpoint unix:/tmp/etebase_server.sockA questo punto, EteSync è avviato e in ascolto sulla porta 8001. Puoi ora procedere al passaggio successivo.
Configurare Apache come reverse proxy
È anche consigliabile installare e utilizzare Apache come reverse proxy per accedere a EteSync. Per prima cosa, installa il server Apache con il seguente comando:
apt-get install apache2 -yDopo aver installato il server Apache, abilita tutti i moduli proxy con il seguente comando:
a2enmod proxy proxy_http headers proxy_wstunnelSuccessivamente, crea un nuovo file di configurazione del virtual host di Apache:
nano /etc/apache2/sites-available/etesync.confAggiungi le seguenti righe:
ServerName etesync.example.com
ErrorDocument 404 /404.html
ErrorLog ${APACHE_LOG_DIR}/etebase_error.log
CustomLog ${APACHE_LOG_DIR}/etebase_access.log combined
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8001/
ProxyPassReverse / http://127.0.0.1:8001/
Alias /static /etesync/static
Salva e chiudi il file, quindi attiva il virtual host di Apache con il seguente comando:
a2ensite etesync.confSuccessivamente, riavvia Apache per aggiornare le modifiche:
systemctl restart apache2Puoi ora verificare lo stato di Apache utilizzando il seguente comando:
systemctl status apache2Dovresti ottenere il seguente output:
? apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-07-09 05:50:26 UTC; 5s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 17551 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 17567 (apache2)
Tasks: 55 (limit: 2353)
Memory: 5.3M
CGroup: /system.slice/apache2.service
??17567 /usr/sbin/apache2 -k start
??17568 /usr/sbin/apache2 -k start
??17569 /usr/sbin/apache2 -k start
Jul 09 05:50:26 node1 systemd[1]: Starting The Apache HTTP Server...
Jul 09 05:50:26 node1 apachectl[17558]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 45.58.3>Accedi alla console di amministrazione di EteSync
Ora, apri il tuo browser web e accedi all’interfaccia di amministrazione di EteSync utilizzando l’URL http://etesync.example.com/admin/. Sarai reindirizzato alla seguente pagina:

Fornisci il tuo nome utente amministrativo, password e fai clic sul pulsante Accedi. Dovresti vedere la seguente pagina:

Sicurezza di EteSync con SSL Let’s Encrypt
Per prima cosa, dovrai installare il client Certbot Let’s Encrypt per scaricare e installare il certificato SSL per il tuo dominio.
Puoi installarlo con il seguente comando:
apt-get install python3-certbot-apache -yUna volta installato, puoi eseguire il seguente comando per installare il certificato Let’s Encrypt per il tuo dominio etesync.example.com.
certbot --apache -d etesync.example.comDurante l’installazione, ti verrà chiesto di fornire il tuo indirizzo email e accettare i termini di servizio come mostrato di seguito:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for etesync.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/etesync-le-ssl.conf
Deploying Certificate to VirtualHost /etc/apache2/sites-available/etesync-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/etesync-le-ssl.conf
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2Successivamente, digita 2 e premi Invio per scaricare e installare un certificato SSL gratuito per il tuo dominio. Una volta completata con successo l’installazione, dovresti ottenere il seguente output:
Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/etesync.conf to ssl vhost in /etc/apache2/sites-available/
etesync-le-ssl.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://etesync.example.com
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=etesync.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Conclusione
Congratulazioni! hai installato con successo EteSync sul server Ubuntu 20.04 con SSL Let’s Encrypt. Ora puoi sincronizzare facilmente il tuo calendario e i tuoi contatti con EteSync.
Ricevi i nuovi post nella tua casella di posta.
Nessuno spam. Disiscriviti in qualsiasi momento.