|
1 week ago | |
---|---|---|
.github | 1 month ago | |
django_etebase | 2 weeks ago | |
etebase_fastapi | 1 week ago | |
etebase_server | 4 weeks ago | |
example-configs/nginx-uwsgi | 3 months ago | |
myauth | 3 weeks ago | |
requirements.in | 3 weeks ago | |
templates | 2 months ago | |
.gitignore | 2 months ago | |
ChangeLog.md | 4 weeks ago | |
LICENSE | 3 years ago | |
README.md | 3 weeks ago | |
etebase-server.ini.example | 4 months ago | |
icon.svg | 2 years ago | |
manage.py | 2 months ago | |
mypy.ini | 3 weeks ago | |
pyproject.toml | 2 months ago | |
requirements-dev.txt | 3 weeks ago | |
requirements.txt | 3 weeks ago |
An Etebase (EteSync 2.0) server so you can run your own.
Etebase requires Python 3.7 or newer and has a few Python dependencies (listed in requirements.in/base.txt
).
Before installing the Etebase server make sure you install virtualenv
(for Python 3):
pacman -S python-virtualenv
apt-get install python3-virtualenv
Then just clone the git repo and set up this app:
git clone https://github.com/etesync/server.git etebase
cd 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
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. For example: etebase.example.com
DEBUG
-- handy for debugging, set to False
for productionMEDIA_ROOT
-- the path to the directory that will hold user data.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:
uvicorn etebase_server.asgi:application --host 0.0.0.0 --port 8000
Using the debug server in production is not recommended, so please read the following section for a proper deployment.
There are more details about a proper production setup using uvicorn and Nginx in the wiki.
The webserver should also be configured to serve Etebase using TLS. A guide for doing so can be found in the wiki as well.
The Etebase server needs to be aware of the URL it’s been served as, so make sure to forward the Host
header to the server if using a reverse proxy. For example, you would need to use the following directive in nginx: proxy_set_header Host $host;
.
The server stores user data in two different locations that need to be backed up:
MEDIA_ROOT
- the path where user data is stored.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 project’s
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 (don’t 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.
First, run git pull --rebase
to update this repository.
Then, inside the virtualenv:
pip install -U -r requirements.txt
to update the dependencies.python manage.py migrate
to perform database migrations.You can now restart the server.
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:
Etebase is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation. See the LICENSE for more information.
A quick summary can be found on tldrlegal. Though in even simpler terms (not part of the license, and not legal advice): you can use it in however way you want, including self-hosting and commercial offerings as long as you release the code to any modifications you have made to the server software (clients are not affected).
For commercial licensing options, contact license@etebase.com
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.
Become a financial contributor and help us sustain our community!