diff --git a/Basic-Setup-EteSync-2.0.md b/Basic-Setup-EteSync-2.0.md deleted file mode 100644 index 2820141..0000000 --- a/Basic-Setup-EteSync-2.0.md +++ /dev/null @@ -1,67 +0,0 @@ -This guide details an initial setup of an EteSync server. -It is specifically written for Ubuntu, but you should be able to use it as a guide for different systems as well. -Making a separate user to run the application is also recommended. - -### Download EteSync server -First we install the [Python virtual environment](https://docs.python.org/3/tutorial/venv.html) package, clone the repo, set up the virtual environment and install the Python dependencies. - -``` -apt-get install python3-virtualenv - -cd ~ # To set up the server in your home dir -git clone https://github.com/etesync/server-skeleton.git -cd server-skeleton - -virtualenv -p python3 venv # If doesn't work, try: virtualenv3 venv -source venv/bin/activate - -pip3 install -r requirements.txt -``` - -### Configure the application - -To configure the application, you need a Django `.ini` file. -Luckily, the repo already contains a basic ini called `etesync-server.ini.example` which we can copy. - -``` -cp etesync-server.ini.example etesync-server.ini -``` - -Open the file, and set allowed hosts to `*`. (Note: this is just for testing purposes. **Set this to your domain name later**.) - -It should now look like this: - -``` -[global] -secret_file = secret.txt -debug = false -;Advanced options, only uncomment if you know what you're doing: -;static_root = /path/to/static -;static_url = /static/ -;language_code = en-us -;time_zone = UTC - -[allowed_hosts] -allowed_host1 = example.com - -[database] -engine = django.db.backends.sqlite3 -name = db.sqlite3 -``` - -### Test the application - -After initialising the server, you can run it for the first time. - -``` -./manage.py migrate -./manage.py runserver 0.0.0.0:8000 -``` - -On the machine, you can now surf to `localhost:8000` and it should show a page saying "It works!" -If you're on a different machine than the one running the server, surf to its local IP address followed by the portnumber, e.g. `192.168.x.x:8000`. - -If this works, congratulations! -You now have a functioning Django application. - -**Using this server in production is not recommended, so please continue to [this page](https://github.com/etesync/server/wiki/Production-setup-using-uWSGI-and-Nginx) to set up a proper deployment.** \ No newline at end of file diff --git a/Basic-Setup-Etebase-(EteSync-v2).md b/Basic-Setup-Etebase-(EteSync-v2).md new file mode 100644 index 0000000..6bdc30a --- /dev/null +++ b/Basic-Setup-Etebase-(EteSync-v2).md @@ -0,0 +1,74 @@ +This guide details an initial setup of an Etebase server. +It is specifically written for Ubuntu/Debian, but you should be able to use it as a guide for different systems as well. + +Making a separate user to run the server is also recommended, but not necessary. + +### Download Etebase server +First we install the [Python virtual environment](https://docs.python.org/3/tutorial/venv.html) package, clone the repo, set up the virtual environment and install the Python dependencies. +We use a virtual environment as this avoids having to install the dependencies system-wide. + +``` +$ apt-get install python3-virtualenv + +$ cd ~ # To set up the server in your home dir +$ git clone https://github.com/etesync/server etebase +$ cd etebase +$ git checkout etebase + +$ virtualenv -p python3 venv # If doesn't work, try: virtualenv3 venv +$ source venv/bin/activate + +$ pip3 install -r requirements.txt +``` + +### Configure Application + +Since the Etebase server is a Django application, we will refer to it as "the application" from now on. + +To configure the application, you need a Django `.ini` file. +Luckily, the repo already contains a basic ini called `etebase-server.ini.example` which we can copy. + +``` +$ cp etesync-server.ini.example etesync-server.ini +``` + +Open the file, and set allowed hosts to `*`. (Note: this is just for testing purposes. **Set this to your domain name later**.) + +It should now look like this: + +``` +[global] +secret_file = secret.txt +debug = false +;Advanced options, only uncomment if you know what you're doing: +;static_root = /path/to/static +;static_url = /static/ +;language_code = en-us +;time_zone = UTC + +[allowed_hosts] +allowed_host1 = * + +[database] +engine = django.db.backends.sqlite3 +name = db.sqlite3 +``` + +### Test the application + +After initializing the server, we can test it by running it for the first time. +We will do this by running the server at port `8000`. + +``` +$ ./manage.py migrate +$ ./manage.py runserver 0.0.0.0:8000 +``` + +On the machine, you can now surf to `localhost:8000` and it should show a page saying "It works!" +If you're on a different machine than the one running the server, surf to its local IP address followed by the port number, e.g. `192.168.x.x:8000`. + +If this works, congratulations! +You now have a functioning Django application. +This is not yet a production setup however. + +**Using this server in production is not recommended, so please continue to [this page](https://github.com/etesync/server/wiki/Production-setup-using-Daphne-and-Nginx) to set up a proper deployment.** \ No newline at end of file