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

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
certbot certonly --webroot -w /usr/local/www/apache24/data -d YOURSITE.COM with my domain
Is that how the change should be?
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
And now to do just that?
certbot certonly --webroot -w /usr/local/www/apache24/data -d YOURSITE.COM with my domain[/QUOTE]
So it does not work and has the same error
It should be
Code:
certbot certonly --webroot -w /usr/local/www/apache24/data/nextcloud -d YOURSITE.COM 


The script serves the nextcloud folder as root so you must use that path.
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
Domain: My Domain
Type: unauthorized
Detail: Invalid response from
http: // my domain / .well-known / acme-challenge / X6sE7P8JRJ6Goen0FHOHS1DmRLb2tUFCcouRafFDz80:
">"<! DOCTYPE HTML PUBLIC" - // IETF // DTD HTML 2.0 // EN ">
"><html> <head>
404 Not Found "><title> 404 Not Found </ title>
"></ head> <body>
Not Found "><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.
.
It gives me this error
(I wrote about all the problems I had on page 6 in this post)
 
Last edited:

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
Yea when I first set this up I had the same issue. Took me a while to get the cert.
Go into your folder web root and see where certbot has stored the .acmechallenge file. That way you will know for sure the path that its looking for. Dont forget that you must do this step BEFORE you configure the https part so comment out or remove the <VirtualHost 443> part of you .conf file. Certbot uses HTTP and if redirected will fail. The only other thing is that make sure port 80 is reachable from outside your LAN. You dont even need to forward 443, only 80 for the cert.
 

danb35

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

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
Yea when I first set this up I had the same issue. Took me a while to get the cert.
Go into your folder web root and see where certbot has stored the .acmechallenge file. That way you will know for sure the path that its looking for. don't forget that you must do this step BEFORE you configure the https part so comment out or remove the <VirtualHost 443> part of you .conf file. Certbot uses HTTP and if redirected will fail. The only other thing is that make sure port 80 is reachable from outside your LAN. You don't even need to forward 443, only 80 for the cert.

But for HTTPS, port 443 must be open
And why delete the <VirtualHost 443> that the directory says add it, and this is the way to connect with this HTTPS port.
Port 80 is only for HTTP.
Correct me with I'm wrong?
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
Yes but before you use https ,you want a valid caertificate right ? To make the process of getting the cert easier you can remove the https part until you obtain the cert. Then put it back. This is because certbot tries to use http to get a file from your pc. If you redirect its test to https it will fail. If you want to obtain the cert using port 443/https theres additional unnecessary steps you will have to do. See here for more info:
https://certbot.eff.org/docs/using.html#getting-certificates-and-choosing-plugins
 
Last edited:

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
Yes but before you use https ,you want a valid caertificate right ? To make the process of getting the cert easier you can remove the https part until you obtain the cert. Then put it back. This is because certbot tries to use http to get a file from your pc. If you redirect its test to https it will fail. If you want to obtain the cert using port 443/https theres additional unnecessary steps you will have to do. See here for more info:
https://certbot.eff.org/docs/using.html#getting-certificates-and-choosing-plugins

Listen I'll try whatever you say the process should be easier!
Remove both from the domain and from the local IP address <VirtualHost 443> in
Code:
/usr/local/etc/apache24/Includes
??

I made a few more attempts after I changed some things (without success)
But now there is this error:

Code:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
An unexpected error occurred:
There were too many requests of a given type :: Error creating new authz :: too many failed authorizations recently: see https://letsencrypt.org/docs/rate-limits/
Please see the logfiles in /var/log/letsencrypt for more details.


The command I got the error is: certbot certonly --webroot -w /usr/local/www/apache24/data/nextcloud -d With my domain
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
There were too many requests of a given type :: Error creating new authz :: too many failed authorizations recently: see https://letsencrypt.org/docs/rate-limits/
Please see the logfiles in /var/log/letsencrypt for more details.

That error just mean try again tomorrow :p
I just tried to re obtain the cert on my install and the certbot path had to be /usr/local/www/apache24/data/ NOT /nextcloud. I was wrong in my first reply to you.
Also I had ssl enabled and could still do the certbot test so ignore the part about removing the 443 part.
Try changing your apache document root to /data and not /nextcloud in your domain.conf file and try again. Can't think of anything else..
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
That error just mean try again tomorrow :p
I just tried to re obtain the cert on my install and the certbot path had to be /usr/local/www/apache24/data/ NOT /nextcloud. I was wrong in my first reply to you.
Also I had ssl enabled and could still do the certbot test so ignore the part about removing the 443 part.
Try changing your apache document root to /data and not /nextcloud in your domain.conf file and try again. Can't think of anything else..

Hey, I think I've managed to create
Code:
 - Congratulations! Your certificate and chain have been saved at:
   /usr/local/etc/letsencrypt/live/my domain/fullchain.pem
   Your key file has been saved at:
   /usr/local/etc/letsencrypt/live/my domain/privkey.pem
   Your cert will expire on 2018-08-05. 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"



But I do service apache24 restart

That's what he returns

Code:
Performing sanity check on apache24 configuration:
AH00526: Syntax error on line 31 of /usr/local/etc/apache24/Includes/my domain.conf:
SSLCipherSuite takes one argument, Colon-delimited list of permitted SSL Ciphers ('XXX:...:XXX' - see manual)


And how I use the certificate that he created that with I am trying to use HTTPS is giving me the same error I said in the past

Secure Connection Failed

An error occurred during a connection to my domain / IP of the prison. SSL received a record that exceeded the maximum permitted length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG
 
Last edited:

auralsun

Dabbler
Joined
Dec 3, 2012
Messages
26
Hi,

I am having exactly the same problem as wbali. Network related but unsure where to look. FreeNAS set up using the most basic network configuration, gets IP from router via DHCP. Current IP for FreeNAS is 10.0.0.17, nextcloud_13 jail is 10.0.0.18. Any ideas?:

Hi I have problem with cache. When I execute the commands I got:
Code:
root@nextcloudjail:~ # su -m www -c 'php /usr/local/www/apache24/data/nextcloud/occ config:system:set memcache.local --value="\OC\Memcache\APCu"'
System config value memcache.local set to string \OC\Memcache\APCu
root@nextcloudjail:~ # su -m www -c 'php /usr/local/www/apache24/data/nextcloud/occ config:system:set memcache.locking --value="\OC\Memcache\Redis"'
System config value memcache.locking set to string \OC\Memcache\Redis
root@nextcloudjail:~ # su -m www -c 'php /usr/local/www/apache24/data/nextcloud/occ config:system:set redis host --value="/tmp/redis.sock"'
An unhandled exception has been thrown:
RedisException: Connection refused in /usr/local/www/apache24/data/nextcloud/lib/private/RedisFactory.php:84
Stack trace:
#0 /usr/local/www/apache24/data/nextcloud/lib/private/RedisFactory.php(84): Redis->connect('127.0.0.1', 6379, 0)
#1 /usr/local/www/apache24/data/nextcloud/lib/private/RedisFactory.php(100): OC\RedisFactory->create()
#2 /usr/local/www/apache24/data/nextcloud/lib/private/Memcache/Redis.php(42): OC\RedisFactory->getInstance()
#3 /usr/local/www/apache24/data/nextcloud/lib/private/Memcache/Factory.php(134): OC\Memcache\Redis->__construct('e3012fe6c576217...')
#4 /usr/local/www/apache24/data/nextcloud/lib/private/Server.php(854): OC\Memcache\Factory->createLocking('lock')
#5 /usr/local/www/apache24/data/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#6 /usr/local/www/apache24/data/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(116): Pimple\Container->offsetGet('OCP\\Lock\\ILocki...')
#7 /usr/local/www/apache24/data/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('OCP\\Lock\\ILocki...')
#8 /usr/local/www/apache24/data/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(164): OC\ServerContainer->query('OCP\\Lock\\ILocki...')
#9 /usr/local/www/apache24/data/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(109): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#10 /usr/local/www/apache24/data/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(116): Pimple\Container->offsetGet('LockingProvider')
#11 /usr/local/www/apache24/data/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('LockingProvider')
#12 /usr/local/www/apache24/data/nextcloud/lib/private/Server.php(1765): OC\ServerContainer->query('LockingProvider')
#13 /usr/local/www/apache24/data/nextcloud/lib/private/Files/View.php(114): OC\Server->getLockingProvider()
#14 /usr/local/www/apache24/data/nextcloud/lib/private/Server.php(193): OC\Files\View->__construct()
#15 /usr/local/www/apache24/data/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#16 /usr/local/www/apache24/data/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(116): Pimple\Container->offsetGet('EncryptionManag...')
#17 /usr/local/www/apache24/data/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('EncryptionManag...')
#18 /usr/local/www/apache24/data/nextcloud/lib/private/Server.php(1229): OC\ServerContainer->query('EncryptionManag...')
#19 /usr/local/www/apache24/data/nextcloud/lib/base.php(865): OC\Server->getEncryptionManager()
#20 /usr/local/www/apache24/data/nextcloud/lib/base.php(737): OC::registerEncryptionWrapper()
#21 /usr/local/www/apache24/data/nextcloud/lib/base.php(1080): OC::init()
#22 /usr/local/www/apache24/data/nextcloud/console.php(46): require_once('/usr/local/www/...')
#23 /usr/local/www/apache24/data/nextcloud/occ(11): require_once('/usr/local/www/...')
#24 {main}root@nextcloudjail:~ #

After jail reboot i got:
Code:
root@nextcloudjail:~ # su -m www -c 'php /usr/local/www/apache24/data/nextcloud/occ config:system:set memcache.local --value="\OC\Memcache\APCu"'
An unhandled exception has been thrown:
RedisException: Redis server went away in /usr/local/www/apache24/data/nextcloud/lib/private/Memcache/Redis.php:54
Stack trace:
#0 /usr/local/www/apache24/data/nextcloud/lib/private/Memcache/Redis.php(54): Redis->get('e3012fe6c576217...')
#1 /usr/local/www/apache24/data/nextcloud/lib/private/App/InfoParser.php(57): OC\Memcache\Redis->get('/usr/local/www/...')
#2 /usr/local/www/apache24/data/nextcloud/lib/private/legacy/app.php(621): OC\App\InfoParser->parse('/usr/local/www/...')
#3 /usr/local/www/apache24/data/nextcloud/lib/private/AppFramework/App.php(62): OC_App::getAppInfo('files')
#4 /usr/local/www/apache24/data/nextcloud/lib/private/legacy/app.php(220): OC\AppFramework\App::buildAppNamespace('files')
#5 /usr/local/www/apache24/data/nextcloud/lib/private/legacy/app.php(119): OC_App::registerAutoloading('files', '/usr/local/www/...')
#6 /usr/local/www/apache24/data/nextcloud/lib/base.php(661): OC_App::loadApps(Array)
#7 /usr/local/www/apache24/data/nextcloud/lib/base.php(1080): OC::init()
#8 /usr/local/www/apache24/data/nextcloud/console.php(46): require_once('/usr/local/www/...')
#9 /usr/local/www/apache24/data/nextcloud/occ(11): require_once('/usr/local/www/...')
#10 {main}root@nextcloudjail:~ #

redis.sock is present in /tmp
Can anybody help me?

Edit1: When I manualy added
Code:
  'redis' =>
   array (
	'host' => '/tmp/redis.sock',
   ),
to config.php and Ignore "Additional steps for php 7.1" so I left 'memcache.local' => '\\OC\\Memcache\\APCu', It seems to work... But I don't think it's ok.

Edit2: Wll it is not ok. Here is piece of nextcloud log:
Code:

RedisException: Redis server went away
  1. /usr/local/www/apache24/data/nextcloud/lib/private/Memcache/Redis.php - line 114: Redis->incrBy('e3012fe6c576217...', 1)
  2. /usr/local/www/apache24/data/nextcloud/lib/private/Lock/MemcacheLockingProvider.php - line 73: OC\Memcache\Redis->inc('files/04107a50f...')
  3. /usr/local/www/apache24/data/nextcloud/lib/private/Files/Storage/Common.php - line 709: OC\Lock\MemcacheLockingProvider->acquireLock('files/04107a50f...', 1)
  4. /usr/local/www/apache24/data/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 592: OC\Files\Storage\Common->acquireLock('files/gallery.c...', 1, Object(OC\Lock\MemcacheLockingProvider))
  5. /usr/local/www/apache24/data/nextcloud/lib/private/Files/View.php - line 1926: OC\Files\Storage\Wrapper\Wrapper->acquireLock('files/gallery.c...', 1, Object(OC\Lock\MemcacheLockingProvider))
  6. /usr/local/www/apache24/data/nextcloud/lib/private/Files/View.php - line 2036: OC\Files\View->lockPath('/root/files/gal...', 1, false)
  7. /usr/local/www/apache24/data/nextcloud/lib/private/Files/View.php - line 1321: OC\Files\View->lockFile('/root/files/gal...', 1)
  8. /usr/local/www/apache24/data/nextcloud/lib/private/Files/View.php - line 1371: OC\Files\View->getCacheEntry(Object(OCA\Files_Trashbin\Storage), 'files/gallery.c...', '/root/files/gal...')
  9. /usr/local/www/apache24/data/nextcloud/lib/private/Files/Node/Root.php - line 198: OC\Files\View->getFileInfo('/root/files/gal...')
  10. /usr/local/www/apache24/data/nextcloud/lib/private/Files/Node/Folder.php - line 133: OC\Files\Node\Root->get('/root/files/gal...')
  11. /usr/local/www/apache24/data/nextcloud/lib/private/Files/Node/Folder.php - line 142: OC\Files\Node\Folder->get('gallery.cnf')
  12. /usr/local/www/apache24/data/nextcloud/apps/gallery/lib/Service/ConfigService.php - line 191: OC\Files\Node\Folder->nodeExists('gallery.cnf')
  13. /usr/local/www/apache24/data/nextcloud/apps/gallery/lib/Service/ConfigService.php - line 101: OCA\Gallery\Service\ConfigService->configExists(Object(OC\Files\Node\Folder))
  14. /usr/local/www/apache24/data/nextcloud/apps/gallery/lib/Controller/Config.php - line 47: OCA\Gallery\Service\ConfigService->getFeaturesList()
  15. /usr/local/www/apache24/data/nextcloud/apps/gallery/lib/Controller/ConfigController.php - line 64: OCA\Gallery\Controller\ConfigController->getConfig(true)
  16. [internal function] OCA\Gallery\Controller\ConfigController->get(true)
  17. /usr/local/www/apache24/data/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 161: call_user_func_array(Array, Array)
  18. /usr/local/www/apache24/data/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 91: OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Gallery\Controller\ConfigController), 'get')
  19. /usr/local/www/apache24/data/nextcloud/lib/private/AppFramework/App.php - line 115: OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Gallery\Controller\ConfigController), 'get')
  20. /usr/local/www/apache24/data/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App main('ConfigControlle...', 'get', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
  21. [internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
  22. /usr/local/www/apache24/data/nextcloud/lib/private/Route/Router.php - line 297: call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
  23. /usr/local/www/apache24/data/nextcloud/lib/base.php - line 998: OC\Route\Router->match('/apps/gallery/c...')
  24. /usr/local/www/apache24/data/nextcloud/index.php - line 37: OC handleRequest()
  25. {main}

Edit4: Well I'm probably idiot but i try again commands after third restart and it works!
I changed networking (vnet) so maybe it was the problem?
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
Code:
Performing sanity check on apache24 configuration:
AH00526: Syntax error on line 31 of /usr/local/etc/apache24/Includes/my domain.conf:
SSLCipherSuite takes one argument, Colon-delimited list of permitted SSL Ciphers ('XXX:...:XXX' - see manual)


And how I use the certificate that he created that with I am trying to use HTTPS is giving me the same error I said in the past

Yes there is a unnecessary space on that line. It was mentioned in a post in this thread on page 2 or 3. Go to line 31 and carefully find it or look through the thread to copy and paste the fixed line.
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
Yes there is a unnecessary space on that line. It was mentioned in a post in this thread on page 2 or 3. Go to line 31 and carefully find it or look through the thread to copy and paste the fixed line.

It works I have HTTPS and the most powerful security (SHA384) (and is directing all communications to HTTPS Bay bye HTTP) Huge thanks to you !!!!!!!!!!!!!! I just dreamed that I would succeed because I tried to do it with Owncloud in a really similar process and I was not even close to succeeding the huge thank you !!!!!!!!!!!!
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
Yes there is a unnecessary space on that line. It was mentioned in a post in this thread on page 2 or 3. Go to line 31 and carefully find it or look through the thread to copy and paste the fixed line.

I just need help with something last and that's all it will work perfectly I have to use SMB but I try to set up (after installing "external storage")
That's what he writes:

The FTP support in PHP is not enabled or installed. Mounting of "FTP" is not possible. Please ask your system administrator to install it.
"smbclient" is not installed. Mounting of "SMB / CIFS", "SMB / CIFS using OC login" is not possible. Please ask your system administrator to install it
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
Hey! That great, Congrats :)
Not sure about FTP sorry. I dont use it and dont plan to.
For smb
pkg install samba47
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
Hey! That great, Congrats :)
Not sure about FTP sorry. I don't use it and don't plan to.
For smb
pkg install samba47
Where to install it?
In / nextcloud
Or within the jaill itself?
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
Within the jail
 

Itay1778

Patron
Joined
Jan 29, 2018
Messages
269
Top