Hello,
I have a newly deployed Nextcloud in a custom docker container with MariaDB and Redis active.
Version of NC is latest, 24.0.1.
I am trying to create a single clean deployment and setup. I am however failing at the last step: windows integration (duh).
If I run the application and want to Log In, browser pops up, BUT it omits my custom port. Browser wants to open https://fqdn/…
Not sure what the issue is? The setup is pretty straightforward… here is my docker-compose content (filtered).
version: ‘3.3’
services:
nextcloud-db:
image: mariadb
restart: unless-stopped
container_name: nextcloud-db
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes:
- /etc/docker/mysql:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=xxxxxxx
- MYSQL_PASSWORD=xxxxxxxxx
- MYSQL_DATABASE=xxxxxxxxxx
- MYSQL_USER=xxxxxxxxxxx
- NEXTCLOUD_ADMIN_USER=xxxxxxx
- NEXTCLOUD_ADMIN_PASSWORD=xxxxxxxxxx
- NEXTCLOUD_TRUSTED_DOMAINS=server.domain.tld
nextcloud-redis:
image: redis:alpine
container_name: nextcloud-redis
hostname: nextcloud-redis
restart: unless-stopped
command: redis-server --requirepass xxxxxxxxxxxxxxxx
nextcloud-app:
image: nextcloud
container_name: nextcloud-app
restart: unless-stopped
depends_on:
- nextcloud-db
- nextcloud-redis
ports:
- 4444:80
volumes:
- /etc/docker/configs/nextcloud:/var/www/html
- /mnt/nextcloud_data:/var/www/html/data
environment:
- MYSQL_PASSWORD=xxxxxxxxxxxxxxx
- MYSQL_DATABASE=xxxxxxxxxxxx
- MYSQL_USER=xxxxxxxxxxxxx
- MYSQL_HOST=nextcloud-db
- REDIS_HOST=nextcloud-redis
- REDIS_HOST_PASSWORD=xxxxxxxxxxxxxxxx
- OVERWRITEHOST=server.domain.tld
- OVERWRITECLIURL=https://server.domain.tld:4444/
- OVERWRITEPROTOCOL=https
networks:
default:
external:
name: docker_default
And this is the config.php:
<?php
$CONFIG = array (
'htaccess.RewriteBase' => '/',
'memcache.local' => '\\OC\\Memcache\\APCu',
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/html/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/www/html/custom_apps',
'url' => '/custom_apps',
'writable' => true,
),
),
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'nextcloud-redis',
'password' => 'xxxxxxxxxxxxxxxxxx',
'port' => 6379,
),
'overwritehost' => 'fqdn.domain.tld',
'overwriteprotocol' => 'https',
'overwrite.cli.url' => 'https://fqdn.domain.tld:4444/',
'instanceid' => 'xxxxxxxxxx',
'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxx',
'secret' => 'xxxxxxxxxxxxxxxxxxxx',
'trusted_domains' =>
array (
0 => 'fqdn.domain.tld:4444',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'mysql',
'version' => '24.0.1.1',
'dbname' => 'nextcloud',
'dbhost' => 'nextcloud-db',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'xxxxxxxxxx',
'dbpassword' => 'xxxxxxxxxxxxxxxx',
'installed' => true,
);
Not really sure what the problem is. I believe though that in my previous setup where Nextcloud was on the own server and not inside the docker, I configured Apache for the custom port (4444), instead 80 and 443. That always worked fine.
It doesn’t make much sense to make Docker Nextcloud use SSL, since I use HAproxy.
I really have no idea what to do, to make windows client correctly recognize the custom port, which I write into the client, but it gets omitted when website pops up.
Can anyone help please?
Thank you