Nextcloud Snap Installation on HAProxy only for 443, error 503

Nextcloud version : snap nextcoud 25.0.7
Operating system and version : Ubuntu 23.04

The issue you are facing:

i would like to make it work only with port 443, i’ve the basic snap installation and i’ve this settings into the config.php

'trusted_domains' => 
  array (
    0 => 'localhost.domain.local',
    1 => '',
    2 => '10.*.*.*',  <<ip host nextcloud
    3 => '10.*.*.*', <<ip pfsense/haproxy
    4 => '',
  'trusted_proxies' => '10.*.*.*',  <<ip host nextcloud
  'overwriteprotocol' => 'https',
  'overwritehost' => '',

in reverse proxy i’ve setup in backend address+port: ip host +443 (if i put another record with iphost + 80 i can see internally and externally at least the login page but as soon i logged i get 503 error)

and the redirect work, if i put http://localhost.domain.local i get the, the certs is ok but i get error 503

i don’t managed with an apache installed locally, i just have the nextcloud.apache service, maybe i’ve to open or make some change in the config of the apache services in snap for make it work with only 443 and make it see externally?

hope someone could help me, best regards


You have to install SSL certificate (Self sign will do too) to force Snap work with 443 only.

Activate the HTTPS in snap.

For more info, run sudo nextcloud.enable-https -h