Connecting Nextcloud to subdomain

Questions and discussions about Indie Computing's UBOSbox
Post Reply
jdm5
Posts: 7
Joined: Thu Jan 28, 2021 6:23 pm

Connecting Nextcloud to subdomain

Post by jdm5 »

I recently set up our UBOSbox with Nextcloud and I am attempting to access it using a subdomain that I have pointed to our static IP address. I opened the ports 80 and 443 on our router and can access it from unsecured http:// but not from secured https://. I believe my issue is that there is no SSL certificate issued for my subdomain. I read the documentation for changing the configuration of an existing site:

https://ubos.net/docs/users/faq-howto-t ... odifysite/

However, I cannot figure out how to do these steps. Does anyone know of a YouTube video that shows how to do this? Or a step by step description of what to do for a person that doesn't even know how to get the .json to a terminal to edit? I'm new to the UBOS ecosystem and I am trying to find out how to do the basics.

Appreciate any help I can get!


j12t
Posts: 196
Joined: Tue Dec 12, 2017 9:17 pm
Contact:

Re: Connecting Nextcloud to subdomain

Post by j12t »

Videos would be good, I agree, now somebody just needs to make them :-)

Try this:

Code: Select all

sudo ubos-admin showsite --host '*' --json > /tmp/site.json
vi /tmp/site.json
Make your edits.

Code: Select all

sudo ubos-admin deploy --file /tmp/site.json
Your edits are probably changing the hostname from * to subdomain.domain.tld (your hostname) and adding the

Code: Select all

"tls" : {
    "letsencrypt" : true
},
jdm5
Posts: 7
Joined: Thu Jan 28, 2021 6:23 pm

Re: Connecting Nextcloud to subdomain

Post by jdm5 »

Thank you! Goals for 2021: Videos!

I was able to get to the page to edit the temporary file and was able to change the hostname, but it would not let me add any additional lines of code. I tried to put the new code on the first line inside the curly braces at the very top of the file, but it wasn't recognizing my keyboard or something was going on, when I tried typing the screen would flash white and then the curly braces disappeared. I also couldn't exit from the page, so I had to turn off the UBOSbox to get out. Is there a way to do it by modifying the .json on the Shepard staff and then plugging it into the UBOS? Do you need a special keyboard?

Also, I had to use the code "sudo ubos-admin showsite --hostname" and not just --host, but that seemed to work to get me into the temp file. It said --host was ambitious.

Thank you!
j12t
Posts: 196
Joined: Tue Dec 12, 2017 9:17 pm
Contact:

Re: Connecting Nextcloud to subdomain

Post by j12t »

Chances are that you and vi aren't getting along. That is not unheard of :-) See for example: https://www.dummies.com/web-design-deve ... s-with-vi/

You could use nano instead. First install it, and then run it like this:

Code: Select all

pacman -S nano
nano /tmp/site.json
j12t
Posts: 196
Joined: Tue Dec 12, 2017 9:17 pm
Contact:

Re: Connecting Nextcloud to subdomain

Post by j12t »

Post Reply