1
0
mirror of https://github.com/etesync/server synced 2025-04-24 04:09:02 +00:00

Clone v1 page

Simon Vandevelde 2020-09-27 14:00:25 +02:00
parent bffac9360d
commit db5e3a4021

31
Run-Daphne-at-boot.md Normal file

@ -0,0 +1,31 @@
Having to run uWSGI manually is annoying and not maintainable.
Instead, you should have `systemd` automatically start it at boot for you.
We can have `systemd` handle lauching uWSGI by creating a unit file for it.
Create a new file called `etesync_server.service` and paste in the following.
Don't forget to set the correct path to your installation.
If you don't use a `.ini` file, pass flags here to your uWSGI.
```
[Unit]
Description=Execute the etesync server.
[Service]
ExecStart=/usr/local/bin/uwsgi --ini /path/to/server-skeleton/uwsgi.ini
[Install]
WantedBy=multi-user.target
```
Next, copy this to `/etc/systemd/system`.
`systemd` should now be able to start it.
By also enabling it, it will launch at boot.
```
sudo cp etesync_server.service /etc/systemd/system
sudo systemctl start etesync_server
sudo systemctl enable etesync_server
```
Check to see if it worked!
If it didn't work, use the command `sudo systemd status etesync_server` to see what went wrong.