Resource icon

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

kiriak

Contributor
Joined
Mar 2, 2020
Messages
122
Yes, I'd forgotten about that--that's an option too, though it obviously wouldn't work with anything that would get a Let's Encrypt cert.

Ideally this will be done in your router, but I don't know how many consumer-grade routers support that feature. If you use (or start using) Pi-Hole, you could set it up there. I know my pfSense box does, though. Otherwise, the hosts file would have to be the way to go.

My router is a Sophos XG running on a mini PC (well beyond my capabilities and needs).
I tried the Host DNS naming of the NC on the Sophos (but - you guessed it - without success ).

Anyway thanks again.

I'll do more reading and see what comes first : either my knowledge to be adequate to manage it or a script that installs the NC with a selfsigned cert and can be reached typing it's IP (probably the 2nd, if if it take a lot of time :D )
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
It seems like the php upload limit is set to a certain amount of data.
The PHP upload limit doesn't limit Nextcloud uploads.
I'm not sure what you mean by " entering your IP as host_name"
In the nextcloud-config file, set HOST_NAME=192.168.100.3 (or whatever the IP address is).
fighting ( :rolleyes: ) with vi trying to setup the Selfsigned CERT
Pretty much any encounter with vi is going to be a fight--use ee or nano instead. But you shouldn't have needed to edit anything to use the self-signed cert.
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
i have a problem after a 30 trys of installation of script, now i have all working but i only can ping on ip, nothing more. When i start the script another time it says

Jail: nextcloud already exist!
Failed to create jail

Now how to start the nextcloud?? i really don't understand, thats why i use the script.
If i put the ip on chrome it says err connection refused.
 

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
i have a problem after a 30 trys of installation of script, now i have all working but i only can ping on IP
Ping is pretty useless. It doesn't test anything byond having an empty jail.

, nothing more. When i start the script another time it says

Jail: nextcloud already exist!
Failed to create jail
Did you even try to READ the error? You already have created the jail and need to delete it first.
Do you think it magically understands you want to delete the previous one? It's a creation script not a jail manager.

If you already tried 30 times and just ignored the error 29 times, you can try another 30 and I can guarantee you the error would still be there. Because it isn't an error, it's just telling you to delete your previous attempt.
 

Svenkk4

Dabbler
Joined
Jul 4, 2014
Messages
20
I just tried the script and got the following output:
Code:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
Command: mysqladmin reload failed!
Nextcloud was successfully installed


the installation went on but that seems strange to me, is this normal?
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
Plese installation goes fine but in caddy.log i see that:

/usr/local/www/Caddyfile:9 - Error during parsing: Unknown subdirective '192.168.0.69'

And caddy is not running if i write service caddy status, and service caddy start not working

How i can resolve that? I do more than 30 installations i don't know how to proceed.
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
I have no caddy dns provider because my provider is onlydomains.com and i don't want to change that, how to proceed then? if i don't put any option in nextcloud-config initial file, then selfsigned certificate or not? is necesary to obtain certificate via cloudflare? i really no understant that part.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
/usr/local/www/Caddyfile:9 - Error during parsing: Unknown subdirective '192.168.0.69'
Please post your Caddyfile (just the first dozen or so lines will do). In the jail, it's located at the path above. Also post your nextcloud-config file, masking any sensitive information if you choose.
 
Last edited:

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
Plese installation goes fine but in caddy.log i see that:

/usr/local/www/Caddyfile:9 - Error during parsing: Unknown subdirective '192.168.0.69'

And caddy is not running if i write service caddy status, and service caddy start not working

How i can resolve that? I do more than 30 installations i don't know how to proceed.
Did you enter a (placeholder) email adres?
Caddy requires an email adress, regardless of whether you are using ssl or not.

(It's truely stupid I know, but it's an upstream "feature" ;) )
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Did you enter a (placeholder) email adres?
I think that would give a different error. What I suspect is that for some reason he set DNS_PLUGIN to his IP address, an obviously-wrong setting that I think would give exactly the error he's seeing.
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
During the instalation it says that, its normal?

This installer only supports v1, which is obsoleted now that Caddy 2 is released. This script may change or go away soon. Please upgrade: https://caddyserver.com/docs/v2-upgrade

Next downloading al installing fine... but what version?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
This installer only supports v1, which is obsoleted now that Caddy 2 is released.
Yes, that's to be expected. Caddy2 is gratuitously incompatible with Caddy1, so getting that converted is going to take some doing.
Next downloading al installing fine... but what version?
What version of what? Nextcloud? It's the latest release of Nextcloud 18.
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
I have problems with cloudflare i think, i create a token in my account referenced to the new cname dns entry, but these show caddy.log:

2020/06/03 21:44:31 [INFO] [inotshow.mydomain.com] acme: Preparing to solve D>
2020/06/03 21:44:32 [INFO] [inotshow.mydomain.com] acme: Cleaning DNS-01 chal>
2020/06/03 21:44:32 [WARN] [inotshow.mydomain.com] acme: error cleaning up: c>
2020/06/03 21:44:32 [INFO] Deactivating auth: https://acme-staging-v02.api.lets>
2020/06/03 21:44:32 [ERROR][inotshow.mydomain.com] failed to obtain certifica>
[inotshow.mydomain.com] [inotshow.mydomain.com] acme: error presenting toke>
2020/06/03 21:44:33 [INFO] [inotshow.mydomain.com] acme: Obtaining bundled SA>
2020/06/03 21:44:34 [INFO] [inotshow.mydomain.com] AuthURL: https://acme-stag>
2020/06/03 21:44:34 [INFO] [inotshow.mydomain.com] acme: Could not find solve>
< solver for: http-01
2020/06/03 21:44:34 [INFO] [inotshow.mydomain.com] acme: use dns-01 solver
2020/06/03 21:44:34 [INFO] [inotshow.mydomain.com] acme: Preparing to solve D>
2020/06/03 21:44:34 [INFO] [inotshow.mydomain.com] acme: Cleaning DNS-01 chal>
2020/06/03 21:44:34 [WARN] [inotshow.mydomain.com] acme: error cleaning up: c>
2020/06/03 21:44:35 [INFO] Deactivating auth: https://acme-staging-v02.api.lets>
2020/06/03 21:44:35 [ERROR][inotshow.mydomain.com] failed to obtain certifica>
[inotshow.mydomain.com] [inotshow.mydomain.com] acme: error presenting toke>
2020/06/03 21:44:36 failed to obtain certificate: acme: Error -> One or more do>
[inotshow.mydomain.com] [inotshow.mydomain.com] acme: error presenting toke>
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
How to create a token exactly i put custom token and then:

ZONE / DNS / Read
Include Specific Zone mydomain.com
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
And how i can try thinks with my token and dns without deleting the jail and reinstall all again?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
How to create a token exactly i put custom token and then:
You don't use a token. You use the Global API Key.
And how i can try thinks with my token and dns without deleting the jail and reinstall all again?
Inside the jail, you'd run sysrc caddy_env="CLOUDFLARE_EMAIL=you@wherever.com CLOUDFLARE_API_KEY=f438q8fvjaq4p4978h1340f7" (replacing the latter value with your actual API key, of course). Then service caddy start.
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
How i can put in config initial file the dhcp option for the nextcloud jail? My unifi controller send he ip to this jail.
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
How is the procedure to start from 0, only with freenas installed, normally i delete the entire jail, but seems to know datbase exists and is not a clean installation then.
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
Now this error.
acme: error presenting token: cloudflare: failed to find zone blablabla.mydomain.com.: Zone could not be found (attempt 3/3)

I put my domain blablabla.mydomain.com on cloudflare as a CNAME and resolve ip good public, with who is in google or nslookup from outside.
And i have a DNS internal who resolve my internal IP to my jail ip 192.168.0.96
The ports resolve good from public. I really don't know what more to do.
 
Top