From b08a87f70dca59056fc3fb38ebb5a8c0971cf690 Mon Sep 17 00:00:00 2001 From: Git'Fellow <12234510+solracsf@users.noreply.github.com> Date: Thu, 25 Jun 2026 21:32:09 +0200 Subject: [PATCH] docs: revise AI worker systemd service file andt instructions Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> --- admin_manual/ai/overview.rst | 46 ++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/admin_manual/ai/overview.rst b/admin_manual/ai/overview.rst index cb59310b04a..795ffb16315 100644 --- a/admin_manual/ai/overview.rst +++ b/admin_manual/ai/overview.rst @@ -368,31 +368,27 @@ Systemd service .. code-block:: - [Unit] - Description=Nextcloud AI worker %i - After=network.target - - [Service] - ExecStart=/opt/nextcloud-ai-worker/taskprocessing.sh %i - Restart=always - StartLimitInterval=60 - StartLimitBurst=10 - - [Install] - WantedBy=multi-user.target - -2. Create a shell script in ``/opt/nextcloud-ai-worker/taskprocessing.sh`` with the following content and make sure to make it executable: - -.. code-block:: - - #!/bin/sh - echo "Starting Nextcloud AI Worker $1" - cd /path/to/nextcloud - sudo -E -u www-data php occ taskprocessing:worker -v -t 60 - -You may want to adjust the timeout to your needs (in seconds). - -3. Enable and start the service 4 or more times: + [Unit] + Description=Nextcloud AI worker %i + After=network-online.target + Wants=network-online.target + StartLimitIntervalSec=60 + StartLimitBurst=10 + + [Service] + User=www-data + Group=www-data + WorkingDirectory=/path/to/nextcloud + ExecStart=/usr/bin/php occ taskprocessing:worker -v -t 60 + Restart=always + RestartSec=2 + + [Install] + WantedBy=multi-user.target + +You may want to adjust the timeout (-t 60) to your needs (in seconds). + +2. Enable and start the service 4 or more times: .. code-block::