Page 1 of 2

Nextcloud new Accessories

Posted: Wed Jul 17, 2019 12:48 pm
by criky
With using UBOSbox NUC, I have more questions about Nextcloud installation.

Honestly I want to use 2FA(found in app store as "Two-Factor TOTP Provider") with Nextcloud, but when I read UBOS documents, unlike my expectation, additional accessories can be installed only by the redeploying the site with its configuration update(Site JSON), which appears to be a hassle for me.

So my questions are:
First, when I run the code "% pacman -Sl hl", I can not find any of 2FA relevent options available. So can it be possible to use 2FA with UBOS in Nextcloud now?

Second, can anybody explain me or walk me through the steps to update Site JSON & Appconfigs with redeploying the site so that new accessories can be installed easily?


Re: Nextcloud new Accessories

Posted: Thu Jul 18, 2019 12:11 am
by j12t
Here's how it works: We make certain accessories (aka Nextcloud apps) available in the UBOS repositories that we have tried and they appear to work. This set tends to grow over time.

If you would like to see one that isn't currently on UBOS, please tell us so, and we will consider making it available in the next UBOS release. I have logged your request here: so you are set already this this time.

If you are impatient :-) you could re-enable the Nextcloud "app store" and install it through there, but that is strongly NOT recommended, because it will interfere with UBOS-based administration. There is some more info here:

You can find the SIte JSON that is deployed on your box by executing "sudo ubos-admin showsite -s s... --json" or by finding the Site template JSON on your UBOS Staff from which it was originally installed. It lists the accessories by package name in a JSON array; you would simply add another field there and redeploy.

I'm also going to add a bit more documentation on how to do this.

Re: Nextcloud new Accessories

Posted: Thu Jul 18, 2019 3:22 am
by criky
Thanks for your discourse and taking my request into your account.

Frankly before asking I'd read your article already in terms of that part.
As you pointed out, some parts of this topic(Site JSON with redeploying site to install any accessory) may need to be merged in the list of documentations, so that anyone could see it as easily as possible, but currently it remains tricky for me.

I just wanna comply with your strong recommendation, so I am looking forward to see it when the next official UBOS version can be released.

And if any app needs to be updated, I think UBOS staff would be one of the easiest way I can take right now, so I'll try and let you know if needed.
Thanks again and have a good day :)

Re: Nextcloud new Accessories

Posted: Fri Jul 19, 2019 1:30 am
by criky
I just updated both nextcloud.json and sites.json in the staff.
After rebooting the box, it seems appconfigs is not implemented at all to the box even though configuration is updated.
When I see the list of accessories of the Nextcloud app by "listsites" and "pacman" command, I can't find any new accessory installed.
Do I have to perform it manually? But If I try to do that, I can't specify the name of <site.json> file, since UBOS can't read the file "nextcloud.json" from any of the folder.(on top of that when I use the "find" command to specify the path of the json file, the result was "No such file or directory")

Re: Nextcloud new Accessories

Posted: Fri Jul 19, 2019 2:15 am
by j12t
I'm not quite understanding your question.

What is the exact series of steps you have performed, what is the output of "ubos-admin listsites --detail" now and is Nextcloud running as intended?

Re: Nextcloud new Accessories

Posted: Fri Jul 19, 2019 2:48 am
by criky
Result of ubos-admin listsites --detail : same like pacman command(missing : [installed])

OK. Let me clarify my steps first.

1. I decided to use "Staff" to install Nextcloud new accessories.(bruteforcesettings, passwords)
(1) I updated nextcloud.json file in the site-template folder from Staff.
Just added 2 lines(nextcloud-bruteforcesettings, nextcloud-passwords) as shown above capture from Staff html file.
(2) reboot the box with staff inserted.
(3) Just in case I ran the commands of ubos-admin read-configuration-from-staff and ubos-admin write-configuration-to-staff
(4) nothing changed as pacman -Sl hl shows "not installed".

2. as a contingency plan I tried it manually
(1) I can find the "nextcloud.json" file in the /ubos/lib/ubos/manifests/nextcloud.json folder tree
(2) execute sudo ubos-admin deploy --file nextcloud.json : result : missing siteid
(3) execute sudo ubos-admin deploy --siteid sf... --file nextcloud.json : result : error invalid invocation

Re: Nextcloud new Accessories

Posted: Fri Jul 19, 2019 3:43 am
by j12t
This makes things a little clearer. A few comments:
  • pacman only tells you which code is on the box. It does not tell you whether the code is used for any website. "ubos-admin listsites" or "showsite" tells you that.
  • let's make sure you can actually bring the code you want to run onto your box: "pacman -S nextcloud-passwords" etc.
  • I'm a little unclear just what Site JSON file you have where. So let's ignore those for right now. Instead, as shepherd, run "sudo ubos-admin showsite -s s... --json > mysite.json". This will write the current site configuration into your current directory as file mysite.json.
  • Edit that file, and add your accessory names. Save.
  • Now re-deploy the updated file: "sudo ubos-admin deploy --file mysite.json"
  • Make sure that the Nextcloud apps are actually active, from within Nextcloud admin
Should there be any strange messages or errors, post them here and I'll take a look.

Re: Nextcloud new Accessories

Posted: Fri Jul 19, 2019 4:23 am
by criky
Indeed, it works! :)
I think the reason why staff doesn't work seems to be the wrong place where my Site JSON file exists.
As you pointed out, normally it should be the right place(maybe /var/shepherd) where the staff will be able to access seamlessly.

Normally which name is my Site JSON file supposed to be?
Is "nextcloud.json" wrong name for my Site JSON file?
I just assume that name because it was used by the staff but never sure.

Re: Nextcloud new Accessories

Posted: Fri Jul 19, 2019 5:48 pm
by j12t
A Site JSON file does not have to have any particular name. Site template files on the staff have to have the right extension, but otherwise it should not matter either.

However, it is a little complicated how UBOS decides whether or not the user wants to deploy another site to the same box (UBOS can run an arbitrary number of websites on the same device) or whether it is intended to be an update of the configuration. So the process we went through just now is a bit easier to understand.

Re: Nextcloud new Accessories

Posted: Tue Jul 23, 2019 10:47 pm
by j12t
The Twofactor accessory you were looking for has just managed to sneak into today's app update.

Make sure your box is in good shape again (see different thread) before attempting to "sudo ubos-admin update". And only after that has been successful should you add the new accessory.