I had Nextcloud running just fine on OMV4 w/ duckdns.
Moved to OMV5, purchased a cheap domain name from Namecheap, and I've just had no luck with this. My docker-compose is below. First, after this failed for a few days, I basically commented out the letsencrypt part, and setup Nextcloud locally and made sure it was working. Once that was all working, setup, etc. I uncommented letsencrypt and commented out my Nextcloud ports, and ran docker-compose again, which again seemed to work just fine. Only major difference I'm using port 461 instead of 444 (mainly becuase it was already setup in my router from OMV4).
version: "2"
services:
nextcloud:
image: linuxserver/nextcloud:latest
container_name: nextcloud
environment:
- PUID=1000
- PGID=100
volumes:
- /srv/dev-disk-by-id-ata-ST4000DM004-2CV104_ZFN1RFKK-part1/AppData/nextcloud:/config
- /srv/dev-disk-by-id-ata-ST4000DM004-2CV104_ZFN1RFKK-part1/Media/.Nextcloud:/data
- /etc/localtime:/etc/localtime
depends_on:
- mariadb
#ports:
#- 450:443
restart: unless-stopped
mariadb:
image: linuxserver/mariadb:latest
container_name: nextclouddb
environment:
- PUID=1000
- PGID=100
- MYSQL_ROOT_PASSWORD=PASSWORD
- MYSQL_USER=USER
- MYSQL_PASSWORD=PASSWORD
ports:
- 3306:3306
volumes:
- /srv/dev-disk-by-id-ata-ST4000DM004-2CV104_ZFN1RFKK-part1/AppData/nextclouddb:/config
- /etc/localtime:/etc/localtime
restart: unless-stopped
letsencrypt:
image: linuxserver/letsencrypt
container_name: letsencrypt
cap_add:
- NET_ADMIN
environment:
- PUID=1000
- PGID=100
- URL=mydomain.xyz
- SUBDOMAINS=www,
- VALIDATION=http
- EMAIL=myemail.gmail.com
- ONLY_SUBDOMAINS=false #optional
volumes:
- /srv/dev-disk-by-id-ata-ST4000DM004-2CV104_ZFN1RFKK-part1/AppData/letsencrypt:/config
- /etc/localtime:/etc/localtime
depends_on:
- nextcloud
ports:
- 461:443
restart: unless-stopped
Alles anzeigen
Docker compose runs without issue, then I check the letsencrypt log and the fun begins (error below).... clearly there is a DNS issue and Namecheap, but I'm just dumb on this one. So, given the error... I've created an A record on my Namecheap panel Host: www IP: my.public.ip. In my router, 461 is forwarded to my NAS (as it has been for a couple years)... so I don't think it's an issue with my router settings. So the only logical thing is I'm missing something in my DNS records, or my maybe my config.php
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: mydomain.xyz
Type: connection
Detail: Fetching
http://mydomain.xyz/.well-known/acme-challenge/nGLosV2UV7wxUCsDvlUcmCx3QC21DTsGu5LUtfxi6rs:
Connection refused
Domain: www.mydomain.xyz
Type: connection
Detail: Fetching
http://www.mydomain.xyz/.well-known/acme-challenge/oVatncTvu3ZNKAmwHN86iy3-mnbPOKJNkimMtkjG5EQ:
Connection reset by peer
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. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you're using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
ERROR: Cert does not exist! Please see the validation error above. The issue may be due to incorrect dns or port forwarding settings. Please fix your settings and recreate the container
Alles anzeigen
config.php below
<?php
$CONFIG = array (
'memcache.local' => '\\OC\\Memcache\\APCu',
'datadirectory' => '/data',
'instanceid' => 'ocwx5h5ibyov',
'passwordsalt' => 'dwkbZxwqkMQeBVecCbZGhwXs3zFrQp',
'secret' => 'SzLTnz9SPuKO+AR0IhLTBl3l0PdhsZ/qoYs6vtyVUNirDmJO',
'trusted_domains' =>
array (
0 => '192.168.1.166:449',
),
'dbtype' => 'mysql',
'version' => '17.0.1.1',
'overwrite.cli.url' => 'https://192.168.1.166:449',
'dbname' => 'nextclouddb',
'dbhost' => '192.168.1.166:3306',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'oc_admin',
'dbpassword' => 'SZTQqhTLCR8JJc6nN28Nk7Li1cCUij',
'installed' => true,
'trusted_proxies' =>
array (
0 => 'letsencrypt',
),
'overwritewebroot' => '/nextcloud',
'overwrite.cli.url' => 'https://mydomain.xyz/nextcloud',
'trusted_domains' =>
array (
0 => 'mydomain.xyz:443',
),
);
Alles anzeigen