Alright. Here we are again. It's been such a hassle to install Nextcloud together with Let's Encrypt...
I successfully installed Nextcloud and MariaDB using the TDL video instruction.
I got DuckDNS running successfully. (For instance, I made a Port Forwarding for my Jellyfin on 8096.)
I managed to create the Let's Encrypt Certificates.
But I am stuck from there. When I visit my [domain1].duckdns.org, Chromium errors: ERR_CONNECTION_REFUSED.
I will show all the steps I proceeded and hope someone can help me.
I run OMV on a RockPro64 (4GB RAM).
OMV version 4.1.25-1 (Arrakis)
Kernel: Linux 4.4.167-1213-rockchip-ayufan-g34ae07687fce
Processor: ARMv8 Processor rev 2 (v8l)
-- installing DuckDNS --
linuxserver/duckdns
# Container name
duckdns
# Restart Policy
always
# Environment variables
PUID = 1000
PGID = 100
TZ = Europe/Amsterdam
SUBDOMAINS = [domain1],[domain2],[domain3],[domain4],[domain5]
TOKEN = [duckdnstoken]
-- Setting Port Forwarding on the router --
TCP/UDP
80 -> 90
[local_server_ip]
TCP/UDP
443 -> 450
[local_server_ip]
-- Add '#' in front of bind-address=0.0.0.0 at /sharedfolders/AppData/Nextclouddb/custom.cnf --
-- Creating lets-net docker network in ssh --
~# docker network create lets-net
-- Making changes to Nextcloud container --
~# docker network connect lets-net nextcloud
-- installing Let's Encrypt docker image --
# Container name
letsencrypt
# Restart Policy
always
# Port forwarding
Host Port
450
Exposed Port
443/tcp
Host Port
90
Exposed Port
80
# Environment variables
PUID = 1000
PGID = 100
EMAIL = [mailaddress]
URL = duckdns.org
SUBDOMAINS = [domain1],[domain2],[domain3],[domain4],[domain5]
VALIDATION = http
TZ = [my_TZ]
ONLY_SUBDOMAINS = true
# Volumes and Bind mounts
Host path
/sharedfolders/AppData/Letsencrypt
Container path
/config
# Extra arguments
--cap-add=NET_ADMIN
-- Connect letsencrypt to lets-net network --
docker network connect lets-net letsencrypt
-- Change /sharedfolders/AppData/Letsencrypt/nginx/proxy-confs/nextcloud.-subdomain.conf --
# make sure that your dns has a cname set for nextcloud
# assuming this container is called "letsencrypt", edit your nextcloud container's config
# located at /config/www/nextcloud/config/config.php and add the following lines before the ");":
# 'trusted_proxies' => ['letsencrypt'],
# 'overwrite.cli.url' => 'https://nextcloud.your-domain.com/',
# 'overwritehost' => 'nextcloud.your-domain.com',
# 'overwriteprotocol' => 'https',
#
# Also don't forget to add your domain name to the trusted domains array. It should look somewhat like this:
# array (
# 0 => '192.168.0.1:444', # This line may look different on your setup, don't modify it.
# 1 => 'nextcloud.your-domain.com',
# ),
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name [domain1].*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_nextcloud nextcloud;
proxy_max_temp_file_size 2048m;
proxy_pass https://$upstream_nextcloud:443;
}
}
Alles anzeigen
-- restart Nextcloud container --
-- Change /sharedfolders/AppData/Nextcloud/www/nextcloud/config/config.php --
<?php
$CONFIG = array (
'memcache.local' => '\\OC\\Memcache\\APCu',
'datadirectory' => '/data',
'instanceid' => '[xxx]',
'passwordsalt' => '[xxx]',
'secret' => '[xxx]',
'trusted_domains' =>
array (
0 => '[local_server_ip]:444',
1 => '[domain1].duckdns.org',
),
'overwrite.cli.url' => 'https://[domain1].duckdns.org',
'overwritehost' => '[domain1].duckdns.org',
'overwriteprotocol' => 'https',
'dbtype' => 'mysql',
'version' => '16.0.3.0',
'dbname' => 'nextcloud',
'dbhost' => '[local_server_ip]:3306',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => '[xxx]',
'dbpassword' => '[xxx]',
'installed' => true,
);
Alles anzeigen
-- restart letsencrypt container
So, my simple question is: where did I go wrong? What am I missing out on?