How to enable https protocol for Nextcloud on UBOSbox

Questions and discussions about Indie Computing's UBOSbox
Post Reply
dln949
Posts: 10
Joined: Mon Mar 25, 2019 6:02 pm

How to enable https protocol for Nextcloud on UBOSbox

Post by dln949 » Tue Mar 26, 2019 4:11 pm

How do I enable the https protocol for Nextcloud on UBOSbox?

I am assuming that I should not be trying to follow all the numerous online guides for this provided by Nextcloud. Rather, I'm interested in what Indie Computing recommends.

Thanks.



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

Re: How to enable https protocol for Nextcloud on UBOSbox

Post by j12t » Wed Mar 27, 2019 7:00 pm

This varies depending on whether you bring your own cert, you use a self-signed cert, you have a service like Letsencrypt generate the cert for you, and what your hostname is. If you got through Pagetkite or whether you port forward also makes a difference.

For reference, consult https://ubos.net/docs/users/create-ssl-site.html , https://ubos.net/docs/users/ubos-admin. ... min-deploy and https://ubos.net/docs/developers/site-json.html .

dln949
Posts: 10
Joined: Mon Mar 25, 2019 6:02 pm

Re: How to enable https protocol for Nextcloud on UBOSbox

Post by dln949 » Mon Apr 01, 2019 4:21 am

j12t wrote:
Wed Mar 27, 2019 7:00 pm
This varies depending on whether you bring your own cert, you use a self-signed cert, you have a service like Letsencrypt generate the cert for you, and what your hostname is. If you got through Pagetkite or whether you port forward also makes a difference.

For reference, consult https://ubos.net/docs/users/create-ssl-site.html , https://ubos.net/docs/users/ubos-admin. ... min-deploy and https://ubos.net/docs/developers/site-json.html .
Thank you.

For the first URL you propose, the first option is to have a "self-signed" site. I am relying on pagekite. Can I follow those instructions exactly as shown for a "self-signed" site? Or, do I need to do something different/additional with pagekite? (Sorry, I am very new to all this.)

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

Re: How to enable https protocol for Nextcloud on UBOSbox

Post by j12t » Tue Apr 02, 2019 12:49 am

If you go for self-signed, whether you use Pagekite or not should make no difference. Your visitors will see a browser warning, however (because it is self-signed). Keep in mind, however, if you go through "createsite" that you will end up with a second site running a second instance of Nextcloud.

There isn't currently a dead-simple way of adding SSL after the fact; the easiest would be to add the tls / letsencrypt entry to your existing Site JSON.

dln949
Posts: 10
Joined: Mon Mar 25, 2019 6:02 pm

Re: How to enable https protocol for Nextcloud on UBOSbox

Post by dln949 » Wed Apr 03, 2019 3:35 am

j12t wrote:
Tue Apr 02, 2019 12:49 am
If you go for self-signed, whether you use Pagekite or not should make no difference. Your visitors will see a browser warning, however (because it is self-signed). Keep in mind, however, if you go through "createsite" that you will end up with a second site running a second instance of Nextcloud.

There isn't currently a dead-simple way of adding SSL after the fact; the easiest would be to add the tls / letsencrypt entry to your existing Site JSON.

Thanks for your help..... Unfortunately, I fear that this is starting to turn into a potential disaster for me.

I followed the instructions shown at https://ubos.net/docs/users/create-ssl-site.html using the "self-signed certificate" instructions.

I didn't know what to use for the hostname question, and I couldn't find any documentation that provided any guidance, so I just made up one called "ubosbox". Was that bad? It would not allow me to use * as the response to the hostname question for some reason.

Then, when it asked for an "app" to install, I didn't know exactly what it was looking for, I assumed that I should install nextcloud, so I entered "nextcloud". But then I got the mysterious error message you see in the attached screenshot. It suggested I run pacman-db-upgrade, but I did not, I did not know if that is something I should do. Should I?

So, I did not install any app.

Now, through my pagekite url, I can still access my nextcloud server, but it does NOT use the https protocol, it is still the http protocol. So for some reason this is not working.

So, I am very, very confused on what I should be doing. What have I done? Do I need to undo something I have done? (If so, how do I do that?) What should I be doing to use the https protocol at this point?


Screenshot from 2019-04-02 22-12-33.png
Screenshot from 2019-04-02 22-12-33.png (78.44 KiB) Viewed 348 times

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

Re: How to enable https protocol for Nextcloud on UBOSbox

Post by j12t » Wed Apr 03, 2019 5:19 pm

You created a second site on your box ("createsite" is named like this for a reason). "ubos-admin listsites" will show what sites you currently have. (You can run any number of websites on your UBOSbox, but you are now well outside the range of what the shipped UBOSbox product is intended to do -- however, things should be sufficiently documented at https://ubos.net/docs/)

I wrote earlier: "the easiest would be to add the tls / letsencrypt entry to your existing Site JSON." but apparently you decided not to do that.

Also, I strongly recommend you learn the basics of DNS and what a hostname is if you are doing things like this.

dln949
Posts: 10
Joined: Mon Mar 25, 2019 6:02 pm

Re: How to enable https protocol for Nextcloud on UBOSbox

Post by dln949 » Wed Apr 03, 2019 9:45 pm

j12t wrote:
Wed Apr 03, 2019 5:19 pm
You created a second site on your box ("createsite" is named like this for a reason). "ubos-admin listsites" will show what sites you currently have. (You can run any number of websites on your UBOSbox, but you are now well outside the range of what the shipped UBOSbox product is intended to do -- however, things should be sufficiently documented at https://ubos.net/docs/)

I wrote earlier: "the easiest would be to add the tls / letsencrypt entry to your existing Site JSON." but apparently you decided not to do that.

Also, I strongly recommend you learn the basics of DNS and what a hostname is if you are doing things like this.
Probably good advice, I am very unfamiliar with DNS, hostnames, etc. (I did not do the site JSON thing you recommended because despite the reading I did I still could not understand what a JSON is.)

Post Reply