A nextcloud-client.service (or [email protected]) should be available for linux users/packagers.
Currently not available, some distros just roll their own.
One of the most common systemd service units looks something like this:-
[Unit]
Description=Nextcloud Client
[Service]
Type=simple
ExecStart=/usr/bin/nextcloud
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
[Install]
WantedBy=default.target
A system-wide service unit would be a bit more complex as DBUS_SESSION_BUS_ADDRESS and DISPLAY would need to be set there, but that would also be helpful as a base point for packagers.
As far I know, gnome will start it automatic, when select in the client.
So why do you need an systemd unit?
I totally agree.
I tried to start my NextCloud cleint using systemd but I get this error
```Mar 07 17:19:38 billy systemd[1]: nextcloud.service: Service RestartSec=100ms expired, scheduling restart.
Mar 07 17:19:38 billy systemd[1]: nextcloud.service: Scheduled restart job, restart counter is at 1.
Mar 07 17:19:38 billy systemd[1]: Stopped Nextcloud Client.
Mar 07 17:19:38 billy systemd[1]: Started Nextcloud Client.
Mar 07 17:19:38 billy nextcloud[2335]: qt.qpa.xcb: could not connect to display
Mar 07 17:19:38 billy nextcloud[2335]: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
Mar 07 17:19:38 billy nextcloud[2335]: This application failed to start because no Qt platform plugin could be initialized. Reinsta>
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
**Systemd unit**:
[Unit]
Description=Nextcloud Client
[Service]
User=$user
Group=$groups
Type=simple
ExecStart=/usr/bin/nextcloud
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
[Install]
WantedBy=default.target
```
Have you been able to start your nexcloud cleint using systemd succesfully ?
Systemd service are global, not per user. However, Nextcloud client desktop is per user. So what you ask is incompatible. You cannot ask Nextcloud installer, that installs at system level, a user specific start script.
But in your case, your systemd unit would depend on the desktop service to be started (ex kde). Then you would need to export the correct DISPLAY environment variable for the client to start in the correct. But this is very hackish and I do not see the point. As tuxmaster said, nextcloud desktop client is automatically started when the favorite desktop (kde gnome) starts.
You can provide a [email protected] file which can be enabled per-user (and runs as that user)
You can provide a [email protected] file which can be enabled per-user (and runs as that user)
Let's say we install nextcloud client in a machine of 3 users, in CentOs. We do yum install, then the systemd file is deployed. Which user should we choose? Then in case of user removal?
Instead, this is the role of the Desktop Manager (Kde Gnome etc) to start applications at user login.
You can provide a [email protected] file which can be enabled per-user (and runs as that user)
Let's say we install nextcloud client in a machine of 3 users, in CentOs. We do
yum install, then the systemd file is deployed. Which user should we choose? Then in case of user removal?Instead, this is the role of the Desktop Manager (Kde Gnome etc) to start applications at user login.
The systemd unit file is not deployed, it is merely provided.
Any user who wants the nextcloud client enabled/started can just run:-
systemctl enable --now nextcloud-client@myusername
This works on all sorts of systems, whether they use DEs or not, and it does not affect anyone who wishes to use DE autostart since it's opt-in. Perfectly compatible with multi-user systems.
In my experience, nextcloud client on Linux is not stable enough. It breaks every two to three days. This is very awkward for me because I often connect to my linux using ssh from a remote machine. I can't start it again manually. Systemd can keep it running in the background.
In my experience, nextcloud client on Linux is not stable enough. It breaks every two to three days. This is very awkward for me because I often connect to my linux using ssh from a remote machine. I can't start it again manually. Systemd can keep it running in the background.
Hi, for that specific need, you can avoid Nextcloud UI by just using nextcloud-client (https://docs.nextcloud.com/desktop/2.6/advancedusage.html#nextcloud-command-line-client). It is less user-friendly because you don't have an UI but this is usable in command-line. You would need to do a cron in this case. Or just use Docker image (like https://hub.docker.com/r/zzenld/nextcloud-client ) if you are familiar with Docker.
In my experience, nextcloud client on Linux is not stable enough. It breaks every two to three days. This is very awkward for me because I often connect to my linux using ssh from a remote machine. I can't start it again manually. Systemd can keep it running in the background.
Hi, for that specific need, you can avoid Nextcloud UI by just using nextcloud-client (https://docs.nextcloud.com/desktop/2.6/advancedusage.html#nextcloud-command-line-client). It is less user-friendly because you don't have an UI but this is usable in command-line. You would need to do a cron in this case. Or just use Docker image (like https://hub.docker.com/r/zzenld/nextcloud-client ) if you are familiar with Docker.
Thank you, I'll give a try.
Hi, is there still no systemd service provided? At the moment I am starting it manually each time I start the system (when I remember), which leads to a lot of conflicts between my machines
Most helpful comment
Because:-