Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0bb71e1 authored by Gaël Duval's avatar Gaël Duval 🏄🏼
Browse files

Update README.md

parent c5074593
Loading
Loading
Loading
Loading
+43 −19
Original line number Diff line number Diff line
# Ecloud Selfhosting (Beta)

This project allows you to install ecloud services on your own server. It is a similar
setup that is used on [ecloud.global](https://ecloud.global).
This project allows users to install ecloud services on their own server, using a single identity.

The project is currently in beta. You should have some experience with Linux server
This way, a user can use [/e/OS](https://e.foundation/products/) on a smartphone while self-hosting and syncing data:
 1. pictures, videos, files...
 2. calendar
 3. contacts
 4. notes
 5. tasks
 6. device configuration...

The setup, which is relying on NextCloud, OnlyOffice, Postfix, and other open source components, is very close to the one used on [ecloud.global](https://ecloud.global).

Important note: this project is currently in beta. You should have some experience with Linux server
administration if you want to use it. The current setup makes updates difficult,
so manual intervention might be necessary. In the future, we will switch to Ansible
for deployment to simplify this. (TBD remove this once ansible is in use)
for deployment to simplify this.

## Requirements

@@ -25,27 +34,41 @@ For the setup without OnlyOffice, requirements are a bit lower:
Disk space only refers to the basic installation. You will need additional space for any emails,
documents and files you store on the server.

Additionally you will need to have a minimum of one domain registered.
Additionally you will need to have a minimum of **one domain registered**. You can register a domain name from many providers.

## Installation

### Create Ubuntu VPS
### Create an Ubuntu server instance

The project should work with any Ubuntu server (Virtual Private Server (VPS), dedicated server...) versions 16.04 and 18.04. 

Debian server should work as well, though it has not been tested yet.

Suggestions include:
 - [Hetzner](https://www.hetzner.com/cloud)
 - [OVH](https://www.ovh.co.uk/vps/vps-ssd.xml)
 - [Scaleway](https://scaleway.com)
 
The project should work with any Ubuntu VPS. Suggestions include [Hetzner](https://www.hetzner.com/cloud)
or [OVH](https://www.ovh.co.uk/vps/vps-ssd.xml). Hosting at home is also possible in principle,
but you will probably have problems with sending email (most providers will classify your email as spam).
Hosting at home is also possible in principle, but you will probably have problems with sending email (email providers may classify your email as spam).

First, create your hosting server. Please follow your hoster documentation to create your server or VPS.

### Set your server with proper DNS settings

1. point your domain DNS entries to your server
2. then set the reverse DNS of this server to the same domain (this is usually possible in the VPS settings on the hoster's website).

The below example will use `yourdomain.com` to explain the (initial) DNS setup you need to have for this to work.

TBD this is maybe a bit too technical?
First, create your VPS (note down its IP, 1.2.3.4 in this example) and create two A records in the zone file of your domain on your DNS server (or the corresponding webui of the domain registrar):
It is assumed that you your VPS is up and running, and using IPv4 address 1.2.3.4 in this example.

Create two A records in the zone file of your domain on your DNS server (or the corresponding webui of the domain registrar):
 - A record from @ -> 1.2.3.4 (@ stands for the main domain itself - but not as a placeholder in this text, literally use @!)
 - A record from mail -> 1.2.3.4 (CNAME would NOT be sufficient!)

Then set the reverse DNS of 1.2.3.4 to mail.yourdomain.com.
(this is usually possible in the VPS settings on the hoster's website).
Then set the reverse DNS of 1.2.3.4 to mail.yourdomain.com. (note the final dot '.' at the end of our fully qualified domain name). This is usually possible in the VPS settings on the hoster's website.

In the following text, `$DOMAIN` refers to the domain that you configured for your selfhosting server.
In the following text, `$DOMAIN` refers to the domain (`youdomain.com`) that you configured for your selfhosting server.

### Start bootstrap process

@@ -54,14 +77,13 @@ Login to server as root. Execute this command and follow its on-screen instructi
```
$ ssh root@$DOMAIN
# wget https://gitlab.e.foundation/e/infra/bootstrap/raw/master/bootstrap-generic.sh
# TBD this pasth will change once made public (/priv/):
# bash bootstrap-generic.sh https://gitlab.e.foundation/e/priv/infra/ecloud-selfhosting
# bash bootstrap-generic.sh https://gitlab.e.foundation/XXXTO BE UPDATED WITH CORRECT PATHXXXXXX/ecloud-selfhosting
```
The setup script will ask you to input some details of your setup (like your domain name) and to setup additional DNS records (the two A records plus the PTR record were set already above).

Example session for yourdomain.com:
```
bash bootstrap-generic.sh https://gitlab.e.foundation/e/priv/infra/ecloud-selfhosting
bash bootstrap-generic.sh https://gitlab.e.foundation/XXXTO BE UPDATED WITH CORRECT PATHXXXXXX/ecloud-selfhostingg
[...]
Resolving deltas: 100% (681/681), done.
System update and packages installation ..
@@ -130,11 +152,13 @@ You can find login information for these services by running `bash /mnt/repo-bas

## Setting up /e/ OS with /e/ selfhosting

For a new installation, enter the selfhosting domain in the fist time usage wizard.
For a new installation, enter login (email address - username@yourdomain.com), password and selfhosting domain FQDN in the fist time usage wizard.

If you already have /e/ OS installed, you can add your selfhosting domain under

Settings->Users & accounts->Add account->/e/ account, and specify your custom server URL using the "Server URL" field in "Login with another account":
    Settings->Users & accounts->Add account->/e/ account

using login (email address - username@yourdomain.com), password, and specifying your custom server URL using the "Server URL" (https://yourdomain.com) field in "Login with another account":

[](https://gitlab.e.foundation/e/priv/infra/ecloud-selfhosting/raw/1e3cb6cd56ade9d3489d30f56ea941edce4533c8/e_os_custom_server_screenshot.jpg)