Run as the current user instead of a dedicated system user, using systemd user service in ~/.config/systemd/user/. This avoids needing root for setup and keeps uv and the project in the user's home directory. Rename service file to matrix-paperless-ingest.service.
17 lines
396 B
Desktop File
17 lines
396 B
Desktop File
[Unit]
|
|
Description=Matrix to Paperless-ngx ingest bot
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
WorkingDirectory=%h/matrix-paperless-ingest
|
|
EnvironmentFile=%h/matrix-paperless-ingest/.env
|
|
ExecStart=%h/.local/bin/uv run --no-sync python ingest.py
|
|
Restart=on-failure
|
|
RestartSec=10
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
|
|
[Install]
|
|
WantedBy=default.target
|