Freenas and nextcloud

Hi, I just installed freenas and the nextcloud plugin10.0.3

is there a way to change the port for https ?

Also if I create a self signed certificate will the data sent between the pc and the server encrypted ?

Is the plugin using Apache? You could look for the ports.conf file and change the “Listen 443” line to the port of your choice. Also, my assumption is the default install of Nextcloud plugin on FreeNAS is using just port 80…I would look at setting up another conf file and give it the tags:

If you add your self-signed certificate to your own port your doing encrypted traffic on, the connection will be encrypted. Just remember when connecting with your browser you’re going to have to specify the port and ignore the bad cert warning

You have to install apache2 and Mysql and then follow @stratacast suggestion to configure the port and self-sign certs.

if your ISP allows port 443 “mine doesn’t” you can use https://letsencrypt.org/ for free ssl certs.

nevermind about the port changed, managed to get around with a port xxxx being forwarded to 443 through the router.

another 2 problems I am encountering are

-when connecting the windows application
failed to connect to nextcloud at: https://.mine.nu:*
error downloading …server replied: bad request

most probably the above issues are related to each other.

Any ideas ?

You need to use an internal computer / device (with access to the 192.168.0.4 network) in order to add the the external domain as a trusted domain.

I used my desktop (that is on the same network as nextcloud)to do this.

Just go to https://.mine.nu:*** on an internal computer click add to trusted domain, it will redirect to the https://192.168.0.4/settings/admin?trustDomain=.mine.nu:*** page you login as an admin and you should be good to go.

After that https://***.mine.nu:*** will be trusted and will work.

Did you generate the private/public key pair from your NextCloud server? if your ISP has port 443 open you can use LetsEncrypt “free ssl certificate”.
Is your site listening on a specific port? If so, in your Router did you specify the NAT to forward incoming request to that specific port?

my problem is that one of the pcs is my work pc and its a hassle to take it home with me lol

I generated the certificate using the below steps:

https://www.stephen-scotter.net/computers/freenas-ownclound-setup-warningyour-web-server-is-not-yet-properly-setup-to-allow-files-synchronization-because-the-webdav-interface-seems-to-be-broken-please-double-check-the-installation-guides

port 443 is opened and my site is using the default ports 443 all I did was go to the router type the external port (random port number) 7777 and configure the internal port 443 on ip address 192.168.0.4

will try and have a look at the lets encrypt but I am sure that the redirection of the dns to the internal ip has nothing to do with the certificate

You only need to trust the domain once. It can be any computer, doesn’t need to be one that your syncing with.

Correct,

This isn’t a SSL issue, but an internal Nextcloud webserver thing currently it is setup to only accept clients from the local ip address domain name.

Ok I looked up the command, if you don’t have access to a local computer run this on your owncloud server

I think this is the correct command.
You will need to be in your Nextcloud folder for this to work.

sudo ./occ config:system:set trusted_domains 2 --value=your.domain
Change the your.domain to your domain.

You can see more info here under trusted domain header

https://docs.nextcloud.com/server/11/admin_manual/installation/installation_wizard.html#trusted-domains

managed to get it working, deleted the whole nextcloud and reinstalled and it is working fine.

question, can you request an SSL certificate on a subdomain? (I do not own the domain, I am using dyndns)

Yes you can request it for a sub domain using Lets Encrypt

1 Like