etesync / server Goto Github PK
View Code? Open in Web Editor NEWThe Etebase server (so you can run your own)
Home Page: https://www.etesync.com
License: GNU Affero General Public License v3.0
The Etebase server (so you can run your own)
Home Page: https://www.etesync.com
License: GNU Affero General Public License v3.0
get etesync server self-hosted and running , wanna write some cron job to backup data( calendar,contacts,tasks) everyday,
is jsut backing up /server-skeleton/db.sqlite3 enough?
should I backup secret.txt?
don't know if there is the proper place to throw those question though, sorry if I broken some rules.
Hi,
Thanks for the project. There don't seem to be any static assets in the repo?
In old version I used to setting ALLOWED_HOSTS
in setting.py
and README.md
also say that choose one to config.
But after I update server-skeketon it can't be access.
If I don't config etesync-server.ini
the service can't work get this error:
CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False.
.
Etesync-server version from branch v0.3.0 works like a charm, but build from branch v0.5.0 cannot start and throws:
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
self.connect()
File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 200, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 207, in get_new_connection
conn = Database.connect(**conn_params)
sqlite3.OperationalError: unable to open database file
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.8/site-packages/django/utils/autoreload.py", line 53, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 121, in inner_run
self.check_migrations()
File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 459, in check_migrations
executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
File "/usr/local/lib/python3.8/site-packages/django/db/migrations/executor.py", line 18, in __init__
self.loader = MigrationLoader(self.connection)
File "/usr/local/lib/python3.8/site-packages/django/db/migrations/loader.py", line 53, in __init__
self.build_graph()
File "/usr/local/lib/python3.8/site-packages/django/db/migrations/loader.py", line 216, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/usr/local/lib/python3.8/site-packages/django/db/migrations/recorder.py", line 77, in applied_migrations
if self.has_table():
File "/usr/local/lib/python3.8/site-packages/django/db/migrations/recorder.py", line 55, in has_table
with self.connection.cursor() as cursor:
File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 259, in cursor
return self._cursor()
File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 235, in _cursor
self.ensure_connection()
File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
self.connect()
File "/usr/local/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
self.connect()
File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 200, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 207, in get_new_connection
conn = Database.connect(**conn_params)
django.db.utils.OperationalError: unable to open database file
What am I missing?
would by nice have a app for YunoHost
https://yunohost.org/#/packaging_apps
I added super user using manage.ph createsuperuser but I can't login Etesync server via Etesync Web client because of an error as below. I can login admin panel directly.
What's the matter?
There is no Apache error log about this.
Something went wrong!
Authentication credentials were not provided.
Stack trace:
Error: Authentication credentials were not provided.
at t (https://www.noncal.com/static/js/main.15b3646a.chunk.js:1:5629)
at new t (https://www.noncal.com/static/js/main.15b3646a.chunk.js:1:5793)
at https://www.noncal.com/static/js/main.15b3646a.chunk.js:1:12203
Hi there,
I tried to run etesync in systemd, its starts well however server appears to be down. Used the following code:
[Unit]
Description=EteSync
After=multi-user.target
[Service]
ExecStart=/home/ubuntu/server-skeleton/venv/bin/python /home/ubuntu/server-skeleton/./manage.py runserver 0.0.0.0:8000
User=ubuntu
Group=ubuntu
Type=idle
Restart=always
RestartSec=15
[Install]
WantedBy=multi-user.target
Does anything look wrong to you? I was sadly not able to spot the issue. Thanks for your help!
Hi tasn and others,
Recently, the Pi on which I host the server crashed and got corrupted.
I reverted the Pi to a backup (a full copy of the SD card), with a working EteSync server on it.
However, this server is missing a month and a half of updates, and the EteSync app won't sync to it. (saying Calendar sync failed).
What would be the best way to update the data base on my server?
In the past, I always just made a new account, imported all my old data and deleted the old account. However, it seems like there should be a better solution to this. ;-)
P.S. I have already exported all data locally on my phone, so there is no risk of losing it all.
Thanks in advance.
Kind regards,
Simon
Maybe something simple like:
try:
from etesync_site_config import *
except ImportError:
pass
at the end of settings.py
would suffice. Then PYTHONPATH
can be setup to have the module available and the settings override the default settings.
I have installed the server as instructed and the application is being served over https by Apache. I am able to log in as superuser and create/delete users and do other admin tasks. However all the clients (Android, web and python) are failing authentication with the error UNAUTHORIZED auth token
. Using the python interface, I can verify that the line
authToken = api.Authenticator(remoteUrl).get_auth_token(email, servicePassword)
returns the correct token that can be viewed in the admin panel. The line
etesync = api.EteSync(email, authToken, remote=remoteUrl)
does not report any error. But the line
etesync.sync()
fails with UNAUTHORIZED auth token
Is it possible to implement syncing with iCalendar servers? My school hosts their timetable using iCalendar and I'd like to view the events inside the etesync web client.
EteSync looks amazing! I really want to switch from Fruux to EteSync but calendar and list sharing (read-only and/or read-write) is the one feature that's keeping me away. Is it on the roadmap?
I am trying to install Etebase on a personal server following the Wiki steps.
However, when I get to the nginx setup step, I am getting the following error when trying to systemctl restart nginx
:
"upstream" directive is not allowed here in /etc/nginx/sites-enabled/etebase_nginx.conf:4
I have checked the Nginx file and it's all correct (changed the server
and the path to etebase).
Can you give some help? I don't really know why I am getting this error.
I would love to give self-hosted etesync a try, but I'd like to run it on docker. I'm willing to try this on my own, but I will probably need some time to get it right... I will share my results once I have a working solution!
After some days of fiddling I have been successful in setting up an nginx-uwsgi EteSync server instance on Arch Linux from the etesync-server AUR package.
The setup works well, but I had to edit the package-shipped settings.py
file to set a custom STATIC_ROOT
, and this is inconvenient insofar as this file will be overwritten on each package update and I have to be mindful to edit it on every such occasion.
I do not quite trust my future self enough to remember this, and it would for my use case be convenient if I were able to specify a custom STATIC_ROOT
in etesync-server.ini
.
While we are at it, other users might wish to set other variables there as well, possibly these:
STATIC_URL
LANGUAGE_CODE
TIME_ZONE
Implementing this would likely encompass these changes to settings.py
:
etesync-server.ini
file(s) accordingly.ini
file(s)I am aware of the section at the bottom that attempts to import an etesync_site_settings
Python module, but as someone who is not at all familiar with Python or with the rules of where Python looks for modules I figured I might ask about extending etesync-server.ini
before I attempt to go down that road.
i got trouble to connect with the an selfhosted etesync-server in the etesync ios app.
weblogin over etesync-web and admin-ui works fine though.
i specified
username
password
https://local.server:8080
and recieved:
Error
NetworkError: Network request failed
i activated debug logs but there is nothing besides of
[I] ConnectionfInfo: true wifi
devices is reachable and i can login from the iPhone via Mobile Browser.
any ideas how to debug this further?
thanks
I use Radicale and would like to try to switch to EteSync. But lack of versioning support stops me.
Hi,
I'm facing some issues making eteSync server working on my VPS. Installation worked well.
Here my settings:
Apache virtual host (ssl):
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName xxx.xxxxxxx.xx
<Location "/">
ProxyPass http://localhost:8000/ retry=0
ProxyPassReverse http://localhost:8000/
RequestHeader set X-Script-Name /
</Location>
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/xxx/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/xxx/privkey.pem
</VirtualHost>
</IfModule>
etesync-server.ini:
secret_file = secret.txt
debug = False
[allowed_hosts]
allowed_hosts = localhost
[database]
engine = django.db.backends.sqlite3
name = db.sqlite3
Then, when typing the command ./manage.py runserver localhost:8000
everything looks fine, but when I try to access to the web page xxx.xxxxxxxx.xx (the ServerName set up in my Apache's VirtualHost), I have a lovely "Bad Request (400)" error...
I can however access to the "admin" part of it through the http://localhost:8000 address directly on my VPS (but with no css loaded...)
Any idea of where the mistake is ?
Thanks a lot !
Romain
Hello,
in order to help packagers, would it be possible to release the server-skeleton ? I mean with a release version number :)
Regards,
I recently installed a fresh Etebase (v2, yay!).
When I run the migrations, I get
Your models have changes that are not yet reflected in a migration, and so won't be applied.
Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
The culprit appears to be myauth
:
$ docker exec -it etebase python manage.py makemigrations --dry-run
Migrations for 'myauth':
myauth/migrations/0003_auto_20201118_1651.py
- Change managers on user
- Alter field first_name on user
- Alter field username on user
This script will create an etesync user, install etesync to /opt/etesync and add a service to systemd while enabling it. It should be a good start but further configuration is recommended (for example, limiting the allowed hosts that etesync will be authorized on)
# Set needed variables
ETESYNC_HOME=/opt/etesync;
ETESYNC_GITHUB=https://github.com/etesync/server.git;
ETESYNC_APP_FOLDER=$ETESYNC_HOME/server;
# Setup etesync user
sudo groupadd etesync;
sudo useradd -m -d $ETESYNC_HOME etesync -g etesync;
sudo mkdir -p $ETESYNC_HOME;
sudo chown -R etesync:etesync $ETESYNC_HOME;
# Install Etesync
sudo apt install -y python3-venv git;
sudo -u etesync bash << EOF
git clone $ETESYNC_GITHUB $ETESYNC_APP_FOLDER;
python3 -m venv $ETESYNC_APP_FOLDER/venv;
. $ETESYNC_APP_FOLDER/venv/bin/activate;
python3 -m pip install wheel;
python3 -m pip install gunicorn;
python3 -m pip install -r $ETESYNC_APP_FOLDER/requirements.txt;
cp $ETESYNC_APP_FOLDER/etesync-server.ini.example $ETESYNC_APP_FOLDER/etesync-server.ini;
sed -i 's/allowed_host1 = example.com/allowed_host1 = */g' $ETESYNC_APP_FOLDER/etesync-server.ini;
sed -i "s@secret_file = secret.txt@secret_file = $ETESYNC_APP_FOLDER/secret.txt@g" $ETESYNC_APP_FOLDER/etesync-server.ini;
python3 $ETESYNC_APP_FOLDER/manage.py migrate;
EOF
# Setup static files
sudo mkdir -p /srv/http/etesync_server/static;
sudo chown -R etesync /srv/http/etesync_server;
sudo -u etesync bash << EOF
ln -s /srv/http/etesync_server/static $ETESYNC_APP_FOLDER/static;
python3 $ETESYNC_APP_FOLDER/manage.py collectstatic;
EOF
# Create the Systemd Service
sudo tee /lib/systemd/system/etesync.service > /dev/null << EOF
[Unit]
Description=Etesync gunicorn server
[Service]
User=etesync
Group=etesync
WorkingDirectory=$ETESYNC_APP_FOLDER
ExecStart=$ETESYNC_APP_FOLDER/venv/bin/gunicorn -b 0.0.0.0 etesync_server.wsgi:application
#Restart=always
KillSignal=SIGQUIT
Type=notify
NotifyAccess=all
[Install]
WantedBy=multi-user.target
EOF
# Enable and Start the service
sudo systemctl daemon-reload;
sudo systemctl enable etesync.service;
sudo systemctl start etesync.service;
TODO: Create a pull request to merge it into the repo
TODO: Create an update script to complement this one as well
Hey there,
i installed etesync on a debian vps with these tutorials in combination:
When i am opening my browser and go to https://etesync.mydomain.de/admin/ i can see my django admin backend. When i am trying to login i get the error "Server Error (500)". I am not that used to django or virtualenv so i am really struggeling finding the error... Do someone have an idea?
I attached my config files.
etesync_nginx.conf.txt
uwsgi.ini.txt
etesync-server.ini.txt
Thanks for your help!
Lukas
My Steps are these:
1.
or
edit to:
[global]
secret_file = secret.txt
debug = false
[allowed_hosts]
allowed_host1 = *
[database]
engine = django.db.backends.sqlite3
name = db.sqlite3
Reachable under: http://etesync.mydomain.de:8000/
und: http://94.130.226.255:8000/
stop debug server with control+c
stop with control+c
Edit:
upstream django {
# server unix:///tmp/etesync_server.sock; # for a file socket
server 127.0.0.1:8001; # for a web port socket (we'll use this first)
}
server {
# the port your site will be served on
listen 8000;
# the domain name it will serve for
server_name etesync.mydomain.de; # substitute your machine's IP address or domain name
charset utf-8;
# max upload size
client_max_body_size 75M; # adjust to taste
location /static {
alias /home/luke/server-skeleton/static; # Project's static files
}
# Finally, send all non-media requests to the Django server.
location / {
uwsgi_pass django;
include /etc/nginx/uwsgi_params; # the uwsgi_params file, this path by default
}
}
sudo cp etesync_nginx.conf /etc/nginx/sites-available/
sudo ln -s /etc/nginx/sites-available/etesync_nginx.conf /etc/nginx/sites-enabled/etesync_nginx.conf
systemctl restart nginx
uwsgi --socket :8001 --module etesync_server.wsgi
(wokring: uwsgi --http :8001 --module etesync_server.wsgi --virtualenv venv)
Edit:
upstream django {
server unix:///tmp/etesync_server.sock; # for a file socket
# server 127.0.0.1:8001; # for a web port socket (we'll use this first)
}
Edit:
[uwsgi]
chdir = /home/luke/server-skeleton/
socket = /tmp/etesync_server.sock
chown-socket = luke:www-data
chmod-socket = 660
module = etesync_server.wsgi
master = true
uid = luke
virtualenv = venv
Edit:
[Unit]
Description=Execute the etesync server.
[Service]
ExecStart=/usr/local/bin/uwsgi --ini /home/luke/server-skeleton/uwsgi.ini
[Install]
WantedBy=multi-user.target
Edit:
static_root = /home/luke/server-skeleton/static
Can a cross-browser extension be provided for Firefox, Chrome, and Chromium, along with a corresponding service, to store encrypted bookmarks? Thanks.
This may actually be a part of a broader cross-browser syncing service which also syncs other browser activities, all encrypted.
I have multiple calendars set up so I can color-code my events, but I can't seem to move events between calendars. I can create new events in all calendars. This happens both in my phone's calendar app and the etesync web client.
https://github.com/etesync/server/wiki/Production-setup-using-Daphne-and-Nginx
I had to make a small modification to my nginx .conf file in order for static files to work based on:
https://stackoverflow.com/a/25123835/13909996
Removing the trailing /
worked to fix my static files 404 errors.
I think that Etesync 2.0 is great, with using a single password, but having a second factor would be awesome. I think the signing in to the account and the web client should have a configurable 2 Factor with TOTP/U2F. I think it would be useful to have both, as I know not everyone owns a Yubikey.
I also think that the apps need to support it as well, so that we cannot login without 2FA, if 2FA is setup.
This affects the Arch Linux AUR package etesync-server-0.2.1-1
, see this comment.
I do not know if this issue was already fixed in this git repository.
The last version of Django REST framework that works is 3.10.
3.11, which Arch Linux recently rolled out, produces this error when a mobile client tries to sync:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/lib/python3.8/site-packages/django/core/handlers/base.py", line 100, in _get_response
resolver_match = resolver.resolve(request.path_info)
File "/usr/lib/python3.8/site-packages/django/urls/resolvers.py", line 544, in resolve
for pattern in self.url_patterns:
File "/usr/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/lib/python3.8/site-packages/django/urls/resolvers.py", line 588, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/lib/python3.8/site-packages/django/urls/resolvers.py", line 581, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "./etesync_server/urls.py", line 31, in <module>
journals_router.register(r'members', views.MembersViewSet, base_name='journal-members')
TypeError: register() got an unexpected keyword argument 'base_name'
I apologize for this request being submitted in the wrong place, but I think it deserves to be on public record. I request that the paid EteSync service provide a lifetime plan. Typically a lifetime of use can perhaps be modeled on average as 25 years (but the service would not be restricted to any such number). Because the subscriber pays all at once, a substantial discount is offered. I advise providing a full lifetime plan for the cost of 10 years, i.e. $240, and certainly no higher than $288. Obviously, if you make it $288 instead of $240, fewer users will subscribe to it, and so it could hurt. Either way, this will get your company a little extra cash when it probably needs it the most. As a prospective subscriber, this will also give me significant peace of mind to know that I can continue to use the service.
I know your able to host a eyesync server for yourself, however it will be great if you allow anyone to host it as a service. This way anyone can host a etesync service, choose the free storage size, free trail period length, paid account price, etc.
I am not against etesync but this will make the etesync ecosystem federated which will reduce censorship and allow anyone to host a etesync service and set their own rules. Simular to how Mastodon and Peertube works but for contacts and calendars.
Hi,
I just tried to install EteSync, never had any issues installing an older EteSync version, but it seems 2.0 is not working as expected.
I am always left with:
DisallowedHost at /
Invalid HTTP_HOST header: 'mydomain'. You may need to add 'mydomain' to ALLOWED_HOSTS.
In etesync-server.ini
I have set allowed_host1 = mydomain
. Unsure why I am not able to visit the website. As mentioned I never experienced such issue with previous versions. Installation went just smooth.
Thanks for your help!
$ pip install -r requirements.txt
Collecting git+git://github.com/etesync/[email protected] (from -r requirements.txt (line 5))
Cloning git://github.com/etesync/journal-manager (to revision v0.5.2) to /tmp/pip-req-build-8AwLt_
Collecting Django<2.0.999,>=2.0.5 (from -r requirements.txt (line 1))
Could not find a version that satisfies the requirement Django<2.0.999,>=2.0.5 (from -r requirements.txt (line 1)) (from versions: 1.1.3, 1.1.4, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.7, 1.3, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.4, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 1.4.14, 1.4.15, 1.4.16, 1.4.17, 1.4.18, 1.4.19, 1.4.20, 1.4.21, 1.4.22, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9, 1.5.10, 1.5.11, 1.5.12, 1.6, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.6.7, 1.6.8, 1.6.9, 1.6.10, 1.6.11, 1.7, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 1.7.9, 1.7.10, 1.7.11, 1.8a1, 1.8b1, 1.8b2, 1.8rc1, 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.8.8, 1.8.9, 1.8.10, 1.8.11, 1.8.12, 1.8.13, 1.8.14, 1.8.15, 1.8.16, 1.8.17, 1.8.18, 1.8.19, 1.9a1, 1.9b1, 1.9rc1, 1.9rc2, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6, 1.9.7, 1.9.8, 1.9.9, 1.9.10, 1.9.11, 1.9.12, 1.9.13, 1.10a1, 1.10b1, 1.10rc1, 1.10, 1.10.1, 1.10.2, 1.10.3, 1.10.4, 1.10.5, 1.10.6, 1.10.7, 1.10.8, 1.11a1, 1.11b1, 1.11rc1, 1.11, 1.11.1, 1.11.2, 1.11.3, 1.11.4, 1.11.5, 1.11.6, 1.11.7, 1.11.8, 1.11.9, 1.11.10, 1.11.11, 1.11.12, 1.11.13)
No matching distribution found for Django<2.0.999,>=2.0.5 (from -r requirements.txt (line 1))
Hi,
I'm trying to install v0.5.2 on Uberspace using the following guide: https://lab.uberspace.de/guide_etesync-server.html . However, the migrate step fails with the following error:
MySQLdb._exceptions.OperationalError: (1170, "BLOB/TEXT column 'uid' used in key specification without a key length")
I have attached the full stack trace and my etebase-server.ini.
stacktrace.txt
etebase-server.ini.txt
It is difficult to guess who hold copyright for which parts of this project, and which licensing terms those copyright holders grant for which parts.
Please consider adding copyright + licensing boilerplate on top of all code files (and if adding PNG or SVG files then embed such information as EXIF or RDF data as appropriate).
Similar issue: etesync/etesync-dav#114
The connexion nginx <-> uwsgi <-> server not very easy
And
pip install -r requirements.txt won't work anymore
pip3 install -r requirements.txt
Please redo your doc with real example thank you in advance
Hi tasn,
Today I finally found the time to update my self hosted EteSync server to the EteBase server.
For the EteSync 1.0 installation, I created 4 new wiki pages detailing how to do this.
I followed these for EteBase, and there are no major differences except the name change, and that you should checkout the correct branch when cloning.
My question now is: do I change these wiki pages to represent the move to EteSync 2.0?
Or would you prefer that I create 4 separate pages, specifically for EteBase? Then in the future, we could simply remove the old EteSync 1.0 installation.
Hi!
I tried to migrate to Etesync 2.0 but when trying to connect to the server using the android client I get the error:
HTTP error 400! Code: 'wrong_host'.
Detail: 'Found wrong host name. Got:
"etesync.user.host.net" expected "user.local.host.net:<port>"
Due to the infrastructure of the hoster I use, I have a apache rewrite rule which maps the global url etesync.user.host.net
to the internal url user.local.host.net:<port>
. I have added the global url to CSRF_TRUSTED_ORIGINS
and the local one to allowed_hosts
. The setup works fine with the old server, but doesn't work with Etesync 2.0
I already checked views.py but wasn't able to find out which settings might help to get rid of this error.
I have an openLDAP instance on my server running against which most of my services authenticate. EteSync doesn't support this. As such, I patched the EteSync server to also authenticate against an LDAP server.
With this issue I wanted to ask whether there is demand for such a feature. If there is, I would create a PR with my changes.
I'm fairly computer-savvy but still learning, so I'm currently unfamiliar with some of the processes described in the readme. In other words, I tried to set up a self-hosted etesync server, it didn't work, and I have no idea why because the instructions are so bare-bones. Here's what I did (trying to install on Windows 10)...
git clone https://github.com/etesync/server-skeleton.git
cd server-skeleton
#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
So far so good. Instructions said Windows users could skip installing virtualenv, so I went straight from cd server-skeleton
to pip install -r requirements.txt
. I also went ahead and renamed the easy config file because I'm not familiar with Django.
manage.py migrate
This output a nice list of "Applying [whatever]... OK" with no errors so I'm assuming that did what it's supposed to.
manage.py runserver 0.0.0.0:8000
This outputs the following:
System check identified no issues (0 silenced).
[this is just the date and time]
Django version 2.1.12, using settings 'etesync_server.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CTRL-BREAK
And honestly I have no idea what to do from here. Opening "http://0.0.0.0:8000/" in a web browser just throws an "unable to connect" page. The readme says to run the debug server to make sure everything works as expected, but it's unclear what that means, or what to do if it doesn't.
The links in the Production Deployment section were not particularly helpful, as the first requires an in-depth understanding of Django, and while the second looks more user-friendly, there's a major roadblock: It is a known issue that uwsgi can't be installed on Windows. If we move on from here:
There are more details about a proper production setup in the wiki.
No, there aren't.
And lastly:
manage.py createsuperuser
Thankfully, this step actually appeared to work. However, it's functionally useless if the server remains inaccessible.
Etesync's documentation assumes everyone has the same level of experience and knowledge as the developer. I'll admit that I might be less knowledgeable than the average etesync user, but this is an unreasonably high barrier to entry. The User Guide for the app is much more informative and accessible, and it would be nice if the instructions here were at a reasonably similar level.
I hope this doesn't come across as too rant-y, because I know the devs are hardworking people. I don't expect you to write out every step for the person who has never touched a computer before. But a bit more explanation and description would go a long way. At the very least, it might be a good idea to list of the programs that will be needed in order to accomplish this. The documentation indicates that this can be set up on any system that can run Python, and while that's true, it doesn't mention that you'll also need to be familiar with Django, nginx, uWBSI or WBSI or possibly Apache, etc. At least users would know whether they have the skills and software required to do it successfully.
Ideally, there would be a pre-built installation package for Windows, but again I understand that the devs are only human, and building packages takes time. Thanks for taking the time to read my pseudo-rant, and I hope it has provided some useful and not-too-annoying feedback.
What if someone doesn't want to use Git? [ for example, doesn't like the directory into which Git "forces" the install ]
Would the following steps work?
copy repository into /my_special/ETE_directory
cd /my_special/ETE_directory
virtualenv3 .venv
source .venv/bin/activate
pip install -r requirements.txt
Any "gotcha's" with this idea?
It would be great if you clarified and/or improved the self-hosting options a bit. I know a large number of people don't want to use Git and/or pip.
Would it be possible for you to setup an APT repository to achieve a "simpler" self hosted install? Most server admins would be very familiar with this (even while possibly not so familiar with Git and/or pip when they are not necessarily developers).
This might seem a bit counter to your desires to monetize https://www.etesync.com/ , but I think the constructive feedback you would get from "power users" might be well worth it in the long run.
Thanks for your consideration!
I have been trying to setup uwsgi
however I run into a few issues.
I have set my etesync.ini
as follows:
[uwsgi]
socket = /tmp/etesync.sock
chown-socket = ubuntu:www-data
chmod-socket = 660
vacuum = true
uid = ubuntu
chdir = /mnt/HDD/server-skeleton
home = %(chdir)/.venv
module = etesync_server.wsgi
master = true
The error I am getting right now in the log file when I restart uwsgi (sudo service uwsgi restart
) is:
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
(I did google the error however I was not able to solve the issue)
I am also not sure, once I get the uwsgi working how do I start it?
In my etesync venv home folder with:
uwsgi --http :8000 --module etesync_server.wsgi
?
Thanks for your help, it is much appreciated.
I am looking for the creation of a package on OpenWrt. It would be nice, if we can install a superuser such that its password must be changed, when visiting /admin/login
the first time.
Something like setting the password to unusable
and force a change on the LoginView, like described at SO.
Unfortunately, I do not know much about Django.
Do you think, this would be a good idea at all?
I have created script to install etesync server on alpine linux vm. Tested on alpine 3.12. Basically you need to adjust the first 5 variables with your setup. It will automatically generate self signed certificates and serve using nginx. Most importantly, reboot after running this script.
#! /bin/sh
REPO="/home/alpine/etebase"
USER="alpine"
GROUP="alpine"
DOMAIN="etesync.mydomain.com"
PASSWORD="passwd"
## as root
echo -n "Enter root "
su -c "apk add git gcc make musl-dev python3-dev libffi-dev postgresql-dev nginx openssl openrc \
&& openssl req -x509 -nodes -sha256 -subj '/CN=localhost' -newkey rsa:4096 -keyout /etc/ssl/self-signed.key -out /etc/ssl/self-signed.cert -days 3650 \
&& rc-update add nginx \
&& wget -O - https://bootstrap.pypa.io/get-pip.py | python3 \
&& pip install pipenv \
&& tee /etc/nginx/conf.d/default.conf > /dev/null << EOF
ssl_certificate /etc/ssl/self-signed.cert;
ssl_certificate_key /etc/ssl/self-signed.key;
server {
listen 443 ssl;
# listen [::]:443 ssl;
location / {
proxy_set_header Host $DOMAIN;
proxy_pass http://127.0.0.1:8000/;
}
}
EOF"
## as non-root user
cd ~ || exit
git clone https://github.com/etesync/server.git etebase
cd etebase || exit
pipenv install
pipenv install gunicorn
# server config
echo "$PASSWORD" > secret.txt
pipenv run ./manage.py migrate
echo "Create super user"
pipenv run ./manage.py createsuperuser
tee etebase-server.ini > /dev/null << EOF
[global]
secret_file = secret.txt
debug = false
[allowed_hosts]
allowed_host1 = 127.0.0.1
allowed_host2 = $DOMAIN
[database]
engine = django.db.backends.sqlite3
name = db.sqlite3
EOF
# uwsgi file
tee etebase.ini > /dev/null << EOF
[uwsgi]
socket = $REPO/etebase.sock
chown-socket = $USER:$GROUP
chmod-socket = 660
vacuum = true
plugins = python3
uid = etebase
chdir = $REPO
module = etebase_server.wsgi
master = true
EOF
# test
# test 1 > pipenv run ./manage.py runserver 0.0.0.0:8000
# test 2 > pipenv run gunicorn -b 0.0.0.0 etebase_server.wsgi
# install cronjob
tee run.sh > /dev/null << EOF
#! /bin/sh
cd "$(readlink -f "$0" | xargs dirname)"
pipenv run gunicorn -b 127.0.0.1 etebase_server.wsgi
EOF
chmod +x run.sh
(crontab -l 2>/dev/null; echo "@reboot $REPO/run.sh") | crontab -
Hi,
Today I created a self-hosted instance of the EteBase server.
As mentioned in the readme, I created an admin user, and then used it to login and created a normal user.
However, now when I want to login through the etesync-dav bridge or using the online login (https://pim.etesync.com/login) I get the error User not properly init
.
When trying to login using my admin account, I get the exact same error.
Did I miss a step anywhere? Thanks in advance.
Hi @tasn,
Recently I made a Reddit post in which I said I was planning on updating documentation for a basic installation of the server. Currently, the README points to the wiki for details on a proper production setup, but no such page exists yet. I was wondering: how would I go about updating the wiki?
Last weekend, I reinstalled an EteSync server on my Raspberry Pi, and wrote down everything I did to make it work. From this, I constructed a tutorial page specifically for the Raspberry Pi, on how to install the server using uWSGI and Nginx, on my personal website.
Now I would like to add a generic install guide (so not just for the Pi) to the wiki. It would detail how to pull the repo, setting up uWSGI (using a socket file), setting up Nginx and finally setting up TLS. It would be Ubuntu-specific, but converting it to Arch or Fedora is rather simple. All the information for the setup I got from the uWSGI wiki and the example setup files already included in the repo.
Kind regards,
Saltfactory
https://github.com/etesync/server/wiki/Run-Daphne-at-boot
The filename you say to create is etebase_server.service
, but then the commands to start and enable the service at the bottom of the page use the filename etesync_server.service
.
Needs to be reconciled. :)
With a self-hosted server I cannot login/create account with a new user on the Android app.
Successfully created a new user as an admin on the website - but when doing the "add account" section with the advanced settings to the put the custom IP address in the Android app to basically login, no matter what I try, I can't login. The server is clearly showing the attempt, so it's successfully connecting, but keeps suggesting the login details are wrong despite constantly double-checking that everything is correct.
Did something change? What used to be the "username" field is now an "Email" field in the app. I tried adding emails to the user in question and using the email address to try logging in but that never worked either.
Thanks for any help!
I have hosted the server and created the superuser with password. I'm able to login into the both notes and sync app in Android and iOS. But from the Usage section it is mentioned that "create a new user to be used with the service. Do not set a password for the user, as Etebase uses a zero-knowledge proof for authentication.". When I navigate to my domain https://domain/admin i see the DJango login page. I can use the super user but I'm not able to create an use without a password. Can you please direct me to any resource on how to do that?
Is it safe that having a super user at all?
If so Iโm connecting the sync server with that password that means anyone who has the access to the sqlite db can unlock it?
Thanks!
Hi!
I'm trying to setup etesync under a "subdirectory" using nginx and uwsgi.
For the sake of completeness, I'm using this docker image for etesync.
Now... If I go to the domain, appending "/etesync" to it (so say mydomain.com/etesync), the page "It works!" appear. However, If I go to "/etesync/admin", it go back to "/admin", effectively not showing the admin page. This is the nginx configuration I'm using.
I also tried setting "ETESYNC_DAV_URL=/etesync". Doing so, also "BASE_DIR" appear to be the same.
upstream django {
# server unix:///tmp/etesync_server.sock; # for a file socket
server 192.168.1.4:3735; # for a web port socket (we'll use this first)
}
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
root /config/www/mydomain.com;
index index.html index.htm index.php;
server_name mydomain.com;
location /etesync {
return 301 $scheme://$host/etesync/;
}
location ^~ /etesync/ {
uwsgi_pass django;
include /etc/nginx/uwsgi_params; # the uwsgi_params file, this path by default
proxy_set_header X-Script-Name /etesync;
proxy_set_header SCRIPT_NAME /etesync;
rewrite /etesync(.*) $1 break;
proxy_redirect off;
proxy_buffering off;
proxy_set_header X-Forwarded-Port $server_port;
proxy_cookie_path / "/; HTTPOnly; Secure";
proxy_set_header Authorization $http_authorization;
proxy_pass_header Authorization;
}
# all ssl related config moved to ssl.conf
include /config/nginx/ssl.conf;
client_max_body_size 75M;
location / {
try_files $uri $uri/ /index.html /index.php?$args =404;
}
}
However, if I use etesync on the domain directly, without the subdirectory (and not setting the environment variable), everything loads! So I'm surely missing something here. The configuration that works on the domain is the following:
# DJANGO FROM ABOVE
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name mydomain.com;
# all ssl related config moved to ssl.conf
include /config/nginx/ssl.conf;
client_max_body_size 75M;
location / {
uwsgi_pass django;
include /etc/nginx/uwsgi_params; # the uwsgi_params file, this path by default
proxy_redirect off;
proxy_buffering off;
proxy_set_header X-Forwarded-Port $server_port;
proxy_cookie_path / "/; HTTPOnly; Secure";
proxy_set_header Authorization $http_authorization;
proxy_pass_header Authorization;
}
}
Hope somebody have an idea.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.