Resource icon

Scripted installation of Nextcloud 28 in iocage jail 2018-03-23

Pctravel

Dabbler
Joined
Aug 11, 2018
Messages
26
all the dates in that log are only showing 4/9 original from what I see, it did show successful and "done" at the end of the below log. Doesn't look like it tried to renew???
=====line 1 col 0 lines from top 1 ============================================
2020/04/09 14:26:03 [INFO] Caddy version: v1.0.4
Activating privacy features... 2020/04/09 14:26:03 [INFO][cache:9b0] St
2020/04/09 14:26:09 [INFO] acme: Registering account for stiversont@gmail.com
2020/04/09 14:26:09 [INFO][.net] Obtain certificate
2020/04/09 14:26:09 [INFO][s.net] Obtain: Waiting on rate lim
2020/04/09 14:26:09 [INFO][.net] Obtain: Done waiting
2020/04/09 14:26:09 [INFO] [.net] acme: Obtaining bundled SA
2020/04/09 14:26:09 [INFO] [.net] AuthURL: https://acme-stag
2020/04/09 14:26:09 [INFO] [.net] acme: Could not find solve
2020/04/09 14:26:09 [INFO] [.net] acme: use http-01 solver
2020/04/09 14:26:09 [INFO] [d.net] acme: Trying to solve HTTP
2020/04/09 14:26:09 [INFO] [d.net] Ser
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,464
Well, what you're describing doesn't make much sense, it doesn't begin to match what you posted, and what you posted seems to be very heavily edited, so it's kind of hard to guess. Are ports 80 and 443 still open from the Internet to your jail? What's the output of tail /var/log/caddy.log and service caddy status?
 

Pctravel

Dabbler
Joined
Aug 11, 2018
Messages
26
I get Service caddy is running, below was the response from Tail command. I am still seeing port forwarding on.
1597198470270.png

here is the snip of the caddy.log. Cut and paste was cutting it all off.
1597198722417.png
 

Attachments

  • 1597197555023.png
    1597197555023.png
    57.4 KB · Views: 273
Last edited:

xames

Patron
Joined
Jun 1, 2020
Messages
235
So many cp failed, why that happened to me?


cp: /mnt/includes/php.ini: No such file or directory
Command: cp /mnt/includes/php.ini /usr/local/etc/php.ini failed!
cp: /mnt/includes/redis.conf: No such file or directory
Command: cp /mnt/includes/redis.conf /usr/local/etc/redis.conf failed!
cp: /mnt/includes/www.conf: No such file or directory
Command: cp /mnt/includes/www.conf /usr/local/etc/php-fpm.d/ failed!
cp: /mnt/includes/remove-staging.sh: No such file or directory
Command: cp /mnt/includes/remove-staging.sh /root/ failed!
Copying Caddyfile for Let's Encrypt DNS cert
cp: /mnt/includes/Caddyfile-dns: No such file or directory
Command: cp /mnt/includes/Caddyfile-dns /usr/local/www/Caddyfile failed!
cp: /mnt/includes/caddy: No such file or directory
Command: cp /mnt/includes/caddy /usr/local/etc/rc.d/ failed!
cp: /mnt/includes/my-system.cnf: No such file or directory
Command: cp /mnt/includes/my-system.cnf /var/db/mysql/my.cnf failed!
sed: /usr/local/www/Caddyfile: No such file or directory
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,464
So many cp failed, why that happened to me?
Something's wrong either with your includes directory itself or adding the mountpoint to your jail, but for the life of me I can't think what.
 
Joined
Jan 4, 2014
Messages
1,644
So many cp failed, why that happened to me?
Destroy the jail and run the script again. If you still have problems, provide a copy of your nextcloud-config, redacted if necessary. Make sure you place it between code blocks. In future, make sure any output from the installation is also provided within code blocks, otherwise, it's quite difficult to read.

screenshot.443.png
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
I think i found it, i put mnt/POOL1\nextcloud\db and is mnt/POOL1/nextcloud/db sorry for the time i'm so disaster. But no seems not working that solution
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,464
i put mnt/POOL1\nextcloud\db and is mnt/POOL1/nextcloud/db
That would, I think, cause the problem, but I thought the script would check for it--I'll have to see and add that if not.
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
Api key is modified for publish. With this configuration the error in last post occurs, how i can proceed now?

Code:
AIL_IP="192.168.2.96"
DEFAULT_GW_IP="192.168.2.1"
POOL_PATH="/mnt/POOL2"
TIME_ZONE="Europe/Madrid"
HOST_NAME="Nextcloud.mydomain.com"
DB_PATH="$POOL_PATH/nextcloud/db"
FILES_PATH="$POOL_PATH/nextcloud/files"
CONFIG_PATH="$POOL_PATH/nextcloud/config"
THEMES_PATH="$POOL_PATH/nextcloud/themes"
DNS_CERT=1
DNS_PLUGIN="cloudflare"
CERT_EMAIL="jaume@mydomain.com"
DNS_ENV="CLOUDFLARE_EMAIL=jaume@mydomain.com CLOUDFLARE_API_KEY=43a2fcaf5aac3e1f2c280e34c457ec0518866"
 
Last edited:

xames

Patron
Joined
Jun 1, 2020
Messages
235
I attach the nextcloud.log

Code:
gpg: Good signature from "Nextcloud Security <security@nextcloud.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 2880 6A87 8AE4 23A2 8372  792E D758 99B9 A724 937A
mysql_enable:  -> YES
redis_enable:  -> YES
php_fpm_enable:  -> YES
cp: /mnt/includes/php.ini: No such file or directory
Command: cp /mnt/includes/php.ini /usr/local/etc/php.ini failed!
cp: /mnt/includes/redis.conf: No such file or directory
Command: cp /mnt/includes/redis.conf /usr/local/etc/redis.conf failed!
cp: /mnt/includes/www.conf: No such file or directory
Command: cp /mnt/includes/www.conf /usr/local/etc/php-fpm.d/ failed!
cp: /mnt/includes/remove-staging.sh: No such file or directory
Command: cp /mnt/includes/remove-staging.sh /root/ failed!
Copying Caddyfile for Let's Encrypt DNS cert
cp: /mnt/includes/Caddyfile-dns: No such file or directory
Command: cp /mnt/includes/Caddyfile-dns /usr/local/www/Caddyfile failed!
cp: /mnt/includes/caddy: No such file or director
Command: cp /mnt/includes/caddy /usr/local/etc/rc.d/ failed!
cp: /mnt/includes/my-system.cnf: No such file or directory
Command: cp /mnt/includes/my-system.cnf /var/db/mysql/my.cnf failed!
sed: /usr/local/www/Caddyfile: No such file or directory
Command: sed -i  s/yourhostnamehere/Nextcloud.mydomain.com/ /usr/local/www/Caddyfile failed!
sed: /usr/local/www/Caddyfile: No such file or directory
Command: sed -i  s/dns_plugin/cloudflare/ /usr/local/www/Caddyfile failed!
sed: /usr/local/www/Caddyfile: No such file or directory
Command: sed -i  s/api_token// /usr/local/www/Caddyfile failed!
sed: /usr/local/www/Caddyfile: No such file or directory
Command: sed -i  s/jail_ip/192.168.2.96/ /usr/local/www/Caddyfile failed!
sed: /usr/local/www/Caddyfile: No such file or directory
Command: sed -i  s/youremailhere/jaume@mydomain.com/ /usr/local/www/Caddyfile failed!
sed: /usr/local/etc/php.ini: No such file or directory
Command: sed -i  s|mytimezone|Europe/Madrid| /usr/local/etc/php.ini failed!
caddy_enable:  -> YES
caddy_config:  -> /usr/local/www/Caddyfile
* Stopping nextcloud
  + Executing prestop OK
  + Stopping services OK
  + Tearing down VNET OK
  + Removing devfs_ruleset: 1002 OK
  + Removing jail process OK
  + Executing poststop OK
No default gateway found for ipv6.
* Starting nextcloud
  + Started OK
  + Using devfs_ruleset: 1002 (iocage generated default)
  + Configuring VNET OK
  + Using IP options: vnet
  + Starting services OK
  + Executing poststart OK
Reinstall detected, skipping generation of new config and database
cp: /mnt/includes/my.cnf: No such file or directory
Command: cp /mnt/includes/my.cnf /root/.my.cnf failed!
sed: /root/.my.cnf: No such file or directory
Command: sed -i  s|mypassword|yhafFoPDSU0IvRAZcX3wNg==| /root/.my.cnf failed!
crontab: /mnt/includes/www-crontab: No such file or directory
Command: crontab /mnt/includes/www-crontab failed!
Successfully removed mount from nextcloud's fstab

Installation complete!

Using your web browser, go to https://Nextcloud.mydomain.com to log in
You did a reinstall, please use your old database and account credentials
You have obtained your Let's Encrypt certificate using the staging server.
This certificate will not be trusted by your browser and will cause SSL errors
when you connect.  Once you've verified that everything else is working
correctly, you should issue a trusted certificate.  To do this, run:
  iocage exec nextcloud /root/remove-staging.sh
Command exit status: 0

Script done on Sun Aug 16 00:27:36 2020
 
Last edited:
Joined
Jan 4, 2014
Messages
1,644
Api key is modified for publish. With this configuration the error in last post occurs, how i can proceed now?
You need to stick closely to danb35's instructions at https://github.com/danb35/freenas-iocage-nextcloud. Nowhere does he mention DNS_ENV, so I'm not sure how you've managed to include that? Please review those instructions and use DNS_TOKEN.

As you're using the default paths, you can also remove DB_PATH, FILES_PATH, CONFIG_PATH and THEMES_PATH from nextcloud-config.
 
Last edited:
Joined
Jan 4, 2014
Messages
1,644

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,464
DB_PATH="$POOL_PATH/nextcloud/db"
FILES_PATH="$POOL_PATH/nextcloud/files"
CONFIG_PATH="$POOL_PATH/nextcloud/config"
THEMES_PATH="$POOL_PATH/nextcloud/themes"
Why are you defining these, only to set them to their defaults? This is a waste of space in your nextcloud-config file and only serves to confuse things--delete these lines.
DNS_ENV="CLOUDFLARE_EMAIL=jaume@mydomain.com CLOUDFLARE_API_KEY=43a2fcaf5aac3e1f2c280e34c457ec0518866"
Cloudflare's credentials have changed with Caddy v2, as discussed in the README. Read it, get an API token, and specify it properly in the nextcloud-config file.

And as Basil already said, no, that isn't the nextcloud.log file--and when (if) you do get around to getting it right, put it in code tags.
 
Joined
Jan 4, 2014
Messages
1,644

xames

Patron
Joined
Jun 1, 2020
Messages
235
You need to stick closely to danb35's instructions at https://github.com/danb35/freenas-iocage-nextcloud. Nowhere does he mention DNS_ENV, so I'm not sure how you've managed to include that? Please review those instructions and use DNS_TOKEN.

As you're using the default paths, you can also remove DB_PATH, FILES_PATH, CONFIG_PATH and THEMES_PATH from nextcloud-config.

The danb35 github say that:

Visit the Caddy download page to see the DNS authentication plugins currently available. To build Caddy with your desired plugin, use the last part of the "Package" on that page as DNS_PLUGIN in your nextcloud-config file. E.g., if the package name is github.com/caddy-dns/cloudflare, you'd set DNS_PLUGIN=cloudflare. From that page, there are also links to the documentation for each plugin, which will describe what credentials are needed. If your provider needs only an API token (as is the case with Cloudflare, and apparently with DNSPod), you'll likely be able to set DNS_TOKEN=long_api_token in the nextcloud-config file and not need to do anything else. If your provider requires different credentials, you'll need to modify the Caddyfile to account for them.

But the DNS_PLUGIN=cloudflare or DNS_PLUGIN="cloudflare" i have doubts on that.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,464
But the DNS_PLUGIN=cloudflare or DNS_PLUGIN="cloudflare" i have doubts on that.
Use quotes or not, it doesn't make a difference.
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
I attach the nextcloud.log

Code:
gpg: Good signature from "Nextcloud Security <security@nextcloud.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 2880 6A87 8AE4 23A2 8372  792E D758 99B9 A724 937A
mysql_enable:  -> YES
redis_enable:  -> YES
php_fpm_enable:  -> YES
cp: /mnt/includes/php.ini: No such file or directory
Command: cp /mnt/includes/php.ini /usr/local/etc/php.ini failed!
cp: /mnt/includes/redis.conf: No such file or directory
Command: cp /mnt/includes/redis.conf /usr/local/etc/redis.conf failed!
cp: /mnt/includes/www.conf: No such file or directory
Command: cp /mnt/includes/www.conf /usr/local/etc/php-fpm.d/ failed!
cp: /mnt/includes/remove-staging.sh: No such file or directory
Command: cp /mnt/includes/remove-staging.sh /root/ failed!
Copying Caddyfile for Let's Encrypt DNS cert
cp: /mnt/includes/Caddyfile-dns: No such file or directory
Command: cp /mnt/includes/Caddyfile-dns /usr/local/www/Caddyfile failed!
cp: /mnt/includes/caddy: No such file or director
Command: cp /mnt/includes/caddy /usr/local/etc/rc.d/ failed!
cp: /mnt/includes/my-system.cnf: No such file or directory
Command: cp /mnt/includes/my-system.cnf /var/db/mysql/my.cnf failed!
sed: /usr/local/www/Caddyfile: No such file or directory
Command: sed -i  s/yourhostnamehere/Nextcloud.mydomain.com/ /usr/local/www/Caddyfile failed!
sed: /usr/local/www/Caddyfile: No such file or directory
Command: sed -i  s/dns_plugin/cloudflare/ /usr/local/www/Caddyfile failed!
sed: /usr/local/www/Caddyfile: No such file or directory
Command: sed -i  s/api_token// /usr/local/www/Caddyfile failed!
sed: /usr/local/www/Caddyfile: No such file or directory
Command: sed -i  s/jail_ip/192.168.2.96/ /usr/local/www/Caddyfile failed!
sed: /usr/local/www/Caddyfile: No such file or directory
Command: sed -i  s/youremailhere/jaume@mydomain.com/ /usr/local/www/Caddyfile failed!
sed: /usr/local/etc/php.ini: No such file or directory
Command: sed -i  s|mytimezone|Europe/Madrid| /usr/local/etc/php.ini failed!
caddy_enable:  -> YES
caddy_config:  -> /usr/local/www/Caddyfile
* Stopping nextcloud
  + Executing prestop OK
  + Stopping services OK
  + Tearing down VNET OK
  + Removing devfs_ruleset: 1002 OK
  + Removing jail process OK
  + Executing poststop OK
No default gateway found for ipv6.
* Starting nextcloud
  + Started OK
  + Using devfs_ruleset: 1002 (iocage generated default)
  + Configuring VNET OK
  + Using IP options: vnet
  + Starting services OK
  + Executing poststart OK
Reinstall detected, skipping generation of new config and database
cp: /mnt/includes/my.cnf: No such file or directory
Command: cp /mnt/includes/my.cnf /root/.my.cnf failed!
sed: /root/.my.cnf: No such file or directory
Command: sed -i  s|mypassword|yhafFoPDSU0IvRAZcX3wNg==| /root/.my.cnf failed!
crontab: /mnt/includes/www-crontab: No such file or directory
Command: crontab /mnt/includes/www-crontab failed!
Successfully removed mount from nextcloud's fstab

Installation complete!

Using your web browser, go to https://Nextcloud.mydomain.com to log in
You did a reinstall, please use your old database and account credentials
You have obtained your Let's Encrypt certificate using the staging server.
This certificate will not be trusted by your browser and will cause SSL errors
when you connect.  Once you've verified that everything else is working
correctly, you should issue a trusted certificate.  To do this, run:
  iocage exec nextcloud /root/remove-staging.sh
Command exit status: 0

Script done on Sun Aug 16 00:27:36 2020

command cp and sed -i persist, how i can resolve?
 
Top