Check the output to find the config directory. You might want to run it as a different user tho.
There is also a systemctl unit file that you probably need to change to your needs
In production it makes sense to run stechuhr with gunicorn:
## Deployment
```bash
source env/bin/activate
gunicorn stechuhr_server.server:app
```
The _stechuhr-server_ is meant to run behind a reverse proxy server (e.g. NGINX) and as a systemd service on a Linux system. Gunicorn acts as a runner.
Follow the steps listed above in _Run with python3-ven in production_. To install the stechuhr server. If the software runs in an initial test we need to set up a production environment
1. Create a user called `wwwrun`
2. Copy the systemd unit file `stechuhr-server.service` to `/etc/systemd/system/stechuhr-server.service` and have a look at it. Note the line where it says:
This is where the stechuhr-server default config will be created on first startup. Make sure the user `wwwrun` is allowed to write the file there`
3. Copy the stechuhr-server directory to `/srv/stechuhr-server`
4. Create the directory `/srv/stechuhr-data` and `chown wwwrun:wwwrun /srv/stechuhr-data`
5. Enable the service via `systemctl enable stechuhr-server`
6. Start the service via `systemctl start stechuhr-server`
7. Check the status via `systemctl status stechuhr-server` or display the log via `journalctl -fu stechuhr-server`
After first start the default config file should be created, have a look at it and change the defaults (e.g. with `vim /etc/stechuhr-server/config.toml`). To update the changes run `systemctl restart stechuhr-server`.
To make the server reachable from the outside a reverse proxy (like NGINX) needs to be setup. For this have a look at the example configuration file: `stechuhr.server.nginx.config` You may need to change a few things like the host or proxy_pass port.