I messed up the web server -- how to restore?

I think it was UTC and I changed it to Europe/Berlin. Might this have any relevance?

No I do not think so.

Can you try this:

snap find grocy
root@syncloud:~# snap find grocy
Name   Version  Developer  Notes  Summary
grocy  34                  -      Grocy
snap restart grocy
systemctl status snap.grocy.*
root@syncloud:~# snap restart grocy
error: cannot perform the following tasks:
- restart of [grocy.nginx grocy.php-fpm grocy.postgresql] (# systemctl restart snap.grocy.nginx.service snap.grocy.php-fpm.service snap.grocy.postgresql.service
Job for snap.grocy.postgresql.service failed because the control process exited with error code.
See "systemctl status snap.grocy.postgresql.service" and "journalctl -xe" for details.
)
- restart of [grocy.nginx grocy.php-fpm grocy.postgresql] (exit status 1)
root@syncloud:~# systemctl status snap.grocy.*
● snap.grocy.postgresql.service - Service for snap application grocy.postgresql
   Loaded: loaded (/etc/systemd/system/snap.grocy.postgresql.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2023-05-08 18:53:08 UTC; 2min 34s ago
  Process: 1584 ExecStart=/usr/bin/snap run grocy.postgresql (code=exited, status=1/FAILURE)

May 08 18:53:08 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 18:53:08 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 5.
May 08 18:53:08 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
May 08 18:53:08 syncloud systemd[1]: snap.grocy.postgresql.service: Start request repeated too quickly.
May 08 18:53:08 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 18:53:08 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.

● snap.grocy.php-fpm.service - Service for snap application grocy.php-fpm
   Loaded: loaded (/etc/systemd/system/snap.grocy.php-fpm.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2023-05-08 18:53:07 UTC; 2min 35s ago
  Process: 1484 ExecStart=/usr/bin/snap run grocy.php-fpm (code=exited, status=0/SUCCESS)
 Main PID: 1544 (ld-2.28.so)
   CGroup: /system.slice/snap.grocy.php-fpm.service
           ├─1544 /snap/grocy/34/php/lib/arm-linux-gnueabihf/ld-2.28.so --library-path /snap/grocy/34/php/lib/arm-linux-gnueabihf:/snap/grocy/34/php/usr/lib/arm-linux-gnueabihf:/snap/grocy/34/php/usr/lib:/snap/grocy/34/php/usr/lib/arm-linux-gnueabihf/samba php-fpm: master process (/var/snap/grocy/34/config/php-fpm.conf)
           ├─1545 /snap/grocy/34/php/lib/arm-linux-gnueabihf/ld-2.28.so --library-path /snap/grocy/34/php/lib/arm-linux-gnueabihf:/snap/grocy/34/php/usr/lib/arm-linux-gnueabihf:/snap/grocy/34/php/usr/lib:/snap/grocy/34/php/usr/lib/arm-linux-gnueabihf/samba php-fpm: pool www
           └─1546 /snap/grocy/34/php/lib/arm-linux-gnueabihf/ld-2.28.so --library-path /snap/grocy/34/php/lib/arm-linux-gnueabihf:/snap/grocy/34/php/usr/lib/arm-linux-gnueabihf:/snap/grocy/34/php/usr/lib:/snap/grocy/34/php/usr/lib/arm-linux-gnueabihf/samba php-fpm: pool www

May 08 18:53:06 syncloud systemd[1]: Starting Service for snap application grocy.php-fpm...
May 08 18:53:07 syncloud grocy.php-fpm[1544]: [NOTICE] fpm is running, pid 1544
May 08 18:53:07 syncloud grocy.php-fpm[1544]: [NOTICE] ready to handle connections
May 08 18:53:07 syncloud systemd[1]: Started Service for snap application grocy.php-fpm.

● snap.grocy.nginx.service - Service for snap application grocy.nginx
   Loaded: loaded (/etc/systemd/system/snap.grocy.nginx.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2023-05-08 18:53:07 UTC; 2min 35s ago
 Main PID: 1549 (nginx)
   CGroup: /system.slice/snap.grocy.nginx.service
           ├─1549 nginx: master process /snap/grocy/34/nginx/sbin/nginx -c /snap/grocy/current/config/nginx.conf -p /snap/grocy/34/nginx -e stderr
           ├─1580 nginx: worker process
           ├─1581 nginx: worker process
           ├─1582 nginx: worker process
           └─1583 nginx: worker process

May 08 18:53:07 syncloud systemd[1]: Started Service for snap application grocy.nginx.
root@syncloud:~# journalctl -xe
-- 
-- The job identifier is 1993.
May 08 18:59:46 syncloud grocy.postgresql[1719]: pg_ctl: cannot be run as root
May 08 18:59:46 syncloud grocy.postgresql[1719]: Please log in (using, e.g., "su") as the (unprivileged) user that will
May 08 18:59:46 syncloud grocy.postgresql[1719]: own the server process.
May 08 18:59:46 syncloud systemd[1]: snap.grocy.postgresql.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- An ExecStart= process belonging to unit snap.grocy.postgresql.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
May 08 18:59:46 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit snap.grocy.postgresql.service has entered the 'failed' state with result 'exit-code'.
May 08 18:59:46 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
-- Subject: A start job for unit snap.grocy.postgresql.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit snap.grocy.postgresql.service has finished with a failure.
-- 
-- The job identifier is 1993 and the job result is failed.
May 08 18:59:47 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 18:59:47 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 5.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Automatic restarting of the unit snap.grocy.postgresql.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
May 08 18:59:47 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
-- Subject: A stop job for unit snap.grocy.postgresql.service has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A stop job for unit snap.grocy.postgresql.service has finished.
-- 
-- The job identifier is 2052 and the job result is done.
May 08 18:59:47 syncloud systemd[1]: snap.grocy.postgresql.service: Start request repeated too quickly.
May 08 18:59:47 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit snap.grocy.postgresql.service has entered the 'failed' state with result 'exit-code'.
May 08 18:59:47 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
-- Subject: A start job for unit snap.grocy.postgresql.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit snap.grocy.postgresql.service has finished with a failure.
-- 
-- The job identifier is 2052 and the job result is failed.
snap restart grocy.postgresql

journalctl -u snap.grocy.postgresql

Also

cat /etc/systemd/system/snap.grocy.postgresql.service
root@syncloud:~# snap restart grocy.postgresql
error: cannot perform the following tasks:
- restart of [grocy.postgresql] (# systemctl restart snap.grocy.postgresql.service
Job for snap.grocy.postgresql.service failed because the control process exited with error code.
See "systemctl status snap.grocy.postgresql.service" and "journalctl -xe" for details.
)
- restart of [grocy.postgresql] (exit status 1)
root@syncloud:~# journalctl --since today -u snap.grocy.postgresql
-- Logs begin at Thu 2019-02-14 10:12:00 UTC, end at Mon 2023-05-08 20:22:05 UTC. --
May 08 18:53:06 syncloud systemd[1]: Starting Service for snap application grocy.postgresql...
May 08 18:53:06 syncloud grocy.postgresql[1465]: pg_ctl: cannot be run as root
May 08 18:53:06 syncloud grocy.postgresql[1465]: Please log in (using, e.g., "su") as the (unprivileged) user that will
May 08 18:53:06 syncloud grocy.postgresql[1465]: own the server process.
May 08 18:53:06 syncloud systemd[1]: snap.grocy.postgresql.service: Control process exited, code=exited, status=1/FAILURE
May 08 18:53:06 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 18:53:06 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 18:53:06 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 18:53:06 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 1.
May 08 18:53:06 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
May 08 18:53:06 syncloud systemd[1]: Starting Service for snap application grocy.postgresql...
May 08 18:53:06 syncloud grocy.postgresql[1501]: pg_ctl: cannot be run as root
May 08 18:53:06 syncloud grocy.postgresql[1501]: Please log in (using, e.g., "su") as the (unprivileged) user that will
May 08 18:53:06 syncloud grocy.postgresql[1501]: own the server process.
May 08 18:53:06 syncloud systemd[1]: snap.grocy.postgresql.service: Control process exited, code=exited, status=1/FAILURE
May 08 18:53:06 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 18:53:06 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 18:53:06 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 18:53:06 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 2.
May 08 18:53:06 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
May 08 18:53:06 syncloud systemd[1]: Starting Service for snap application grocy.postgresql...
May 08 18:53:07 syncloud grocy.postgresql[1525]: pg_ctl: cannot be run as root
May 08 18:53:07 syncloud grocy.postgresql[1525]: Please log in (using, e.g., "su") as the (unprivileged) user that will
May 08 18:53:07 syncloud grocy.postgresql[1525]: own the server process.
May 08 18:53:07 syncloud systemd[1]: snap.grocy.postgresql.service: Control process exited, code=exited, status=1/FAILURE
May 08 18:53:07 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 18:53:07 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 18:53:07 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 18:53:07 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 3.
May 08 18:53:07 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
May 08 18:53:07 syncloud systemd[1]: Starting Service for snap application grocy.postgresql...
May 08 18:53:07 syncloud grocy.postgresql[1548]: pg_ctl: cannot be run as root
May 08 18:53:07 syncloud grocy.postgresql[1548]: Please log in (using, e.g., "su") as the (unprivileged) user that will
May 08 18:53:07 syncloud grocy.postgresql[1548]: own the server process.
May 08 18:53:07 syncloud systemd[1]: snap.grocy.postgresql.service: Control process exited, code=exited, status=1/FAILURE
May 08 18:53:07 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 18:53:07 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 18:53:07 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 18:53:07 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 4.
May 08 18:53:07 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
May 08 18:53:07 syncloud systemd[1]: Starting Service for snap application grocy.postgresql...
May 08 18:53:07 syncloud grocy.postgresql[1584]: pg_ctl: cannot be run as root
May 08 18:53:07 syncloud grocy.postgresql[1584]: Please log in (using, e.g., "su") as the (unprivileged) user that will
May 08 18:53:07 syncloud grocy.postgresql[1584]: own the server process.
May 08 18:53:07 syncloud systemd[1]: snap.grocy.postgresql.service: Control process exited, code=exited, status=1/FAILURE
May 08 18:53:07 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 18:53:07 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 18:53:08 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 18:53:08 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 5.
May 08 18:53:08 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
May 08 18:53:08 syncloud systemd[1]: snap.grocy.postgresql.service: Start request repeated too quickly.
May 08 18:53:08 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 18:53:08 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 18:59:44 syncloud systemd[1]: Starting Service for snap application grocy.postgresql...
May 08 18:59:44 syncloud grocy.postgresql[1639]: pg_ctl: cannot be run as root
May 08 18:59:44 syncloud grocy.postgresql[1639]: Please log in (using, e.g., "su") as the (unprivileged) user that will
May 08 18:59:44 syncloud grocy.postgresql[1639]: own the server process.
May 08 18:59:44 syncloud systemd[1]: snap.grocy.postgresql.service: Control process exited, code=exited, status=1/FAILURE
May 08 18:59:44 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 18:59:44 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 18:59:45 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 18:59:45 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 1.
May 08 18:59:45 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
May 08 18:59:45 syncloud systemd[1]: Starting Service for snap application grocy.postgresql...
May 08 18:59:45 syncloud grocy.postgresql[1659]: pg_ctl: cannot be run as root
May 08 18:59:45 syncloud grocy.postgresql[1659]: Please log in (using, e.g., "su") as the (unprivileged) user that will
May 08 18:59:45 syncloud grocy.postgresql[1659]: own the server process.
May 08 18:59:45 syncloud systemd[1]: snap.grocy.postgresql.service: Control process exited, code=exited, status=1/FAILURE
May 08 18:59:45 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 18:59:45 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 18:59:45 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 18:59:45 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 2.
May 08 18:59:45 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
May 08 18:59:45 syncloud systemd[1]: Starting Service for snap application grocy.postgresql...
May 08 18:59:45 syncloud grocy.postgresql[1681]: pg_ctl: cannot be run as root
May 08 18:59:45 syncloud grocy.postgresql[1681]: Please log in (using, e.g., "su") as the (unprivileged) user that will
May 08 18:59:45 syncloud grocy.postgresql[1681]: own the server process.
May 08 18:59:45 syncloud systemd[1]: snap.grocy.postgresql.service: Control process exited, code=exited, status=1/FAILURE
May 08 18:59:45 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 18:59:45 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 18:59:46 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 18:59:46 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 3.
May 08 18:59:46 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
May 08 18:59:46 syncloud systemd[1]: Starting Service for snap application grocy.postgresql...
May 08 18:59:46 syncloud grocy.postgresql[1701]: pg_ctl: cannot be run as root
May 08 18:59:46 syncloud grocy.postgresql[1701]: Please log in (using, e.g., "su") as the (unprivileged) user that will
May 08 18:59:46 syncloud grocy.postgresql[1701]: own the server process.
May 08 18:59:46 syncloud systemd[1]: snap.grocy.postgresql.service: Control process exited, code=exited, status=1/FAILURE
May 08 18:59:46 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 18:59:46 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 18:59:46 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 18:59:46 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 4.
May 08 18:59:46 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
May 08 18:59:46 syncloud systemd[1]: Starting Service for snap application grocy.postgresql...
May 08 18:59:46 syncloud grocy.postgresql[1719]: pg_ctl: cannot be run as root
May 08 18:59:46 syncloud grocy.postgresql[1719]: Please log in (using, e.g., "su") as the (unprivileged) user that will
May 08 18:59:46 syncloud grocy.postgresql[1719]: own the server process.
May 08 18:59:46 syncloud systemd[1]: snap.grocy.postgresql.service: Control process exited, code=exited, status=1/FAILURE
May 08 18:59:46 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 18:59:46 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 18:59:47 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 18:59:47 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 5.
May 08 18:59:47 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
May 08 18:59:47 syncloud systemd[1]: snap.grocy.postgresql.service: Start request repeated too quickly.
May 08 18:59:47 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 18:59:47 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 20:20:22 syncloud systemd[1]: Starting Service for snap application grocy.postgresql...
May 08 20:20:22 syncloud grocy.postgresql[2333]: pg_ctl: cannot be run as root
May 08 20:20:22 syncloud grocy.postgresql[2333]: Please log in (using, e.g., "su") as the (unprivileged) user that will
May 08 20:20:22 syncloud grocy.postgresql[2333]: own the server process.
May 08 20:20:22 syncloud systemd[1]: snap.grocy.postgresql.service: Control process exited, code=exited, status=1/FAILURE
May 08 20:20:22 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 20:20:22 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 20:20:22 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 20:20:22 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 1.
May 08 20:20:22 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
May 08 20:20:22 syncloud systemd[1]: Starting Service for snap application grocy.postgresql...
May 08 20:20:23 syncloud grocy.postgresql[2354]: pg_ctl: cannot be run as root
May 08 20:20:23 syncloud grocy.postgresql[2354]: Please log in (using, e.g., "su") as the (unprivileged) user that will
May 08 20:20:23 syncloud grocy.postgresql[2354]: own the server process.
May 08 20:20:23 syncloud systemd[1]: snap.grocy.postgresql.service: Control process exited, code=exited, status=1/FAILURE
May 08 20:20:23 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 20:20:23 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 20:20:23 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 20:20:23 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 2.
May 08 20:20:23 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
May 08 20:20:23 syncloud systemd[1]: Starting Service for snap application grocy.postgresql...
May 08 20:20:23 syncloud grocy.postgresql[2375]: pg_ctl: cannot be run as root
May 08 20:20:23 syncloud grocy.postgresql[2375]: Please log in (using, e.g., "su") as the (unprivileged) user that will
May 08 20:20:23 syncloud grocy.postgresql[2375]: own the server process.
May 08 20:20:23 syncloud systemd[1]: snap.grocy.postgresql.service: Control process exited, code=exited, status=1/FAILURE
May 08 20:20:23 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 20:20:23 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 20:20:23 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 20:20:23 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 3.
May 08 20:20:23 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
May 08 20:20:23 syncloud systemd[1]: Starting Service for snap application grocy.postgresql...
May 08 20:20:24 syncloud grocy.postgresql[2393]: pg_ctl: cannot be run as root
May 08 20:20:24 syncloud grocy.postgresql[2393]: Please log in (using, e.g., "su") as the (unprivileged) user that will
May 08 20:20:24 syncloud grocy.postgresql[2393]: own the server process.
May 08 20:20:24 syncloud systemd[1]: snap.grocy.postgresql.service: Control process exited, code=exited, status=1/FAILURE
May 08 20:20:24 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 20:20:24 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 20:20:24 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 20:20:24 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 4.
May 08 20:20:24 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
May 08 20:20:24 syncloud systemd[1]: Starting Service for snap application grocy.postgresql...
May 08 20:20:24 syncloud grocy.postgresql[2411]: pg_ctl: cannot be run as root
May 08 20:20:24 syncloud grocy.postgresql[2411]: Please log in (using, e.g., "su") as the (unprivileged) user that will
May 08 20:20:24 syncloud grocy.postgresql[2411]: own the server process.
May 08 20:20:24 syncloud systemd[1]: snap.grocy.postgresql.service: Control process exited, code=exited, status=1/FAILURE
May 08 20:20:24 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 20:20:24 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
May 08 20:20:24 syncloud systemd[1]: snap.grocy.postgresql.service: Service RestartSec=100ms expired, scheduling restart.
May 08 20:20:24 syncloud systemd[1]: snap.grocy.postgresql.service: Scheduled restart job, restart counter is at 5.
May 08 20:20:24 syncloud systemd[1]: Stopped Service for snap application grocy.postgresql.
May 08 20:20:24 syncloud systemd[1]: snap.grocy.postgresql.service: Start request repeated too quickly.
May 08 20:20:24 syncloud systemd[1]: snap.grocy.postgresql.service: Failed with result 'exit-code'.
May 08 20:20:24 syncloud systemd[1]: Failed to start Service for snap application grocy.postgresql.
root@syncloud:~# cat /etc/systemd/system/snap.grocy.postgresql.service
[Unit]
# Auto-generated, DO NOT EDIT
Description=Service for snap application grocy.postgresql
Requires=snap-grocy-34.mount
Wants=network.target
After=snap-grocy-34.mount network.target snapd.apparmor.service
Before=snap.grocy.php-fpm.service
X-Snappy=yes

[Service]
EnvironmentFile=-/etc/environment
ExecStart=/usr/bin/snap run grocy.postgresql
SyslogIdentifier=grocy.postgresql
Restart=always
WorkingDirectory=/var/snap/grocy/34
TimeoutStopSec=30
Type=forking

[Install]
WantedBy=multi-user.target

I think I got it! I added User=grocy to the [Service] sections of /etc/systemd/system/snap.grocy.nginx.service and /etc/systemd/system/snap.grocy.postgresql.service and now the services seem to be running fine:

root@syncloud:~# systemctl status snap.grocy.* | cat
● snap.grocy.nginx.service - Service for snap application grocy.nginx
   Loaded: loaded (/etc/systemd/system/snap.grocy.nginx.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2023-05-08 21:27:38 UTC; 27s ago
 Main PID: 1019 (nginx)
   CGroup: /system.slice/snap.grocy.nginx.service
           ├─1019 nginx: master process /snap/grocy/34/nginx/sbin/nginx -c /snap/grocy/current/config/nginx.conf -p /snap/grocy/34/nginx -e stderr
           ├─1035 nginx: worker process
           ├─1036 nginx: worker process
           ├─1037 nginx: worker process
           └─1038 nginx: worker process

May 08 21:27:38 syncloud systemd[1]: Started Service for snap application grocy.nginx.

● snap.grocy.php-fpm.service - Service for snap application grocy.php-fpm
   Loaded: loaded (/etc/systemd/system/snap.grocy.php-fpm.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2023-05-08 21:27:38 UTC; 27s ago
  Process: 751 ExecStart=/usr/bin/snap run grocy.php-fpm (code=exited, status=0/SUCCESS)
 Main PID: 982 (ld-2.28.so)
   CGroup: /system.slice/snap.grocy.php-fpm.service
           ├─982 /snap/grocy/34/php/lib/arm-linux-gnueabihf/ld-2.28.so --library-path /snap/grocy/34/php/lib/arm-linux-gnueabihf:/snap/grocy/34/php/usr/lib/arm-linux-gnueabihf:/snap/grocy/34/php/usr/lib:/snap/grocy/34/php/usr/lib/arm-linux-gnueabihf/samba php-fpm: master process (/var/snap/grocy/34/config/php-fpm.conf)
           ├─983 /snap/grocy/34/php/lib/arm-linux-gnueabihf/ld-2.28.so --library-path /snap/grocy/34/php/lib/arm-linux-gnueabihf:/snap/grocy/34/php/usr/lib/arm-linux-gnueabihf:/snap/grocy/34/php/usr/lib:/snap/grocy/34/php/usr/lib/arm-linux-gnueabihf/samba php-fpm: pool www
           └─984 /snap/grocy/34/php/lib/arm-linux-gnueabihf/ld-2.28.so --library-path /snap/grocy/34/php/lib/arm-linux-gnueabihf:/snap/grocy/34/php/usr/lib/arm-linux-gnueabihf:/snap/grocy/34/php/usr/lib:/snap/grocy/34/php/usr/lib/arm-linux-gnueabihf/samba php-fpm: pool www

Feb 14 10:12:30 syncloud systemd[1]: Starting Service for snap application grocy.php-fpm...
Feb 14 10:12:52 syncloud grocy.php-fpm[982]: [NOTICE] fpm is running, pid 982
Feb 14 10:12:52 syncloud grocy.php-fpm[982]: [NOTICE] ready to handle connections
May 08 21:27:38 syncloud systemd[1]: Started Service for snap application grocy.php-fpm.

● snap.grocy.postgresql.service - Service for snap application grocy.postgresql
   Loaded: loaded (/etc/systemd/system/snap.grocy.postgresql.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-02-14 10:12:30 UTC; 4 years 2 months ago
  Process: 295 ExecStart=/usr/bin/snap run grocy.postgresql (code=exited, status=0/SUCCESS)
 Main PID: 729 (ld-2.31.so)
   CGroup: /system.slice/snap.grocy.postgresql.service
           ├─729 /snap/grocy/34/postgresql/lib/arm-linux-gnueabihf/ld-2.31.so --library-path /snap/grocy/34/postgresql/lib/arm-linux-gnueabihf/:/snap/grocy/34/postgresql/usr/lib/arm-linux-gnueabihf /snap/grocy/34/postgresql/usr/lib/postgresql/10/bin/postgres.bin -D /var/snap/grocy/current/database
           ├─744 /snap/grocy/34/postgresql/lib/arm-linux-gnueabihf/ld-2.31.so --library-path /snap/grocy/34/postgresql/lib/arm-linux-gnueabihf/:/snap/grocy/34/postgresql/usr/lib/arm-linux-gnueabihf postgres: checkpointer process   
           ├─745 /snap/grocy/34/postgresql/lib/arm-linux-gnueabihf/ld-2.31.so --library-path /snap/grocy/34/postgresql/lib/arm-linux-gnueabihf/:/snap/grocy/34/postgresql/usr/lib/arm-linux-gnueabihf postgres: writer process   
           ├─746 /snap/grocy/34/postgresql/lib/arm-linux-gnueabihf/ld-2.31.so --library-path /snap/grocy/34/postgresql/lib/arm-linux-gnueabihf/:/snap/grocy/34/postgresql/usr/lib/arm-linux-gnueabihf postgres: wal writer process   
           ├─747 /snap/grocy/34/postgresql/lib/arm-linux-gnueabihf/ld-2.31.so --library-path /snap/grocy/34/postgresql/lib/arm-linux-gnueabihf/:/snap/grocy/34/postgresql/usr/lib/arm-linux-gnueabihf postgres: autovacuum launcher process   
           ├─748 /snap/grocy/34/postgresql/lib/arm-linux-gnueabihf/ld-2.31.so --library-path /snap/grocy/34/postgresql/lib/arm-linux-gnueabihf/:/snap/grocy/34/postgresql/usr/lib/arm-linux-gnueabihf postgres: stats collector process   
           └─750 /snap/grocy/34/postgresql/lib/arm-linux-gnueabihf/ld-2.31.so --library-path /snap/grocy/34/postgresql/lib/arm-linux-gnueabihf/:/snap/grocy/34/postgresql/usr/lib/arm-linux-gnueabihf postgres: bgworker: logical replication launcher   

Feb 14 10:12:05 syncloud systemd[1]: Starting Service for snap application grocy.postgresql...
Feb 14 10:12:28 syncloud grocy.postgres[729]: [1-1] 2019-02-14 10:12:28.661 GMT [729] LOG:  listening on Unix socket "/var/snap/grocy/current/database/.s.PGSQL.5436"
Feb 14 10:12:28 syncloud grocy.postgresql[295]: 2019-02-14 10:12:28.661 GMT [729] LOG:  listening on Unix socket "/var/snap/grocy/current/database/.s.PGSQL.5436"
Feb 14 10:12:29 syncloud grocy.postgres[729]: [2-1] 2019-02-14 10:12:29.579 GMT [729] LOG:  ending log output to stderr
Feb 14 10:12:29 syncloud grocy.postgres[729]: [2-2] 2019-02-14 10:12:29.579 GMT [729] HINT:  Future log output will go to log destination "syslog".
Feb 14 10:12:29 syncloud grocy.postgresql[295]: 2019-02-14 10:12:29.579 GMT [729] LOG:  ending log output to stderr
Feb 14 10:12:29 syncloud grocy.postgresql[295]: 2019-02-14 10:12:29.579 GMT [729] HINT:  Future log output will go to log destination "syslog".
Feb 14 10:12:29 syncloud grocy.postgres[743]: [3-1] 2019-02-14 10:12:29.753 GMT [743] LOG:  database system was shut down at 2023-05-08 21:24:59 GMT
Feb 14 10:12:30 syncloud grocy.postgres[729]: [3-1] 2019-02-14 10:12:30.536 GMT [729] LOG:  database system is ready to accept connections
Feb 14 10:12:30 syncloud systemd[1]: Started Service for snap application grocy.postgresql.

Still:

root@syncloud:~# snap refresh grocy
error: cannot communicate with server: Post "http://localhost/v2/snaps/grocy": EOF

But the cli backup command worked. :tada:

I will see tomorrow whether I can manage to get it to work in the same way with the other apps.
Thank you very much so far – I will report back again.

User=grocy

Yes, I was suspecting this, not sure why this was missing as it is in the official syncloud grocy app.

Snap is still broken but If you can make backups that will probably be enough.

It worked! :piñata: 1000 Thanks for your help! :people_hugging:

I couldn’t install grocy and nextcloud via the web interface (nothing happened after clicking the button and waiting for the web interface to finish), so I tried snap install, which worked for grocy, but not for nextcloud:

root@syncloud:~# snap install nextcloud
error: cannot perform the following tasks:
- Run configure hook of "nextcloud" snap if present (run hook "configure": 
-----
2023-05-09 19:24:45,421 - database - INFO - postgres executing: snap run nextcloud.psql -U nextcloud -d postgres -c "ALTER USER nextcloud WITH PASSWORD 'nextcloud';"
2023-05-09 19:24:46,224 - database - INFO - ALTER ROLE
2023-05-09 19:24:46,226 - database - INFO - postgres executing: snap run nextcloud.psql -U nextcloud -d postgres -c "CREATE DATABASE nextcloud OWNER nextcloud TEMPLATE template0 ENCODING 'UTF8';"
2023-05-09 19:24:50,137 - database - INFO - CREATE DATABASE
2023-05-09 19:24:50,139 - database - INFO - postgres executing: snap run nextcloud.psql -U nextcloud -d postgres -c "GRANT CREATE ON SCHEMA public TO nextcloud;"
2023-05-09 19:24:50,513 - database - INFO - GRANT
2023-05-09 19:25:12,314 - nextcloud_occ - ERROR - occ error: Username is invalid because files already exist for this user
Traceback (most recent call last):
  File "/snap/nextcloud/700/meta/hooks/configure", line 7, in <module>
    Installer().configure()
  File "/snap/nextcloud/700/hooks/installer.py", line 107, in configure
    self.initialize()
  File "/snap/nextcloud/700/hooks/installer.py", line 198, in initialize
    self.occ.run('maintenance:install  --database pgsql --database-host {0}:{1}'
  File "/snap/nextcloud/700/hooks/octools.py", line 19, in run
    raise e
  File "/snap/nextcloud/700/hooks/octools.py", line 13, in run
    output = check_output('{0} {1}'.format(self.occ_runner_path, args), shell=True).decode().strip()
  File "/snap/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/snap/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '/snap/nextcloud/current/bin/occ-runner maintenance:install  --database pgsql --database-host /var/snap/nextcloud/current/database:5436 --database-name nextcloud --database-user nextcloud --database-pass nextcloud --admin-user installer --admin-pass 1359cb68bab649c781cbafa7e228a5b3 --data-dir /opt/disk/external/nextcloud' returned non-zero exit status 1.
-----)

I removed /data/nextcloud/installer/, then the installation proceeded farther, but still failed:

root@syncloud:~# snap install nextcloud
error: cannot perform the following tasks:
- Run configure hook of "nextcloud" snap if present (run hook "configure": 
-----
2023-05-09 19:01:38,082 - database - INFO - postgres executing: snap run nextcloud.psql -U nextcloud -d postgres -c "ALTER USER nextcloud WITH PASSWORD 'nextcloud';"
2023-05-09 19:01:39,338 - database - INFO - ALTER ROLE
2023-05-09 19:01:39,340 - database - INFO - postgres executing: snap run nextcloud.psql -U nextcloud -d postgres -c "CREATE DATABASE nextcloud OWNER nextcloud TEMPLATE template0 ENCODING 'UTF8';"
2023-05-09 19:01:49,128 - database - INFO - CREATE DATABASE
2023-05-09 19:01:49,130 - database - INFO - postgres executing: snap run nextcloud.psql -U nextcloud -d postgres -c "GRANT CREATE ON SCHEMA public TO nextcloud;"
2023-05-09 19:01:49,512 - database - INFO - GRANT
2023-05-09 19:07:41,350 - nextcloud_occ - INFO - Nextcloud was successfully installed
2023-05-09 19:08:10,450 - nextcloud_occ - INFO - user_ldap 1.16.0 enabled
2023-05-09 19:08:17,593 - nextcloud_occ - INFO - Created new configuration with configID s01
2023-05-09 19:08:24,676 - nextcloud_occ - INFO - Created new configuration with configID s02
2023-05-09 19:10:58,456 - nextcloud_occ - INFO - All tables already up to date!
2023-05-09 19:10:58,458 - cron - INFO - running: /usr/bin/snap run nextcloud.cron
Traceback (most recent call last):
  File "/snap/nextcloud/700/meta/hooks/configure", line 7, in <module>
    Installer().configure()
  File "/snap/nextcloud/700/hooks/installer.py", line 107, in configure
    self.initialize()
  File "/snap/nextcloud/700/hooks/installer.py", line 240, in initialize
    self.cron.run()
  File "/snap/nextcloud/700/hooks/installer.py", line 316, in run
    self.log.info(check_output(self.cron_cmd, shell=True))
  File "/snap/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/snap/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '/usr/bin/snap run nextcloud.cron' returned non-zero exit status 1.
-----)

What could this be about?

Everything else worked seamlessly: Activation, certificate issuance, restoring the app backups etc. :rocket:

Something wrong with nextcloud user crontab.
Did you remove nextcloud and then trying to install?

I am not sure how broken is the system now, I thought the idea was to get backups on the external disk (which you have done) and then get a new sd card and write fresh os image, install apps and restore backups. That way it is much easier.

Yeah that’s what I did! Sorry for being unclear. After making the backups, I cleared the SD card, flashed the OS and activated the device as if it was new. Then I connected my external /data drive and activated it as external storage and reinstalled all apps, then I restored the app backups.
Reinstalling the apps via the web interface worked with the two exceptions mentioned above: grocy, which I managed to snap install via SSH.
Nextcloud didn’t work, as described above.
Two details that might or might not be relevant:

  1. The previous nextcloud installation was an older revision than the current revision that is distributed via snap. Unfortunately, I don’t know which revision was installed (and I couldn’t update because snap wasn’t working). Do you know whether this information is somewhere stored in /data/nextcloud or /data/platform/backup/nextcloud*.tar.gz? If I knew the package revision of the previous installation, I could probably try to install this revision again to see whether this is the issue.
  2. I accidentally restored the nextcloud backup when I thought that the app was already installed, but later I realized that the installation failed. Did the backup restoration maybe do something that interferes with the installation now?

From this thread you were on

nextcloud  676   
  1. Remove nextcloud
  2. Download 676 using this page: Nextcloud · syncloud/platform Wiki · GitHub
  3. Restore the backup
  4. Upgrade to the latest using the above nextcloud wiki (last step)

Installing 676 worked, but the app wasn’t accessible (502 bad gateway). Upgrading to 700 (after backup restore) didn’t work, either:

ot@syncloud:~# snap refresh nextcloud --channel=stable --amend
error: cannot perform the following tasks:
- Run pre-refresh hook of "nextcloud" snap if present (run hook "pre-refresh": 
-----
2023-05-10 20:10:43,149 - database - INFO - postgres executing: snap run nextcloud.pgdumpall -f /var/snap/nextcloud/current/database.dump
pg_dumpall: could not connect to database "template1": could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/snap/nextcloud/current/database/.s.PGSQL.5436"?
2023-05-10 20:10:46,521 - database - ERROR - postgres error:
Traceback (most recent call last):
  File "/snap/nextcloud/x1/meta/hooks/pre-refresh", line 7, in <module>
    Installer().pre_refresh()
  File "/snap/nextcloud/x1/hooks/installer.py", line 89, in pre_refresh
    self.db.backup()
  File "/snap/nextcloud/x1/hooks/postgres.py", line 45, in backup
    self.run('snap run nextcloud.pgdumpall -f {0}'.format(self.backup_file))
  File "/snap/nextcloud/x1/hooks/postgres.py", line 55, in run
    raise e
  File "/snap/nextcloud/x1/hooks/postgres.py", line 51, in run
    output = check_output(cmd, shell=True).decode()
  File "/snap/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/snap/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'snap run nextcloud.pgdumpall -f /var/snap/nextcloud/current/database.dump' returned non-zero exit status 1.
-----)

But it doesn’t matter. I decided to make a fresh install of nextcloud and just copy my files from the /data/ backup, which worked. :+1:

I think that’s it – thank you so much for helping me restoring the mess that I made!