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.
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.
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
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
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!