How to install Nextcloud 13 in FreeNAS with all checks passed updated to use iocage

twsps

Contributor
Joined
Jul 10, 2018
Messages
113

twsps

Contributor
Joined
Jul 10, 2018
Messages
113
I previously have a website set up using mydomain.com. For now, it's going to redirect to "It works!" page. Should I set up my website inside this jail?
 

fahrgast

Cadet
Joined
Aug 13, 2018
Messages
7
Hi, this is my second time I set up Nextcloud with the help of these instructions. I got it running perfectly fine the first time, but not this time.

After an upgrade of all the installed packages and the third Nextcloud update over the web-ui, I've had some problems with PHP. So I decided to reinstall the whole jail.
Now, when I come to the configuration of Nextcloud through the browser, it looks like the web client can't access /mnt/files. It's reloading the page every few seconds after the configuration of Nextcloud. Nevertheless, default files are created under /mnt/files/admin/files.
I gave full access to the files dataset to "others" to make sure it's not a permission problem on the FreeNAS side.
also: I can't access the Nextcloud log. I think it can't create one.

Did anyone try to follow this thread with success lately?
Any suggestions what I could try or where to look for logs?

Side note: create the group mysql with the Group ID: 88 first, then create the user mysql with User ID: 88 and assign the group mysql. This way you can reset the permissions of the db-dataset to owner and owner group mysql, and give only to those access.
 
Last edited:

fahrgast

Cadet
Joined
Aug 13, 2018
Messages
7
I previously have a website set up using mydomain.com. For now, it's going to redirect to "It works!" page. Should I set up my website inside this jail?
Why don't you just copy the nextcloud folder to your existing website? (I'm not an expert by any means, but I thought this was the easiest way. Assuming you have the website already hosted yourself.)
 
Last edited:

kevkru

Cadet
Joined
Aug 6, 2018
Messages
1
Hello,

I had the following error message from nextcloud preventing me from logging in.

Code:
Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.


and the server log showed:

Code:
..."Could not resolve clientService! Class clientService does not exist"...



I got it to work, the reason was a typo and I needed to place some additonal contents to the nextcloud.config.


SOLUTION

Make sure to check the REDIS config for typos and make sure you have "unixsocketperm 777" and not "unixsocketperm 700".

Just follow the exact steps dureal99d posted for this config:

Now lets Configure REDIS
The purpose is to update redis.conf to run on local socket

Execute command:
Code:
nano /usr/local/etc/redis.conf

In the redis.conf file find the value
Code:
"port" and change it from its default value to 0

uncomment by removing the ; symbol from in front of the below values and edit to match
Code:
unixsocket /tmp/redis.sock
unixsocketperm 777


After that change & add this to your nextcloud config:

Code:
nano /usr/local/www/apache24/data/nextcloud/config/config.php


Code:
  'memcache.local' => '\OC\Memcache\Redis',
  'memcache.locking' => '\OC\Memcache\Redis',
  'redis' => array (
	  'host' => '/tmp/redis.sock',
	  'port' => 0,
	  'timeout' => 0.0,
  ),
);


Further information can be found here, if you need.


After that, try reconnecting to https://yourSite.com/ and you should see the login screen.

Let me know if it worked for you by pressing thanks ;)
 

isidoreisou

Cadet
Joined
Aug 25, 2018
Messages
9
Hey,
Newbie here,
If I want to install Nextcloud on freenas, this method explain in this thread is the best way to go I suppose ? Seems a little bit over my skills.
What is the downside to install Nextcloud via plugins rather than a custom jail like here ?
I am reading everything I can but still not sure about that.
Thanks !
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
If I want to install Nextcloud on freenas, this method explain in this thread is the best way to go I suppose ?
I'm biased, no doubt, but I think my script is a better way to go--mainly because there's much less you need to do manually.
What is the downside to install Nextcloud via plugins rather than a custom jail like here ?
An outdated version of Nextcloud that you can't easily upgrade. I don't know if the plugin has been updated to use mysql, or if it's still using SQLite.
 

isidoreisou

Cadet
Joined
Aug 25, 2018
Messages
9
Thanks for your help !
I'm biased, no doubt, but I think my script is a better way to go--mainly because there's much less you need to do manually.
Well this script looks GREAT I didn't find it when I search "nextcloud" on the forum. I'll definitely try it asap.
An outdated version of Nextcloud that you can't easily upgrade. I don't know if the plugin has been updated to use mysql, or if it's still using SQLite.
I think it uses mysql only now because it didn't offer me to use SQlite.

Thanks a lot for your help ! I'll check your Basic FreeNAS 9.10 Configuration Guide too. Cheers
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

ZeroSynk

Cadet
Joined
Aug 30, 2018
Messages
3
Everything is working and I can get to my server from my domain from outside my network and yet I keep getting this when I try to get the cert. Any ideas?

IMPORTANT NOTES:
- The following errors were reported by the server:

Domain: mydomain.com
Type: unauthorized
Detail: Invalid response from
http://identitykrisis.com/.well-known/acme-challenge/3bxWQCMLn4DcmYZAO-41SpNxkRhT5vJk12dozhsU1Yc:
"<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p"

To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
- Your account credentials have been saved in your Certbot
configuration directory at /usr/local/etc/letsencrypt. You should
make a secure backup of this folder now. This configuration
directory will also contain certificates and private keys obtained
by Certbot so making regular backups of this folder is ideal.

EDIT: Okay so I get the cert

Congratulations! Your certificate and chain have been saved at:
/usr/local/etc/letsencrypt/live/mydomain.com/fullchain.pem
Your key file has been saved at:
/usr/local/etc/letsencrypt/live/mydomain.com/privkey.pem
Your cert will expire on 2018-11-28. To obtain a new or tweaked
version of this certificate in the future, simply run certbot
again. To non-interactively renew *all* of your certificates, run
"certbot renew"
- If you like Certbot, please consider supporting our work by:

But https connections don't work???

This is my first experience with Apache coming from IIS so a bit of a leaning curve to say the least....
 
Last edited:

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
Everything is working and I can get to my server from my domain from outside my network and yet I keep getting this when I try to get the cert. Any ideas?

IMPORTANT NOTES:
- The following errors were reported by the server:

Domain: identitykrisis.com
Type: unauthorized
Detail: Invalid response from
http://identitykrisis.com/.well-known/acme-challenge/3bxWQCMLn4DcmYZAO-41SpNxkRhT5vJk12dozhsU1Yc:
"<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p"

To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
- Your account credentials have been saved in your Certbot
configuration directory at /usr/local/etc/letsencrypt. You should
make a secure backup of this folder now. This configuration
directory will also contain certificates and private keys obtained
by Certbot so making regular backups of this folder is ideal.

EDIT: Okay so I get the cert

Congratulations! Your certificate and chain have been saved at:
/usr/local/etc/letsencrypt/live/identitykrisis.com/fullchain.pem
Your key file has been saved at:
/usr/local/etc/letsencrypt/live/identitykrisis.com/privkey.pem
Your cert will expire on 2018-11-28. To obtain a new or tweaked
version of this certificate in the future, simply run certbot
again. To non-interactively renew *all* of your certificates, run
"certbot renew"
- If you like Certbot, please consider supporting our work by:

But https connections don't work???

This is my first experience with Apache coming from IIS so a bit of a leaning curve to say the least....
I saw that you joined today, first of all, welcome
Second, I would recommend that you advertise something anywhere in the Internet and always substitute personal information for something else. Here for example your domain, you can write Example.com, My domain and more

You added to the htaccess the
Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

?

Everything written in this guide just needs to follow
 
Last edited:

ZeroSynk

Cadet
Joined
Aug 30, 2018
Messages
3
I saw that you joined today, first of all, welcome
Second, I would recommend that you advertise something anywhere in the Internet and always substitute personal information for something else. Here for example your domain, you can write Example.com, My domain and more

You added to the htaccess the
Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

?

Everything written in this guide just needs to follow

The rewrite portion isn't where I am having issues. After I got the message saying "Congratulation's Your certificate and chain have been saved at"

When I try to access my site via HTTPS the browser is telling me "This site can't provide a secure connection"
 
Last edited:

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
The rewrite portion isn't where I am having issues. After I got the message saying "Congratulation's Your certificate and chain have been saved at"

When I try to access my site via HTTPS the browser is telling me "This site can't prove a secure connection"
Did you restart apache after you created?
 

csjjpm

Contributor
Joined
Feb 16, 2015
Messages
126
Hi,
sorry I don't understand the answer here? I get this error and setup my iocage like this:
Code:
iocage create -n "nextcloud" -r 11.1-RELEASE ip4_addr="vnet0|192.168.0.108/24" defaultrouter="192.168.0.1" vnet="on" allow_raw_sockets="1" boot="on"


How should it be different?
thanks
Paul

Trying to install via vnet it also had me the problem and some but after I installed it most of my problems including this were solved

Code:
iocage create -n nextcloud -r 11.1-RELEASE ip4_addr="vnet0|192.168.1.11/24" defaultrouter="192.168.1.2" vnet="on" allow_raw_sockets="1" boot="on"


Change the IP address and default router to match your setup.
 

csjjpm

Contributor
Joined
Feb 16, 2015
Messages
126
The post was updated to this code.

Yep, so I did it as per post. Any ideas how I overcome this error?
Code:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mys
ql.sock' (2)   


thanks
Paul
 

csjjpm

Contributor
Joined
Feb 16, 2015
Messages
126
Destroyed instance and deleted all datasets and started again and it seems to be fine now.
Yep, so I did it as per post. Any ideas how I overcome this error?
Code:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mys
ql.sock' (2)  


thanks
Paul
 

Adures

Dabbler
Joined
May 2, 2017
Messages
44
So i set up nextcloud. It works fine for the most part. I can access in from LAN, i can access it from WAN, certbot is telling me that everything is authorized, https still doesn't work.
When I type my domain name in LAN or WAN i message from nextcloud:
"Access through untrusted domain
Please contact your administrator. If you are an administrator, edit the :trusted_domains " setting in config/config.php just like example in config.sample.php..."

I added my domain name to "trusted_domains" in that .conf file

When i try to access the site, by writing manually https://mydomainname.com i get this error SSL_ERROR_RX_RECORD_TOO_LONG
Any ideas what could be ausing the problems?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Any ideas what could be ausing the problems?
Your server is doing HTTP over port 443--fix your Apache configuration.
 
Top