NC 22.1.1 no web access

Support intro

I’ve installed a fresh 22.1.1 Nc on an Open BSD (Truenas) platform, Installation was not a problem, after installation, i insert the trusted domain in the config.php and was able to log in to nc on my local network. Everything was fine, Im able to create user and all from nc itself. But my problem now is, I cannot access nc from the web/internet@ out of my local area network. I have configured my domain name and port forwarding to my router. The previous nc 21 was not a problem at all. Now when i hit from the internet. nc was unreachable. This is the problem i’m facing. How do I correct this?

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version : 22.1.1 updated to 22.2.0
Operating system and version : FreeBSD 12.2-RELEASE-p9 amd64
Apache or nginx version (eg, Apache 2.4.25): nginx/1.20.1 (fpm-fcgi)
PHP version (eg, 7.4): 7.4.23

Operating system: FreeBSD 12.2-RELEASE-p9 FreeBSD 12.2-RELEASE-p9 2ee62d665f0(HEAD) TRUENAS amd64

Webserver: nginx/1.20.1 (fpm-fcgi)

Database: mysql 8.0.26

PHP version: 7.4.23

Modules loaded: Core, date, libxml, pcre, hash, Reflection, SPL, session, standard, cgi-fcgi, mysqlnd, apcu, bcmath, bz2, ctype, curl, dom, mbstring, fileinfo, filter, gd, gmp, iconv, imagick, intl, json, ldap, exif, openssl, pcntl, PDO, posix, SimpleXML, xml, xmlwriter, zip, zlib, pdo_mysql, redis, xmlreader, xsl, Zend OPcache

Nextcloud version: 22.2.0 -

The issue you are facing:

Not able to access nextcloud from the internet/remote - only accesible on local area network

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Added trusted domain to config.php
  2. Port forwarding done to the router. - Previous ver of nc no problem

The output of your Nextcloud log in Admin > Logging:

{"reqId":"iKlzQdW4BatWhtWg6sCM","level":3,"time":"2021-09-30T11:54:40+00:00","remoteAddr":"","user":"ncadmin","app":"PHP","method":"GET","url":"/settings/admin/overview","message":"dns_get_record(): DNS Query failed at /usr/local/www/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php#83","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36","version":"","exception":{"Exception":"Error","Message":"dns_get_record(): DNS Query failed at /usr/local/www/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php#83","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"dns_get_record(): DNS Query failed","/usr/local/www/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php",83,{"target":"","recursionCount":1,"targetIps":["","2a01:4f9:2a:3119::181"],"soaDnsEntry":{"host":"","class":"IN","ttl":86400,"type":"SOA","mname":"","0":"And 6 more entries, set log level to debug to see all entries"},"dnsNegativeTtl":3600,"0":"And 5 more entries, set log level to debug to see all entries"}]},{"file":"/usr/local/www/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php","line":83,"function":"dns_get_record","args":["",16]},{"file":"/usr/local/www/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php","line":128,"function":"dnsResolve","class":"OC\\Http\\Client\\DnsPinMiddleware","type":"->","args":["",1]},{"file":"/usr/local/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php","line":35,"function":"OC\\Http\\Client\\{closure}","class":"OC\\Http\\Client\\DnsPinMiddleware","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":31,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->","args":["*** sensitive parameter replaced ***","***

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/usr/local/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => true,
    1 => 
    array (
      'path' => '/usr/local/www/nextcloud/apps-pkg',
      'url' => '/apps-pkg',
      'writable' => false,
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'one-click-instance' => true,
  'one-click-instance.user-limit' => 100,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
  'passwordsalt' => 'secret',
  'secret' => 'secret',
  'trusted_domains' => 
  array (
    0 => 'localhost',
	1 => 'x.x.x.x',
    2 => 'x.x.xx',
	3 => 'x.x.x.x',
    4 => '',
    5 => '',
    6 => '',
    7 => '',
  'datadirectory' => '/usr/local/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_ncadmin',
  'dbpassword' => '',
  'installed' => true,
  'instanceid' => '',
  'mail_smtpmode' => '',
  'mail_sendmailmode' => '',
  'mail_from_address' => '',
  'mail_domain' => '',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '',
  'mail_smtpport' => '',
  'mail_smtpsecure' => '',
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'default_phone_region' => '',

The output of your Apache/nginx/system log in /var/log/____:

2021/09/30 17:58:47 [warn] 3309#101839: *3886 an upstream response is buffered to a temporary file /var/tmp/nginx/fastcgi_temp/6/00/0000000006 while reading upstream, client:, server: _, request: “GET /js/activity/activity-sidebar.js?v=22d65809-4 HTTP/2.0”, upstream: “fastcgi://unix:/var/run/nextcloud-php-fpm.sock:”, host: “”
2021/09/30 17:59:49 [warn] 3309#101839: *3886 an upstream response is buffered to a temporary file /var/tmp/nginx/fastcgi_temp/7/00/0000000007 while reading upstream, client:, server: _, request: “GET /apps/theming/image/background?v=4 HTTP/2.0”, upstream: “fastcgi://unix:/var/run/nextcloud-php-fpm.sock:”, host: “”

php-fpm.log ----

[30-Sep-2021 09:32:49] NOTICE: fpm is running, pid 31844
[30-Sep-2021 09:32:49] NOTICE: ready to handle connections
[30-Sep-2021 09:33:43] NOTICE: Finishing …
[30-Sep-2021 09:33:43] NOTICE: exiting, bye-bye!
[30-Sep-2021 09:38:04] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful

[30-Sep-2021 09:38:04] NOTICE: fpm is running, pid 3274
[30-Sep-2021 09:38:04] NOTICE: ready to handle connections