Resource icon

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

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
So, I've created these 4 recommended datasets inside nextcloud dataset. I used zfs send | zfs recv to copy content of "old" nextcloud (somehow successfully upgraded to ver. 19) files and db datasets.
nextcloud-config:
Code:
JAIL_IP="172.16.1.3"
DEFAULT_GW_IP="172.16.1.1"
POOL_PATH="/mnt/wszystko"
TIME_ZONE="Europe/Warsaw"
SELFSIGNED_CERT=1
HOST_NAME="next.dom.net"
JAIL_NAME="nextcloud2"
JAIL_INTERFACES="vnet0:bridge11"

And installation failed at:

Is something wrong with vnet setup? In my case jails use following setup (of course with different IPs and interfaces set to vnet0:bridge11):
View attachment 40573
Could this configuration may affect caddy's build (0.0.0.0:443: connect: connection refused)?
If I manually create and configure nextcloud2 jail script throws an error:

Can I overwrite it / force to use existing jail? Or else what kind of plugin is missing?
if you do iocage list it will probably show a jail named nextcloud2. You can't run the script if the jail exists already. Options are to delete nextcloud2 iocage destroy -f nextcloud2 or in the config for the script change it to nextcloud3
 

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
if you do iocage list it will probably show a jail named nextcloud2. You can't run the script if the jail exists already. Options are to delete nextcloud2 iocage destroy -f nextcloud2 or in the config for the script change it to nextcloud3
I know I can't have jail created beforehand. But after getting received caddy build error I had reconfigured network of already created (by script) nextcloud2 jail trying to rule out connectivity issues...
EDIT:
I think following caddy build error:
8%2BhYEEG3D1tD%2BoKn9zg%3D%3D": dial tcp 0.0.0.0:443: connect: connection refused
is a result of non-standard vnet interface I need to apply in my case.
How can I set variable INTERFACE to value like IPv4 Interface in GUI: "------"
Zrzut ekranu 2020-08-4 o 15.38.45.png
 
Last edited:

Andrewfnas

Cadet
Joined
Aug 5, 2020
Messages
5
Hi All,

I'm in need of assistance.

After 5 tries (without changing anything), I have the script working for the second time. It kept failing at various stages without any reason?

Has anyone else had this issue? I believe it fails as something consistently forced a change to the Freenas IP.

This was in contrast to the first time which went flawlessly.

The reason I did it twice, was due to performance issues. This second time on fresh Freenas 11.3 u4.1 install.

Question:

1. Nextcloud performance on internal network using the windows desktop client, website or mobile app is terrible at around 10 Mb/sec. Yes, 1MB/sec.

This indicates a sync speed issue but iperf is just fine.

Also, I did not have this issue with a vanilla Nextcloud plugin. Are there any optimizations etc?

2. What is the easiest and complete way to change the domain name and or IP without re running the script?

Based on what I do know. Edit:

/usr/local/www/Caddyfile: = default _sni domain.tld

And

/usr/local/www/nextcloud/config/
'trusted_domains' =>

array (

0 => 'localhost',

1 => ' domain.tld ',

2 => '192.168.1.198',

'overwrite.cli.url' => 'https:// domain.tld /',

Am I missing anything?

Thanks in advance.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
/usr/local/www/Caddyfile: = default _sni domain.tld
default_sni isn't really the issue; it's the host name itself. A few lines into the Caddyfile, you'll see a line like this:
Code:
yourhostnamehere {
    root * /usr/local/www/nextcloud

With "yourhostnamehere" replaced with the HOST_NAME you used when installing. That needs to be replaced. default_sni is only needed in certain cases when you're running Nextcloud behind a reverse proxy.
 

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
I'll try once again :smile:, when building caddy2 I receive following errors:
Code:
/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.1.1/modules/caddyhttp/encode/gzip/gzip.go:25:2: github.com/klauspost/compress@v1.10.10: Get "https://storage.googleapis.com/proxy-golang-org-prod/d9521529eeba67d2-github.com:klauspost:compress-v1.10.10.zip?Expires=1596834965&GoogleAccessId=gcs-urlsigner-prod%40golang-modproxy.iam.gserviceaccount.com&Signature=MkVQW%2Fx5ksizhjo%2FnWUliJpqQ4QZ%2F373BvWcWTNM5yA48O1D2Gj0uTpqqQm%2BwClUEQTVITW3%2FjJWO2KBKNA6vCb98EVGOrUNjEkJvohG6nghyc2107ht00relyrgVqPSU0SS312XmYzHK5oM9f2Z1aToIQvWs6C0AzvMjPJCeFM3Cs7HNRSaNgDG%2FnyMeuJz5QFKwopuKTMP%2F7tjdMt%2Bx593CvH1g3Pj6w0a4zh5eXFI6%2BXTDMyg9p19e3aF9%2BCGAvpR%2BPQ18SsN35pxZ68Jgp89rzyCUYOUu73amDzyjpqIJirjqDJR8kK8bmZcdT6lvlPSPYp0LGv34%2FGZ4I%2BF7A%3D%3D": dial tcp 0.0.0.0:443: connect: connection refused
/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.1.1/modules/caddyhttp/encode/zstd/zstd.go:21:2: github.com/klauspost/compress@v1.10.10: Get "https://storage.googleapis.com/proxy-golang-org-prod/d9521529eeba67d2-github.com:klauspost:compress-v1.10.10.zip?Expires=1596834965&GoogleAccessId=gcs-urlsigner-prod%40golang-modproxy.iam.gserviceaccount.com&Signature=MkVQW%2Fx5ksizhjo%2FnWUliJpqQ4QZ%2F373BvWcWTNM5yA48O1D2Gj0uTpqqQm%2BwClUEQTVITW3%2FjJWO2KBKNA6vCb98EVGOrUNjEkJvohG6nghyc2107ht00relyrgVqPSU0SS312XmYzHK5oM9f2Z1aToIQvWs6C0AzvMjPJCeFM3Cs7HNRSaNgDG%2FnyMeuJz5QFKwopuKTMP%2F7tjdMt%2Bx593CvH1g3Pj6w0a4zh5eXFI6%2BXTDMyg9p19e3aF9%2BCGAvpR%2BPQ18SsN35pxZ68Jgp89rzyCUYOUu73amDzyjpqIJirjqDJR8kK8bmZcdT6lvlPSPYp0LGv34%2FGZ4I%2BF7A%3D%3D": dial tcp 0.0.0.0:443: connect: connection refused
/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.1.1/modules/caddypki/acmeserver/acmeserver.go:29:2: github.com/smallstep/certificates@v0.15.0-rc.1.0.20200506212953-e855707dc274: Get "https://storage.googleapis.com/proxy-golang-org-prod/89c1e1442349939e-github.com:smallstep:certificates-v0.15.0-rc.1.0.20200506212953-e855707dc274.zip?Expires=1596834965&GoogleAccessId=gcs-urlsigner-prod%40golang-modproxy.iam.gserviceaccount.com&Signature=bvOzN1vUp%2F0NSZz3fP1gZWeTSBJt12xUkIZeOXu81RwYbE2KL7UflXq8ISPniIJQxffCHTSVzRihi4YR%2BoQu1gI71dlfu8qYV%2Fz9bIRkRsiBwogEEFLUiA2IynqEvJCvKpC%2Fvkv9pf5nh5cksFoGahcCzg8qQODATOrsTsI%2BhBHPTbRel%2FoHDT4NxONYdktoDfWVH9R7RJ1NUW8xOLP6grKBJfoyWd6jKCoU%2FtMOfpz0pEz6Ok7vWUUyweISnjMAhrIq4Q3yVskdRfQz%2F3OfsxCsUK82OeYDESNf1lLJEsktFjlcrN%2BbrI6uzMDhOXp6F%2Bicn4yV50sr3M7g42DReA%3D%3D": dial tcp 0.0.0.0:443: connect: connection refused
/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.1.1/modules/caddypki/acmeserver/acmeserver.go:30:2: github.com/smallstep/certificates@v0.15.0-rc.1.0.20200506212953-e855707dc274: Get "https://storage.googleapis.com/proxy-golang-org-prod/89c1e1442349939e-github.com:smallstep:certificates-v0.15.0-rc.1.0.20200506212953-e855707dc274.zip?Expires=1596834965&GoogleAccessId=gcs-urlsigner-prod%40golang-modproxy.iam.gserviceaccount.com&Signature=bvOzN1vUp%2F0NSZz3fP1gZWeTSBJt12xUkIZeOXu81RwYbE2KL7UflXq8ISPniIJQxffCHTSVzRihi4YR%2BoQu1gI71dlfu8qYV%2Fz9bIRkRsiBwogEEFLUiA2IynqEvJCvKpC%2Fvkv9pf5nh5cksFoGahcCzg8qQODATOrsTsI%2BhBHPTbRel%2FoHDT4NxONYdktoDfWVH9R7RJ1NUW8xOLP6grKBJfoyWd6jKCoU%2FtMOfpz0pEz6Ok7vWUUyweISnjMAhrIq4Q3yVskdRfQz%2F3OfsxCsUK82OeYDESNf1lLJEsktFjlcrN%2BbrI6uzMDhOXp6F%2Bicn4yV50sr3M7g42DReA%3D%3D": dial tcp 0.0.0.0:443: connect: connection refused
/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.1.1/modules/caddypki/ca.go:28:2: github.com/smallstep/certificates@v0.15.0-rc.1.0.20200506212953-e855707dc274: Get "https://storage.googleapis.com/proxy-golang-org-prod/89c1e1442349939e-github.com:smallstep:certificates-v0.15.0-rc.1.0.20200506212953-e855707dc274.zip?Expires=1596834965&GoogleAccessId=gcs-urlsigner-prod%40golang-modproxy.iam.gserviceaccount.com&Signature=bvOzN1vUp%2F0NSZz3fP1gZWeTSBJt12xUkIZeOXu81RwYbE2KL7UflXq8ISPniIJQxffCHTSVzRihi4YR%2BoQu1gI71dlfu8qYV%2Fz9bIRkRsiBwogEEFLUiA2IynqEvJCvKpC%2Fvkv9pf5nh5cksFoGahcCzg8qQODATOrsTsI%2BhBHPTbRel%2FoHDT4NxONYdktoDfWVH9R7RJ1NUW8xOLP6grKBJfoyWd6jKCoU%2FtMOfpz0pEz6Ok7vWUUyweISnjMAhrIq4Q3yVskdRfQz%2F3OfsxCsUK82OeYDESNf1lLJEsktFjlcrN%2BbrI6uzMDhOXp6F%2Bicn4yV50sr3M7g42DReA%3D%3D": dial tcp 0.0.0.0:443: connect: connection refused
/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.1.1/modules/caddytls/internalissuer.go:28:2: github.com/smallstep/certificates@v0.15.0-rc.1.0.20200506212953-e855707dc274: Get "https://storage.googleapis.com/proxy-golang-org-prod/89c1e1442349939e-github.com:smallstep:certificates-v0.15.0-rc.1.0.20200506212953-e855707dc274.zip?Expires=1596834965&GoogleAccessId=gcs-urlsigner-prod%40golang-modproxy.iam.gserviceaccount.com&Signature=bvOzN1vUp%2F0NSZz3fP1gZWeTSBJt12xUkIZeOXu81RwYbE2KL7UflXq8ISPniIJQxffCHTSVzRihi4YR%2BoQu1gI71dlfu8qYV%2Fz9bIRkRsiBwogEEFLUiA2IynqEvJCvKpC%2Fvkv9pf5nh5cksFoGahcCzg8qQODATOrsTsI%2BhBHPTbRel%2FoHDT4NxONYdktoDfWVH9R7RJ1NUW8xOLP6grKBJfoyWd6jKCoU%2FtMOfpz0pEz6Ok7vWUUyweISnjMAhrIq4Q3yVskdRfQz%2F3OfsxCsUK82OeYDESNf1lLJEsktFjlcrN%2BbrI6uzMDhOXp6F%2Bicn4yV50sr3M7g42DReA%3D%3D": dial tcp 0.0.0.0:443: connect: connection refused
/root/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.1.1/modules/caddypki/ca.go:29:2: github.com/smallstep/certificates@v0.15.0-rc.1.0.20200506212953-e855707dc274: Get "https://storage.googleapis.com/proxy-golang-org-prod/89c1e1442349939e-github.com:smallstep:certificates-v0.15.0-rc.1.0.20200506212953-e855707dc274.zip?Expires=1596834965&GoogleAccessId=gcs-urlsigner-prod%40golang-modproxy.iam.gserviceaccount.com&Signature=bvOzN1vUp%2F0NSZz3fP1gZWeTSBJt12xUkIZeOXu81RwYbE2KL7UflXq8ISPniIJQxffCHTSVzRihi4YR%2BoQu1gI71dlfu8qYV%2Fz9bIRkRsiBwogEEFLUiA2IynqEvJCvKpC%2Fvkv9pf5nh5cksFoGahcCzg8qQODATOrsTsI%2BhBHPTbRel%2FoHDT4NxONYdktoDfWVH9R7RJ1NUW8xOLP6grKBJfoyWd6jKCoU%2FtMOfpz0pEz6Ok7vWUUyweISnjMAhrIq4Q3yVskdRfQz%2F3OfsxCsUK82OeYDESNf1lLJEsktFjlcrN%2BbrI6uzMDhOXp6F%2Bicn4yV50sr3M7g42DReA%3D%3D": dial tcp 0.0.0.0:443: connect: connection refused
/root/go/pkg/mod/github.com/google/cel-go@v0.5.1/checker/decls/decls.go:21:2: google.golang.org/genproto@v0.0.0-20200526211855-cb27e3aa2013: Get "https://storage.googleapis.com/proxy-golang-org-prod/80a959b15da3a0d9-google.golang.org:genproto-v0.0.0-20200526211855-cb27e3aa2013.zip?Expires=1596834966&GoogleAccessId=gcs-urlsigner-prod%40golang-modproxy.iam.gserviceaccount.com&Signature=s%2BpURLk1jlVNBhBiRvrojy6SqKb8OzjftaSoC2MO5AWC8XIG%2FaE%2BnDXNQCHH6O2uXUG429gg%2FPdvNs%2BM%2FechsKlvuUfYWHWVG7P0ENDLXTc5Ckut5%2FbBZblrAjCFfRUhZA%2FjA4p%2FlFLzj7Cshv1DRvMnaKNSmx705R%2BvWoHuwJyqWM18RyUZXAWNyxIFA%2FNCfUBAAFyOvVERJt9wypk7f8SbC3GVo7mloKB2nAIIihRvR%2FCgVliYBioKUcW32rc1H6LqWEYAJxjrMbXVZ%2FacAnAA%2FCBbLuJdNSTq13B2wihahjD9bTI%2BcTkvhf%2BdUbn0CbYT9k0b7U9xRp89wAe5Ig%3D%3D": dial tcp 0.0.0.0:443: connect: connection refused
2020/08/06 23:16:07 [INFO] Cleaning up temporary folder: /tmp/buildenv_2020-08-06-2315.292637249
2020/08/06 23:16:07 [FATAL] exit status 1
Command: xcaddy build --output /usr/local/bin/caddy failed!
Failed to build Caddy without plugin, terminating.


Can somebody please enlighten me what does it mean? Is it local or external connection being refused? "dial tcp 0.0.0.0:443" seems like local...
I use config (I use recommended datasets setup):
Code:
JAIL_IP="172.16.1.3/26"
DEFAULT_GW_IP="172.16.1.1"
POOL_PATH="/mnt/all"
TIME_ZONE="Europe/Warsaw"
SELFSIGNED_CERT=1
HOST_NAME="next.dom.net"
JAIL_NAME="nextcloud2"
JAIL_INTERFACES="vnet0:bridge11"


EDIT:
@danb35 I wouldn't like to bother you but it seems I can't go any further... I's created manually jail and installed all packages (and commented out jail creation in script), set all interfaces and vnet as are in my other jails but I end up with the same error. So, I guess it's not related to connectivity. How to solve this?
 
Last edited:

Andrewfnas

Cadet
Joined
Aug 5, 2020
Messages
5
default_sni isn't really the issue; it's the host name itself. A few lines into the Caddyfile, you'll see a line like this:
Code:
yourhostnamehere {
    root * /usr/local/www/nextcloud

With "yourhostnamehere" replaced with the HOST_NAME you used when installing. That needs to be replaced. default_sni is only needed in certain cases when you're running Nextcloud behind a reverse proxy.

Ok I updated my domain and get this.

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 webserver log.

I assume this is the log /var/log/name.tld.log

1596853118848.png


Looks like a certificate has not been generated for the new domain. IE in the directory /.local/share/caddy/certificates.

What else do I need to do?

Thanks
 
Joined
Jan 4, 2014
Messages
1,644

Andrewfnas

Cadet
Joined
Aug 5, 2020
Messages
5
That's just the access log. Check /var/log/caddy.log.

ok

I have missed something. I rechecked and I have updated all the entries I am aware of.

{"level":"info","ts":1596854555.2841263,"msg":"shutting down apps then terminating","signal":"SIGTERM"}
2020/08/07 19:42:35 [INFO][cache:0xc0004ce900] Stopped certificate maintenance routine
{"level":"info","ts":1596854555.293723,"logger":"admin","msg":"stopped previousserver"}
{"level":"info","ts":1596854555.2937498,"msg":"shutdown done","signal":"SIGTERM"}
{"level":"info","ts":1596855592.0685532,"msg":"using provided configuration","config_file":"/usr/local/www/Caddyfile","config_adapter":"caddyfile"}
{"level":"info","ts":1596855592.1420739,"logger":"admin","msg":"admin endpoint started","address":"tcp/localhost:2019","enforce_origin":false,"origins":["localhost:2019","[::1]:2019","127.0.0.1:2019"]}
2020/08/07 19:59:52 [INFO][cache:0xc000191d40] Started certificate maintenance routine
{"level":"info","ts":1596855592.1822028,"logger":"http","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}
{"level":"info","ts":1596855592.1822739,"logger":"http","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
{"level":"info","ts":1596855592.3003247,"logger":"tls","msg":"cleaned up storage units"}
{"level":"info","ts":1596855592.300423,"logger":"http","msg":"enabling automatic TLS certificate management","domains":["new.tld"]}
{"level":"info","ts":1596855592.3382928,"msg":"autosaved config","file":"/.config/caddy/autosave.json"}
{"level":"info","ts":1596855592.3383346,"msg":"serving initial configuration"}
Successfully started Caddy (pid=2283) - Caddy is running in the background
2020/08/07 20:03:16 http: TLS handshake error from 120.148.210.80:39108: no certificate available for 'old.tld'
2020/08/07 20:03:16 http: TLS handshake error from 120.148.210.80:39109: no certificate available for 'old.tld'
2020/08/07 20:03:16 http: TLS handshake error from 120.148.210.80:39110: no certificate available for 'old.tld'
2020/08/07 20:03:16 http: TLS handshake error from 120.148.210.80:39111: no certificate available for 'old.tld'
2020/08/07 20:06:58 http: TLS handshake error from 120.148.210.80:50691: no certificate available for 'old.tld'
2020/08/07 20:06:58 http: TLS handshake error from 120.148.210.80:50690: no certificate available for 'old.tld'
2020/08/07 20:06:59 http: TLS handshake error from 120.148.210.80:50695: no certificate available for '192.168.1.198'
2020/08/07 20:06:59 http: TLS handshake error from 120.148.210.80:50696: no certificate available for '192.168.1.198'
 
Joined
Jan 4, 2014
Messages
1,644
I have missed something. I rechecked and I have updated all the entries I am aware of.
You've done nothing wrong. From the guide...

screenshot.425.png
 

Andrewfnas

Cadet
Joined
Aug 5, 2020
Messages
5
That's just the access log. Check /var/log/caddy.log.

OK so I figured out that /usr/local/www/nextcloud/config/config.php must only have the current tls domains listed.

This now works with mydomian.tld when it points to my public IP including the desktop client.

However, I also need to need to point mydomian.tld via CNAME to NOIP.ddns.net and then point that to my IP due to the joy of Dynamic IPs.

As soon I do this, I get Error code: SSL_ERROR_INTERNAL_ERROR_ALERT.

Also I cannot add https://mydomian.tld to the desktop client?

How can I add the DDNS route without braking tls?

1596865864840.png
 
Joined
Jan 4, 2014
Messages
1,644
Your DNS provider should resolve mydomain.tld to your public IP address. On your LAN, your local DNS server should resolve mydomain.tld to your Nextcloud jail IP. Do they?
 

Andrewfnas

Cadet
Joined
Aug 5, 2020
Messages
5
Your DNS provider should resolve mydomain.tld to your public IP address. On your LAN, your local DNS server should resolve mydomain.tld to your Nextcloud jail IP. Do they?

Yes and no. mydomain.tld (tls) resolves to my DDNS provider which resolves to my public IP.

I cant do it the other way as I do not want the DDNS provider as the landing point.
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
Can FreeNas resolve internal ip as FDQN for internal resolution? or i need dns server installed? I try putting there on the global configuration under hostname database, but anyway is resolving on dns nameserver obtained via DHCP on my lan. Is any Host file on freenas to resolve the FDQN Internally or is needed a DNS SERVER yes or yes?
 
Joined
Jan 4, 2014
Messages
1,644
Can FreeNas resolve internal ip as FDQN for internal resolution? or i need dns server installed? I try putting there on the global configuration under hostname database, but anyway is resolving on dns nameserver obtained via DHCP on my lan. Is any Host file on freenas to resolve the FDQN Internally or is needed a DNS SERVER yes or yes?


Extract from the installation guide...

screenshot.432.png


Alternatively, set up an internal DNS resolver like DNSMasq. It is available as a community plugin.
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
I set up DNSMasq, now resolving other time, because my isp change my router, and is no option for hosts in the new, now when i try to install it says

Command: xcaddy build --output /usr/local/bin/caddy --with github.com/caddy-dns/
cloudflare failed!
Failed to build Caddy with cloudflare plugin, terminating.
truenas#
 
Joined
Jan 4, 2014
Messages
1,644
xcaddy build --output /usr/local/bin/caddy --with github.com/caddy-dns/
Modify this line in the script and try installing again.

xcaddy build master --output /usr/local/bin/caddy --with github.com/caddy-dns/
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
Working fine now, but gui not showing, i see this errors during installation


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:

Pctravel

Dabbler
Joined
Aug 11, 2018
Messages
26
It looks like I didn't set that script to executable--I thought I'd done that long ago, but maybe I missed it, or maybe something's happened since then to change it. In any event, you can get a trusted cert by running the following commands:
Code:
iocage console nextcloud
nano /usr/local/www/Caddyfile

The top of that file will look like this:
Code:
yourhostnamehere JAIL-IP {

    root   /usr/local/www/nextcloud
    log    /var/log/nextcloud_access.log
    errors /var/log/nextcloud_errors.log

    tls {
        ca https://acme-staging-v02.api.letsencrypt.org/directory
    }

    fastcgi / 127.0.0.1:9000 php {
        env PATH /bin
        env modHeadersAvailable true
        env front_controller_active true


In the tls{ } block, remove -staging from the ca line, so it looks like this:
Code:
        ca https://acme-v02.api.letsencrypt.org/directory

Then save the file, and run service caddy restart.


Looks like new problem came up, the above worked for me perfectly however it didn't auto renew and I have not been able to figure out how to renew the expired cert??
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Joined
Jan 4, 2014
Messages
1,644
Working fine now, but gui not showing, i see this errors during installation

I suggest you delete the jail and rerun the script script nextcloud.log ./nextcloud-jail.sh . If there are still issues with the install, attach nextcloud.log to your next post.
 
Top