Start nextcloud in terminal mode

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): replace me
Operating system and version (eg, Ubuntu 20.04): replace me
Apache or nginx version (eg, Apache 2.4.25): replace me
PHP version (eg, 7.4): replace me

The issue you are facing:

I am unable to start netxcloud in terminal mode.
Is it possible?

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:


The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):


The output of your Apache/nginx/system log in /var/log/____:


Hi @pdupre

Please be more specific about what you are trying to achieve. What do you mean by “start Nextcloud in terminal mode”? Also try to provide as many information about your setup as possible. Otherwise nobody will be able to help you.

It is a client mode machine.
I can start nextcloud when I am logged in graphics mode (just typing nextcloud).
When I cannot log in graphics mode (when I am not in my office), I would like to
start the synchronization manually from a standard (i.e., not non graphics mode) terminal.
Maybe using nextcloudcmd?


Yes there is the nextcloudcmd command. But I think, the installation requires some graphic libraries which you usually don’t have in command line only. Unfortunately, there is no minimal version with just the sync-stuff.

Nextcloud support directly webdav, so you can mount that directly (no syncing). Not sure if that would do it for you?

I still don’t quite understand the use case or what the actual goal of this is.

If you already have the Nextcloud desktop client installed on a (Linux?) computer, you can theoretically log in remotely via SSH to that computer, start the client via Nextcloudcmd and then stop it again. But why not just let it run all the time and let it do it’s thing in the background as it is supposed to do?

If you want to use the client on a Linux computer without a desktop interface, that most likley won’t work because afaik Nextcloudcmd cannot be installed independently. For examlple if you try to install it via apt on Ubuntu server it will install the complete Ubuntu Gnome desktop on your system as a dependency. Maybe there are ways to avoid this… But I think you cannot install the desktop client without any graphical environment.

Thank for the comments.
What is happening is that nextcloud falls when I logout the graphic session.
Then I have to restart it a the next login.

It is why a nexcloudcmd command would help me.

That’s normal. Log out from a graphical session normally means also logging out your user from the system. The client is running in the context of your user, so…

It should start automatically when you login again. If it’s not you should try to fix that.

Maybe… You could login as your user to the command line and then start a sync via Nextcloudcmd, if that does help you, then the anwser is yes.

But I get the feeling, that you only want to do this as a workaround for something that either doesn’t work right or to achieve something that the desktop client is not designed for… :wink: Why not tell us what your actual goal is and why you need your client to sync at times when you are not logged in at your computer…? Maybe there are better ways to achieve your goal than using the Desktop Client?