Resource icon

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

danb35

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

hafnix

Dabbler
Joined
Mar 24, 2019
Messages
24
Ok thank you for the hint, I tried to run the script where I replaced {HOST_NAME} with my.hostna.me as a example, i.e. the Dyndns hostname.
All output is ">" and nothing else happens... any hint ?
 
Last edited:

Platter7

Dabbler
Joined
Sep 22, 2018
Messages
35
This script uses acme.sh to get a certificate for your jail. In order to obtain the cert, one of two things must be true:
  1. You have a fully-qualified domain name ("$FQDN") that points to your jail, and the jail is reachable from the public Internet with ports 80 and 443 open to the jail--that is, if an Internet user browses to http://$FQDN, they'll reach your jail. -or-
  2. Your DNS host has an API that's supported by acme.sh, allowing automated updates to your DNS records. Cloudflare has such an API, and provides DNS hosting for free. Many other DNS hosts' APIs are also supported; see https://github.com/Neilpang/acme.sh/tree/master/dnsapi

Is one of these two options above to prefer / better, or are they equal in safety and functionallity?
I have a NO-IP (free) domain and a Dynamic DNS client configured on my PFsense router/firewall to update the current IP-adress, so I guess this would qualify for option 1...
Also I saw that NO-IP was not in the DNS host list with supported APIs…
 

hafnix

Dabbler
Joined
Mar 24, 2019
Messages
24
Yes in my case it would be option 1, as I am using my Router to update the Ip-Address and this works fine.
However if No-IP is the problem ? which one should I chose ?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Is one of these two options above to prefer / better, or are they equal in safety and functionallity?
I like DNS validation better, and one of the reasons is that the jail doesn't have to be open to incoming connections on ports 80 and 443 for it to work. But both will work, and most folks would probably prefer to have the Nextcloud installations open to the Internet anyway
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
All output is ">" and nothing else happens... any hint ?
What exactly are you entering? Redact your hostname if you like, but leave everything else. Edit: I copied and pasted from the script, so most of the quotes aren't needed, and none of the backslashes are.
 
Last edited:

hafnix

Dabbler
Joined
Mar 24, 2019
Messages
24
I entered
Code:
iocage console nextcloud
, then I entered
Code:
./acme.sh --issue -d my.hostna.me --force -w /usr/local/www/apache24/data -k 4096 --fullchain-file /usr/local/etc/pki/tls/certs/fullchain.pem --key-file /usr/local/etc/pki/tls/private/privkey.pem --reloadcmd \"service apache24 reload\"
 

hafnix

Dabbler
Joined
Mar 24, 2019
Messages
24
Ok I tried, then I get
Code:
-bash: ./acme.sh: No such file or directory
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
./acme.sh: No such file or directory
Ah, I missed that. No, from /root/ (which is where you'd be by default), that won't work. You should be able to run it without the ./, but if not, it would be .acme.sh/acme.sh followed by the remaining flags.
 

hafnix

Dabbler
Joined
Mar 24, 2019
Messages
24
Wow cool, thank you Dan, it works :D:D:D:D I owe you one, really appreciate the great work you guys are doing and still find the nerve to help the noobs.
 

hafnix

Dabbler
Joined
Mar 24, 2019
Messages
24
Just a final question... tried logging in with the credentials from the text file nextcloud_db_password.txt with user
Administrator and the given password but I cannot log in. Is the user correct ?
Or, is there a way to reset the password ?
 

danb35

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

hafnix

Dabbler
Joined
Mar 24, 2019
Messages
24
Hmm tried that too but it does not work... to be sure I copied it from the editor and tried to enter it manually too.
Is there any way to reset this ?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Hmm tried that too but it does not work..
And you used the password for the admin user, not the password for the nextcloud database user or the root database user?
Is there any way to reset this ?
Yes, but I can't look up the relevant occ syntax at the moment--I'll try to get back to it shortly.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Yes I took the password of the admin user in line 3
The one that says, "Default user is admin, password is (random)"? What's the error you're getting when you try to log in? Screen shot might help.
 

hafnix

Dabbler
Joined
Mar 24, 2019
Messages
24
the file is looking like this :

MariaDB root password password

Nextcloud database password is password

Nextcloud Administrator password is password

login_failed.jpg


Sorry it is German, it means wrong password, below that I have to wait 30 seconds before another attempt
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Nextcloud Administrator password is password
...and the second "password" on this line is in fact a random string, right?

To reset the admin password, first enter the Nextcloud jail with iocage console nextcloud. Then run su -m www -c "php /usr/local/www/apache24/data/nextcloud/occ user:resetpassword admin".
 
Last edited:
Top