What is the URL that you are using for nextcloud? It looks like you are only registering www as a subdomain. If you are trying to register ohiskyy.duckdns.org as the main nextcloud subdomain, it don't think that would work. I could never get nextcloud to work as a subfolder. I would also register nextcloud as a subdomain in letsencrypt and configure nextcloud.ohiskyy.duckdns.org as your nextcloud site.
Nextcloud with Letsencrypt using OMV and docker-compose - Q&A
-
- OMV 5.x
- WastlJ
-
-
@ohiskyy do you have any docker containers that are up and running properly... ie.. you've properly set up your appdata and data folders? Or is nextcloud and any other docker giving you trouble?
You're using OMV 4, which isn't necessarily a bad thing... but I can't figure out why you're having so much trouble with technodad's videos on Nextcloud... as they are pretty thorough. If you can install Portainer (he has a video for this as well), I can post a docker-compose file you can use that should help you get this working, but you'll still have to edit some config files, etc...
-
Hello!
I am able to get to the final stretch of this tutorial with letsencrypt returning a working cert and all my containers running without any error messages, but once I have all my containters up and running accessing my primary duckdns url gives me a message:
Welcome to our server The website is currently being setup under this address.
For help and support, please contact: me@example.comWhen I try and access nextcloud, either via ip and :444 or my duckdns url, I get a message:
Internal Server ErrorThe 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 read through this thread and changed 'proxy_max_temp_file_size' 2048m to 1024m in my proxy prefs .conf file as it was giving me an error message.I also went through and tried both subfolder and subdomain methods, but both of them returned the same error message.
It's safe to assume there's some misconfiguration in my config.php or my proxy confs subdomain / subfolder .conf files?
Here are all three of them if anyone wouldn't mind taking a quick peek at them:
1. config.php
<?php
$CONFIG = array (
'memcache.local' => '\OC\Memcache\APCu',
'datadirectory' => '/data',
);'trusted_proxies' =>
array (
0 => 'letsencrypt',
),
'overwrite.cli.url' => 'https://nextcloud.xxx.duckdns.org',
'overwriteprotocol' => 'https',
'overwritehost' => 'nextcloud.xxx.duckdns.org',
'trusted_domains' =>
array (
0 => '192.168.1.112:444',
0 => 'nextcloud.xxx.duckdns.org',
),2. nextcloud.subdomain.conf
server {
listen 443 ssl;
listen [::]:443 ssl;server_name nextcloud.*;
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 1024m;
proxy_pass https://$upstream_nextcloud:443;
}
}3. nextcloud.subfolder.conf
server {
listen 443 ssl;
listen [::]:443 ssl;server_name nextcloud.*;
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 1024m;
proxy_pass https://$upstream_nextcloud:443;
}
}Is it bad to have both subdomain and subfolder conf files "activated" and without the .sample at the end. I've removed them occasionally, but haven't noticed any difference between having the opposing .conf file active while using the other method, but I guess it's worth a mention that both are currently active.
Thanks for the help!
-
hi,
for my knowlage nextcloud will only work with subdomain OR subfolder - your config looks like subdomain
but
is wrong, line 3 have to beits an array, and you change entry 0 two times ...
to access via letsencrypt just use:
nextcloud.localip or nextcloud.your-duck.duckdns.org -
Looks like you also posted the subdomain config in the subfolder part.
Did you use the guide so far (docker-compose to set it up) so that letsencrypt and Nextcloud are connected in a docker network?
For subdomain method did you specify a Nextcloud subdomain when setting up letsencrypt (SUBDOMAINS=www,nextcloud)? -
hi,
for my knowlage nextcloud will only work with subdomain OR subfolder - your config looks like subdomain
butis wrong, line 3 have to be
its an array, and you change entry 0 two times ...
to access via letsencrypt just use:
nextcloud.localip or nextcloud.your-duck.duckdns.orgAh!
Good catch, just a plum old mistake on my part. Switched out the array to 1 =>, and deleted my subfolder.conf file as to avoid any overlap.
Once I did this I rand "docker-compose up -d" at my directory with the .yml file, restarted letsencrypt, ran "docker logs -f letsencrypt" and restarted nextcloud, but all is the same..
Accessing nextcloud via nextcloud.xxx.duckdns.org, or localip:444 results in error messages, as does accessing omv via duckdns or localip.
But thanks for the doublecheck, that would've definitely kept me bugged down if that was in the mix
-
Looks like you also posted the subdomain config in the subfolder part.
Did you use the guide so far (docker-compose to set it up) so that letsencrypt and Nextcloud are connected in a docker network?
For subdomain method did you specify a Nextcloud subdomain when setting up letsencrypt (SUBDOMAINS=www,nextcloud)?Ah yes I forgot to post my docker-compose.yml file!
version: "2"
services:
nextcloud:
image: linuxserver/nextcloud
container_name: nextcloud
environment:
- PUID=1000 #change PUID if needed
- PGID=100 #change PGID if needed
- TZ=Europe/Helsinki #change Time Zone if needed
volumes:
- /srv/dev-disk-by-label-disk1/appdata/nextcloud/config:/config #/srv/dev-disk-by-label-disk1 needs to be adjusted
- /srv/dev-disk-by-label-disk1/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
# - 450:443
restart: unless-stopped
mariadb:
image: linuxserver/mariadb
container_name: nextclouddb
environment:
- PUID=1000 #change PUID if needed
- PGID=100 #change PGID if needed
- MYSQL_ROOT_PASSWORD=xxxxxx #change password
- TZ=Europe/Helsinki #Change Time Zone if needed
volumes:
- /srv/dev-disk-by-label-disk1/appdata/nextclouddb:/config #/srv/dev-disk-by-label-disk1 needs to be adjusted
restart: unless-stopped
letsencrypt:
image: linuxserver/letsencrypt
container_name: letsencrypt
cap_add:
- NET_ADMIN
environment:
- PUID=1000 #change PUID if needed
- PGID=100 #change PGID if needed
- TZ=Europe/Helsinki # change Time Zone if needed
- URL=xxx.duckdns.org #insert your domain name - yourdomain.url
- SUBDOMAINS=www,nextcloud
- VALIDATION=http
- EMAIL=xxx@tuta.io # define email; required to renew certificate
volumes:
- /srv/dev-disk-by-label-disk1/appdata/letsencrypt:/config #/srv/dev-disk-by-label-disk1 needs to be adjusted
ports:
- 444:443
- 81:80
restart: unless-stopped
duckdns:
image: linuxserver/duckdns
container_name: duckdns
environment:
- PUID=1000 #change according to your user
- PGID=100 #change according to your user
- TZ=Europe/Helsinki
- SUBDOMAINS=xxx
- TOKEN=xxxxxxxxxxxxxxxxxxxxxx
restart: unless-stoppedYeah I used the docker-compose setup 1-to-1 as in the how-to, the subdomains have both www and nextcloud.
My disk is called disk1 as to avoid confusion in the long naming strings this time around, and I have added a duckdns image / container into the mix as someone was advised in a related thread, but I don't know if its necessary as its not part of the primary how-to?I'm also puzzled by what you mean by "posting the subdomain config to the subfolder part", did I mess up posting it here or somewhere in my config files?
Currently I tried and deleted the other (subfolder) config file, and now currently have this as my subdomain.conf file, but nothing has changed yet.
server {
listen 443 ssl;
listen [::]:443 ssl;server_name nextcloud.*;
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 1024m;
proxy_pass https://$upstream_nextcloud:443;
}
}Thanks for the help!
-
Just to be clear. The message is the "Welcome to our server"?
I dont see any faults in the configs. Can you post the output of the access.log from /srv/dev-disk-by-label-disk1/appdata/letsencrypt/log/nginx directly after trying to connect to your url?
-
Just to be clear. The message is the "Welcome to our server"?
I dont see any faults in the configs. Can you post the output of the access.log from /srv/dev-disk-by-label-disk1/appdata/letsencrypt/log/nginx directly after trying to connect to your url?
This is what I see, so yes.
Also when attempting nextcloud I get:
Internal Server ErrorThe 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.
My access.log (sorry if there's some extra, it was a long file so I copied the ones with the relevant timestamp.)
GNU nano 2.7.4 File: access.log
85.93.20.70 - - [03/Feb/2020:14:07:33 +0200] "\x03\x00\x00/*\xE0\x00\x00\x00\x00\x00Cookie: mstshash=Administr" 400 157 "-" "-"
85.93.20.70 - - [03/Feb/2020:14:07:33 +0200] "\x03\x00\x00/*\xE0\x00\x00\x00\x00\x00Cookie: mstshash=Administr" 400 157 "-" "-"
85.93.20.70 - - [03/Feb/2020:14:07:33 +0200] "\x03\x00\x00/*\xE0\x00\x00\x00\x00\x00Cookie: mstshash=Administr" 400 157 "-" "-"
85.93.20.70 - - [03/Feb/2020:14:07:34 +0200] "\x03\x00\x00/*\xE0\x00\x00\x00\x00\x00Cookie: mstshash=Administr" 400 157 "-" "-"
85.93.20.70 - - [03/Feb/2020:14:07:35 +0200] "\x03\x00\x00/*\xE0\x00\x00\x00\x00\x00Cookie: mstshash=Administr" 400 157 "-" "-"
85.93.20.70 - - [03/Feb/2020:14:07:36 +0200] "\x03\x00\x00/*\xE0\x00\x00\x00\x00\x00Cookie: mstshash=Administr" 400 157 "-" "-"
51.77.110.48 - - [03/Feb/2020:14:46:23 +0200] "HEAD /robots.txt HTTP/1.0" 301 0 "-" "-"
58.11.7.63 - - [03/Feb/2020:15:13:24 +0200] "POST /HNAP1/ HTTP/1.0" 301 169 "-" "-"
36.65.124.253 - - [03/Feb/2020:15:30:09 +0200] "GET / HTTP/1.1" 301 169 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.7 (KHTML, like $
181.215.87.139 - - [03/Feb/2020:15:46:05 +0200] "GET / HTTP/1.1" 301 169 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1 like Mac OS X) AppleWebKit/605.1.15 (KHT$
181.215.87.139 - - [03/Feb/2020:15:46:06 +0200] "GET / HTTP/2.0" 500 292 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1 like Mac OS X) AppleWebKit/605.1.15 (KHT$
181.215.83.173 - - [03/Feb/2020:15:46:11 +0200] "GET / HTTP/2.0" 500 292 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1 like Mac OS X) AppleWebKit/605.1.15 (KHT$
78.128.113.46 - - [03/Feb/2020:16:23:59 +0200] "GET / HTTP/1.0" 301 169 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)Chrome/75.0$
192.241.231.29 - - [03/Feb/2020:17:18:21 +0200] "GET / HTTP/1.1" 200 430 "-" "Mozilla/5.0 zgrab/0.x"
52.39.23.41 - - [03/Feb/2020:17:47:02 +0200] "GET / HTTP/1.1" 400 157 "-" "-"
5.234.167.209 - - [03/Feb/2020:18:00:17 +0200] "GET / HTTP/1.1" 301 169 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome$
185.204.1.184 - - [03/Feb/2020:18:13:17 +0200] "GET / HTTP/2.0" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0"
185.204.1.184 - - [03/Feb/2020:18:13:18 +0200] "GET /favicon.ico HTTP/2.0" 200 418 "-" "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0"
185.204.1.184 - - [03/Feb/2020:18:13:26 +0200] "GET / HTTP/2.0" 200 418 "-" "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0"
185.204.1.184 - - [03/Feb/2020:18:13:26 +0200] "GET /favicon.ico HTTP/2.0" 200 418 "-" "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0"
185.204.1.184 - - [03/Feb/2020:18:13:32 +0200] "GET / HTTP/2.0" 500 292 "-" "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0"
185.204.1.184 - - [03/Feb/2020:18:13:32 +0200] "GET /favicon.ico HTTP/2.0" 499 0 "-" "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0"
185.204.1.184 - - [03/Feb/2020:18:14:48 +0200] "GET / HTTP/2.0" 500 292 "-" "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0"
192.168.1.107 - - [03/Feb/2020:18:15:11 +0200] "GET / HTTP/1.1" 400 255 "-" "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0"
192.168.1.107 - - [03/Feb/2020:18:15:17 +0200] "GET / HTTP/2.0" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0"
50.115.168.169 - - [03/Feb/2020:18:16:55 +0200] "POST /cgi-bin/ViewLog.asp HTTP/1.1" 301 169 "-" "Ankit"
50.115.168.169 - - [03/Feb/2020:18:16:55 +0200] "3&remoteSubmit=Save" 400 157 "-" "-"
50.115.168.169 - - [03/Feb/2020:18:16:56 +0200] "POST /cgi-bin/ViewLog.asp HTTP/1.1" 301 169 "-" "Ankit"
50.115.168.169 - - [03/Feb/2020:18:16:56 +0200] "3&remoteSubmit=Save" 400 157 "-" "-"
50.115.168.169 - - [03/Feb/2020:18:16:58 +0200] "POST /cgi-bin/ViewLog.asp HTTP/1.1" 301 169 "-" "Ankit"
50.115.168.169 - - [03/Feb/2020:18:16:58 +0200] "3&remoteSubmit=Save" 400 157 "-" "-"
50.115.168.169 - - [03/Feb/2020:18:17:02 +0200] "POST /cgi-bin/ViewLog.asp HTTP/1.1" 301 169 "-" "Ankit"
50.115.168.169 - - [03/Feb/2020:18:17:02 +0200] "3&remoteSubmit=Save" 400 157 "-" "-"
50.115.168.169 - - [03/Feb/2020:18:17:10 +0200] "POST /cgi-bin/ViewLog.asp HTTP/1.1" 301 169 "-" "Ankit"
50.115.168.169 - - [03/Feb/2020:18:17:10 +0200] "3&remoteSubmit=Save" 400 157 "-" "-"
50.115.168.169 - - [03/Feb/2020:18:17:27 +0200] "POST /cgi-bin/ViewLog.asp HTTP/1.1" 301 169 "-" "Ankit"
50.115.168.169 - - [03/Feb/2020:18:17:27 +0200] "3&remoteSubmit=Save" 400 157 "-" "-"
168.228.194.238 - - [03/Feb/2020:18:30:09 +0200] "GET / HTTP/1.1" 301 169 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chro$
45.84.196.68 - - [03/Feb/2020:19:18:56 +0200] "POST /cgi-bin/ViewLog.asp HTTP/1.1" 301 169 "-" "Ankit"
45.84.196.68 - - [03/Feb/2020:19:18:56 +0200] "3&remoteSubmit=Save" 400 157 "-" "-"
45.84.196.68 - - [03/Feb/2020:19:18:59 +0200] "POST /cgi-bin/ViewLog.asp HTTP/1.1" 301 169 "-" "Ankit"
45.84.196.68 - - [03/Feb/2020:19:18:59 +0200] "3&remoteSubmit=Save" 400 157 "-" "-"
187.170.147.47 - - [03/Feb/2020:19:21:41 +0200] "{D79E94C5-70F0-46BD-965B-E17497CCB598}" 400 157 "-" "-"
45.84.196.68 - - [03/Feb/2020:19:37:44 +0200] "POST /cgi-bin/ViewLog.asp HTTP/1.1" 301 169 "-" "Ankit"
45.84.196.68 - - [03/Feb/2020:19:37:44 +0200] "3&remoteSubmit=Save" 400 157 "-" "-"
45.84.196.68 - - [03/Feb/2020:19:37:46 +0200] "POST /cgi-bin/ViewLog.asp HTTP/1.1" 301 169 "-" "Ankit"
45.84.196.68 - - [03/Feb/2020:19:37:46 +0200] "3&remoteSubmit=Save" 400 157 "-" "-"
45.84.196.68 - - [03/Feb/2020:19:37:51 +0200] "POST /cgi-bin/ViewLog.asp HTTP/1.1" 301 169 "-" "Ankit"
45.84.196.68 - - [03/Feb/2020:19:37:51 +0200] "3&remoteSubmit=Save" 400 157 "-" "-"Would there be any point in starting over, could there be something erroneously configured / set now that I have been trying out many different things?
Cheers, and thanks again for the help!
-
@keinhen I’m no Linux power user but I have tried and failed (and succeeded) installing Nextcloud enough to know that when you get to “Welcome to Our Server” you are getting really close.
- That means you have correctly/successfully set up your container and have generated a valid cert. Don’t start over!
- Your config.php and Nextcloud....conf files probably just need fine tuning.
- If you are knocking on the Nextcloud setup page but receiving error messages, then your files in #2 above are correct, and you just don’t have the right info inserted in the setup page. Go back to @macom’s [How-To] and follow that last section precisely. When I first used that guide I remember inserting information hanging around in my mind from previous guides, and kept wondering why I was getting those errors. Finally I decided to slow down and read each line of the final setup (slowly) and was amazed that it worked. I’m not saying this is your problem but it could be.
Good luck.
-
hallo again
can someone tell me what i have to add to the composer if i want use the onlyoffice integration in nextcloud?
there is a "free" version that should work.
thx (quick forum search tell me only some members got it, but no little how-to - don't like to research the wheel )
-
Onlyoffice is an app activated from within Nextcloud. Once Nextcloud is up and running you install/activate it under your user icon at the top right corner of the Nextcloud web page: /apps/Office & text
-
yeah found that,
installed community server and onlyoffice integration, but can't get it working ...get 2 errors if i try to open a *.docx file
"Community document server is not supported for this instance, please setup and configure an external document server"
and
"can't execute x2t binary, ensure php can execute binaries in the app folder"found this: https://github.com/nextcloud/d…erver_community/issues/10 but didn't help - but - they say must be a problem with the linuxserver docker image of nextcloud if i understand it right.
so ... don't know - everyone got it working? maybe with a extra docker for the community server?
-
Yes you can set up a docker. For nextcloud to connect to onlyoffice, a https connection is needed. So you need to include onlyoffice in the letsencrypt container.
I’m on vacation right now so I can’t give you the configs right now. -
@keinhen I’m no Linux power user but I have tried and failed (and succeeded) installing Nextcloud enough to know that when you get to “Welcome to Our Server” you are getting really close.
- That means you have correctly/successfully set up your container and have generated a valid cert. Don’t start over!
- Your config.php and Nextcloud....conf files probably just need fine tuning.
- If you are knocking on the Nextcloud setup page but receiving error messages, then your files in #2 above are correct, and you just don’t have the right info inserted in the setup page. Go back to @macom’s [How-To] and follow that last section precisely. When I first used that guide I remember inserting information hanging around in my mind from previous guides, and kept wondering why I was getting those errors. Finally I decided to slow down and read each line of the final setup (slowly) and was amazed that it worked. I’m not saying this is your problem but it could be.
Good luck.
Thanks for the pointers!
Reading through slowly and not rushing definitely usually is the key, but I am still left confounded. I guess the issue is with the config.php and .conf files, but I can't seem to find anything awry, and I have tried back and forth tweaking a few parameters relating to port numbers to double check for the all-to-probable human error i've added into the mix. I'll have to keep looking at them and referencing @macom 's howto! It's just a bit tough going line by line as I am using both the subdomain and duckdns variants listed in the comments to get things up and running, so there is no clear one page read-through maybe a cup of coffee on a less busy morning could be what gets this finally past the finish line.
Thanks again!
-
but sounds good,
so - ehm - i just stay on and wait till you will find some more time for meletsencrypt and nextcloud is running (with macoms tutorial)
if it will help, i use subfolder cause my dyndns will not support subdomain but i like that dyn xD
-
@keinhen were you successful in accessing Nextcloud locally?
@draddy I’ll be back in 3 weeks. This German guide (https://decatec.de/home-server…ce-mit-eigener-subdomain/ ) helped me.
-
ok this is for subdomain - but i will give it a try with subfolder - but - after some sleep
-
@keinhen were you successful in accessing Nextcloud locally?
@draddy I’ll be back in 3 weeks. This German guide (https://decatec.de/home-server…ce-mit-eigener-subdomain/ ) helped me.
Before successfully obtaining the cert from letsencrypt, when I was still receiving error messages from "docker -f logs letsencrypt", I was able to access nextcloud locally.
Now when I type localip:444, I receive security warnings that caution about proceeding to the website, like I used to have when I had a nextcloudpi instance running successfully. Also, if I forget the https:// prefix, I get this warning
400 Bad RequestThe plain HTTP request was sent to HTTPS portnginx/1.16.1
This also used to happen, so I take it as a sign I've gotten closer.
But in short: no, I can't access nextcloud locally anymore.
-
@Morlan maybe you find something i do wrong
try to add to composer file like
Code
Alles anzeigenonlyofficedocker: image: onlyoffice/documentserver:latest container_name: onlyofficedocker stdin_open: true restart: always environment: - JWT_ENABLED='true' - JWT_SECRET='totalysecretpasswordyouwillneverknow:-P' ports: - 4433:443 volumes: - /srv/dev-disk-by-id-ata-VBOX_HARDDISK_VBd533f182-14103599-part6/appdata/onlyoffice/DocumentServer/data/:/var/www/onlyoffice/Data onlyoffice/documentserver
create a proxy conf:
Code
Alles anzeigenlocation /onlyoffice { return 301 $scheme://$host/onlyoffice/; } location ^~ /onlyoffice/ { # enable the next two lines for http auth #auth_basic "Restricted"; #auth_basic_user_file /config/nginx/.htpasswd; include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_onlyoffice onlyoffice; rewrite /onlyoffice(.*) $1 break; proxy_pass https://192.168.177.40:4433; }
but got onyl
502 Bad Gateway
also with
https://192.168.177.40:4433 i only get a "site not reachable"what i miss?
this is in my test VM
or is it wrong to try get it in the composer file? goal was to have that one file for all and have onlyoffice in the same network?
also - in the appdata folder for onlyoffice is only the cert i created with the howto you linked - need to set other volumes?
thx
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!