Are spiders told not to index?

Nextcloud version (eg, 20.0.5): 22.2.3 snap
Operating system and version (eg, Ubuntu 20.04): Ubuntu 21.10
Apache or nginx version (eg, Apahe 2.4.25): snap
PHP version (eg, 7.4): snap
The issue you are facing:
Just a question - if a search engine spider finds nextcloud running in a snap, maybe through DNS records, is it told not to index, or is there a way to make it so? Does search engines not index nextcloud log-in pages anyway?

Background. I have example.com and nextcloud.example.com on different devices. example.com is on a virtual machine serving my simple wordpress site and nextcloud.example.com is on a raspberry pi, on a dynamic-dns service provided by my Name Server, pointing to my home broadband. I don’t want nextcloud.example.com to be indexed but I do want so for example.com

Usually you do so via robots.txt, you declare if you would like to get some path indexed or not.
You can also use X-Robots-Tag instead or together with it via your Webserver configuration.

E.g. my apache2 configuration:
grafik

And additionally I have robots.txt on a root of www that is symlinked to different sites so that I can edit it once centrally:

$ ls -la robots.txt nextcloud/robots.txt
lrwxrwxrwx 1 root     root     13 Dec 16 08:21 nextcloud/robots.txt -> ../robots.txt
-rw-r--r-- 1 www-data www-data 26 Dec 14  2020 robots.txt
$ cat nextcloud/robots.txt
User-agent: *
Disallow: /