I read the docs and I think I have all set up correctly:
version: "2"
services:
nextcloud:
image: linuxserver/nextcloud
container_name: nextcloud
environment:
- PUID=1002 #change PUID if needed
- PGID=100 #change PGID if needed
- TZ=Europe/Lisbon #change Time Zone if needed
volumes:
- /srv/dev-disk-by-label-OS/appdata/nextcloud/config:/config #/srv/dev-disk-by-label-disk1 needs to be adjusted
- /srv/dev-disk-by-label-OS/appdata/nextcloud/data:/data #/srv/dev-disk-by-label-disk1 needs to be adjusted
depends_on:
- mariadb
# ports: # uncomment this and the next line if you want to bypass the proxy
# - 444:443
restart: unless-stopped
mariadb:
image: linuxserver/mariadb
container_name: nextclouddb
environment:
- PUID=1002 #change PUID if needed
- PGID=100 #change PGID if needed
- MYSQL_ROOT_PASSWORD=mysqlpassword #change password
- TZ=Europe/Lisbon #Change Time Zone if needed
volumes:
- /srv/dev-disk-by-label-OS/appdata/nextclouddb:/config #/srv/dev-disk-by-label-disk1 needs to be adjusted
restart: unless-stopped
swag:
image: linuxserver/swag #swag is the replacement for letsencrypt (see link below)
container_name: swag
cap_add:
- NET_ADMIN
environment:
- PUID=1002 #change PUID if needed
- PGID=100 #change PGID if needed
- TZ=Europe/Lisbon # change Time Zone if needed
- URL=mydomain.duckdns.org #insert your domain name - yourdomain.url
- SUBDOMAINS=www,nextcloud
- VALIDATION=http
- EMAIL=myemail@gmail.com # define email; required to renew certificate
volumes:
- /srv/dev-disk-by-label-OS/appdata/swag:/config #/srv/dev-disk-by-label-disk1 needs to be adjusted
ports:
- 443:443
- 81:80
restart: unless-stopped
<?php
$CONFIG = array (
'memcache.local' => '\\OC\\Memcache\\APCu',
'datadirectory' => '/data',
'trusted_proxies' =>
array (
0 => 'swag',
),
'overwrite.cli.url' => 'https://nextcloud.mydomain.duckdns.org',
'overwritehost' => 'nextcloud.mydomain.duckdns.org',
'overwriteprotocol' => 'https',
'trusted_domains' =>
array (
0 => '192.168.1.108:443',
1 => 'nextcloud.mydomain.duckdns.org',
),
'instanceid' => 'instanceid',
'passwordsalt' => 'passwordsalt',
'secret' => 'secret',
'dbtype' => 'mysql',
'version' => '20.0.3.2',
'dbname' => 'dbname',
'dbhost' => 'dbhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'dbuser',
'dbpassword' => 'dbpassword',
'installed' => true,
);
Router is forwarding port 443:443 and 80:81 to host 192.168.1.108.
There is one think from the docs that I don’t understand. I modified # 0 => '192.168.0.1:444', # This line may look different on your setup, don't modify it.
to match my IP however it says that I shouldn’t modify it :s
This is the result:
ze-2:~ ze$ curl https://nextcloud.mydomain.duckdns.org -k
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to nextcloud.mydomain.duckdns.org:443
ze-2:~ ze$
On the browser I got a ERR_TIMED_OUT
My problem is only when access it from my local network where nextcloud is hosted.