Stopping Nextcloud service auto start on boot

Hello friends,
Iā€™m using Nextcloudpi on Raspberry Pi 4 (curl installation).
Lately Iā€™ve been seeing a few issues with my Pi and I would like to troubleshoot the matter and find the right cause of the problem.
To delimit the variables that might lead to the problem, I would like to temporarily stop Nextcloudpiā€™s auto start after boot service.
Is that possible?
Can someone please share the terminal commands I should use?
Thank you.

Hi, could you please post the results of nc-info from the :4443 webui or within ncp-config.

You can also check your logs within /var/www/ Also helps to know most recent changes youā€™ve made to your system that led to trouble. Was this caused by an update?

1 Like

Hi @just , thank you for your message.
Before I trouble the community, I would like to try to troubleshoot myself.
Is it possible to turn off NCP and NC from autostarting at boot?

Iā€™ve been having issues with my OpenHAB smart home system, running on the same pi.

Since this is outside the realm of the set-and-forget curl installation I wonā€™t be able to help on it. If you decide to post nc-info or logs it will become more possible to assist you. Hope it gets sorted.

I completely agree, @just.
The Nextcloud forum is not here to help me solve issues Iā€™m having with OpenHAB.
Thatā€™s the reason Iā€™m trying to run a few troubleshooting steps to pinpoint the root of the problem.
And thatā€™s why Iā€™m asking if there is a command to disable NC/NCP from automatically starting at boot.
I tried running commands like: ā€˜sudu systemctl stop nextcloudā€™, but I received an error message.
Is there such a command that will work?

Please post the results of nc-info and any other logs. Copy paste over any other errors as well to here or a linked pastebin. Iā€™ll link the basic support template below (seems it doesnā€™t pop up under appliances :thinking: ):

Support template. Got to have the technical info. :slight_smile:

Here is the nc-info:

NextCloudPi version       v1.46.9
OS                        Debian GNU/Linux 10
. 5.10.103-v8+ (aarch64)
automount                 no
USB devices               sda 
datadir                   /var/www/nextcloud/data
data in SD                yes
data filesystem           ext2/ext3
data disk usage           66G/459G
rootfs usage              66G/459G
swapfile                  /var/swap
dbdir                     /var/lib/mysql
Nextcloud check           ok
Nextcloud version         23.0.2.1
HTTPD service             up
PHP service               up
MariaDB service           up
Redis service             up
HPB service               up
Postfix service           up
internet check            ok
port check 80             open
port check 443            open
IP                        192.168.1.2
gateway                   192.168.1.1
interface                 eth0
certificates              *******.duckdns.org
NAT loopback              yes
uptime                    22:12


You should use nc-datadir to move your files to your plugged in USB drive

You should enable automount to use your plugged in USB drive
Done. Press any key...

Although all Iā€™m asking is, if thereā€™s a command to temporarily stop NC/NCP.

Not that I know of besides systemctl. Your nc-info sheet looks good; thanks for sharing. Want to give any technical details on what you are trying to achieve with the openhab setup?

1 Like

I really donā€™t want to trouble anyone here for help with OpenHAB. Iā€™ll ask these questions on the OpenHAB forum.
You guys are helping way too much here to worry about a completely different system.
Can you please share with me the complete systemctl command you would use if you needed to turn off NC/NCP?
Iā€™m not a programmer, so these things are not obvious to me.
I tried:

sudu systemctl stop nextcloud
sudu systemctl stop nextcloudpi
sudu systemctl stop ncp

but non of them worked.
Iā€™m guessing Iā€™m just using the wrong command.

Those commands look correct. afaik NCP does not want you to be stopping and restarting it. Look over the project github to learn how everything works. Iā€™m sure there are some pain points since ncp assumes it is the only thing running on the device when installed from curl.

Quick word of encouragement for containersā€¦
The way I personally get around all this is containersā€¦ restating here in case anyone else searches this. Using containers (docker, LXC, podman) makes it easy to manage multiple services such as NCP, Home Assistant, SSL, etc. on the same device. Honestly, Iā€™ve never had an issue with managing these since moving to containers. Containers also allow you to stop and restart ncp.

1 Like

I will be switching my NCP instance to a new device soon, so Iā€™ll follow your advice and install it as a docker app.
Thank you very much for the patience and willingness to help :pray:

Is it possible to run docker NCP behind a reverse proxy?
I read a blog post from a few years ago in which nacho explained why he decided to use apache instead of nginx.
So Iā€™m wondering if it will be possible to run NCP with nginx as two different docker containers, having nginx issue NCP the ssl certificate.

Sure, you can set up your own reverse proxy however you want. Nginx just wonā€™t be provided by the ncp project directly. Here is a guide using ncp with docker-compose and nginx. Probably other examples on the forum and such.

1 Like

Thanks again :pray::pray::pray: