1
0
mirror of https://github.com/etesync/server synced 2024-11-17 22:38:29 +00:00
Go to file
2020-11-14 16:56:26 +02:00
django_etebase Gracefully handle uploading the same item twice. 2020-11-10 10:07:56 +02:00
etebase_server Add env variable to change configuration file path. 2020-11-08 08:58:19 +02:00
example-configs/nginx-uwsgi Merge: merge in the new etebase (EteSync 2.0) code 2020-10-18 17:50:52 +03:00
myauth Change user creation to not ask for a password (and clarify the readme). 2020-11-07 18:58:29 +02:00
requirements.in Update django and remove unused deps. 2020-09-10 19:19:19 +03:00
templates Fix the URL in the success template. 2020-11-05 16:50:09 +02:00
.gitignore Add .gitignore. 2020-07-08 17:58:00 +03:00
ChangeLog.md Update changelog. 2020-11-14 16:56:26 +02:00
etebase-server.ini.example Port over easyconfig from the etesync server code. 2020-09-10 19:18:51 +03:00
icon.svg Update README for Etebase with new wiki links (#56) 2020-09-27 17:48:52 +03:00
LICENSE Add license file. 2020-07-08 17:58:29 +03:00
manage.py Create a new django project. 2020-07-08 17:57:57 +03:00
README.md README: update + add chat badge. 2020-11-12 14:07:41 +02:00
requirements.txt Update django and remove unused deps. 2020-09-10 19:19:19 +03:00

Etebase - Encrypt Everything

An Etebase (EteSync 2.0) server so you can run your own.

Chat with us

Installation

From source

Before installing the Etebase server make sure you install virtualenv (for Python 3):

  • Arch Linux: pacman -S python-virtualenv
  • Debian/Ubuntu: apt-get install python3-virtualenv
  • Mac/Windows/Other Linux: install virtualenv or just skip the instructions mentioning virtualenv.

Then just clone the git repo and set up this app:

git clone https://github.com/etesync/server.git etebase

cd etebase
git checkout etebase

# Set up the environment and deps
virtualenv -p python3 venv  # If doesn't work, try: virtualenv3 venv
source venv/bin/activate

pip install -r requirements.txt

Configuration

If you are familiar with Django you can just edit the settings file according to the Django deployment checklist. If you are not, we also provide a simple configuration file for easy deployment which you can use. To use the easy configuration file rename it to etebase-server.ini and place it either at the root of this repository or in /etc/etebase-server.

There is also a wikipage detailing this basic setup.

Some particular settings that should be edited are:

  • ALLOWED_HOSTS -- this is the list of host/domain names or addresses on which the app will be served
  • DEBUG -- handy for debugging, set to False for production
  • SECRET_KEY -- an ephemeral secret used for various cryptographic signing and token generation purposes. See below for how default configuration of SECRET_KEY works for this project.

Now you can initialise our django app.

./manage.py migrate

And you are done! You can now run the debug server just to see everything works as expected by running:

./manage.py runserver 0.0.0.0:8000

Using the debug server in production is not recommended, so please read the following section for a proper deployment.

Production deployment

There are more details about a proper production setup using Daphne and Nginx in the wiki.

Etebase is based on Django so you should refer to one of the following

  • The instructions of the Django project here.
  • Instructions from uwsgi here.

The webserver should also be configured to serve Etebase using TLS. A guide for doing so can be found in the wiki as well.

Usage

Create yourself an admin user:

./manage.py createsuperuser

At this stage you need to create accounts to be used with the EteSync apps. To do that, please go to: www.your-etesync-install.com/admin and create a new user to be used with the service. No need to set a password, as Etebase uses a zero-knowledge proof for authentication, so the user will just create a password when creating the account from the apps.

After this user has been created, you can use any of the EteSync apps to signup (or login) with the same username and email in order to set up the account. The password used at that point will be used to setup the account. Don't forget to set your custom server address under "Advanced".

SECRET_KEY and secret.txt

The default configuration creates a file “secret.txt” in the projects base directory, which is used as the value of the Django SECRET_KEY setting. You can revoke this key by deleting the secret.txt file and the next time the app is run, a new one will be generated. Make sure you keep the secret.txt file secret (dont accidentally commit it to version control, exclude it from your backups, etc.). If you want to change to a more secure system for storing secrets, edit etesync_server/settings.py and implement your own method for setting SECRET_KEY (remove the line where it uses the get_secret_from_file function). Read the Django docs for more information about the SECRET_KEY and its uses.

Updating

Updating from version 0.5.0 onwards

First, run git pull --rebase to update this repository. Then, inside the virtualenv:

  1. Run pip install -U -r requirements.txt to update the dependencies.
  2. Run python manage.py migrate to perform database migrations.

You can now restart the server.

Updating from version 0.5.0 or before

The 0.5.0 release marks the change to the EteSync 2.0 protocol. EteSync 2.0 accounts are substantially different to 1.0 accounts, and require additional upgrade steps. In addition, the servers are incompatible, so 0.5.0 requires a fresh installation.

Here are the update steps:

  1. Chose any of the the migration tools and make sure the underlying apps are up to date with all of your data. So for example, if you are using the Android client, make sure to sync before commencing.
  2. Install the 0.5.0 version to a new path (you can't reuse the same database).
  3. Run the 0.5.0 account and create the appropriate users as described in the installation/upgrade steps above.
  4. Run the migration tool to migrate all of your data.
  5. Add your new EteSync 2.0 accounts to all of your devices.

Supporting Etebase

Please consider registering an account even if you self-host in order to support the development of Etebase, or visit the contribution for more information on how to support the service.