Hello @Jonas_Vinge, and welcome to the community!
I havenât use Nextcloud / Owncloud in a little while so I may be rusty on the details, but Iâll try to help as best as I can for now.
Nextcloud or Owncloud?
I would personally highly recommend using the Nextcloud rock-on over the Owncloud one. Indeed, the former is fully up-to-date and will get you up and running in a much safer way. I will thus assume we are talking about Nextcloud belowâalthough most of what Iâll write would apply to both.
Editing config.php
The docker container (that the rock-on uses) sets on purpose a user that doesnât exist (33, for security purpose, I believe) and gives ownership of config.php
to that user. When accessing the file using a samba export, you may thus have issue with trying to edit this file (Iâve never tried it that way myself, though). What you can easily try, however, is to use the command line.
To do so, you can either connect to Rockstor using SSH (you will find tons of tutorials on how to connect to a linux server online if needed), or use the âShell In A Boxâ feature in Rockstor:
- Go to System > Services
- Click on the little orange wrench icon next to âShell In A Boxâ, and change the Shell connection service from LOGIN to SSH. Click submit and the Shell In A Box service should now be ON (toggle the ON/OFF switch if it isnât the case).
- You can now click on System Shell in the UIâs header and you will be prompted to enter login credentials. Although usually not recommended, letâs login as the root user.
- The
config.php
file is located in the share you used to bind Nextcloud data (next-data
in the example below:
[root@rocktest ~]# ls -lhtr /mnt2/next-data/config/config.php
-rw-r----- 1 33 33 821 Jan 10 10:47 /mnt2/next-data/config/config.php
- You can thus simply edit it using
nano
, for instance, which is rather simple to use:
[root@rocktest ~]# nano /mnt2/next-data/config/config.php
-
Make your changes as needed (make sure to follow the appropriate syntax):
-
To save your changes, type Ctrl + O
, press Enter
.
-
To exit, press Ctrl + X
.
-
Verify your changes were correctly saved:
[root@rocktest ~]# cat /mnt2/next-data/config/config.php
You can now close the Shell In A Box session by opening any page of the Rockstor UI. I would also suggest you turn off the Shell In A Box service if you donât need it anymore.
How to run the occ
commands
As Nextcloud is run inside a docker container (this is what rock-ons use, see our documentation), all its commands are isolated inside the container and thus invisible from the hostâs (Rockstor server) system. You can still access them, however. You can find a lot of resources online on what docker containers actually are and see that they could be (over) simplified to being a system running inside another system.
To do so, you just need to run the commands from inside the nextcloud docker container. I found a quick and nice description in Nextcloudâs forums:
In our case, these would thus be:
[root@rocktest ~]# docker exec --user www-data nextcloud-official php occ --help
I know this doesnât include everything but I hope itâll at least help you get on the right track.
In any case, let us know how it goes!
Cheers,