mirror of
https://github.com/etesync/server
synced 2025-07-13 18:48:10 +00:00
Clone v1 page
parent
bffac9360d
commit
db5e3a4021
31
Run-Daphne-at-boot.md
Normal file
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.
|
Loading…
Reference in New Issue
Block a user