Cant see files from another network than local

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com 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:

example

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

longer
example
here

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 (eg, 20.0.5): 22.0.0
Operating system and version (eg, Ubuntu 20.04): Debian 10
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.38
PHP version (eg, 7.4): PHP 7.3.29-1~deb10u1

The issue you are facing:

From local network everything works fine, but if I go through VPN, I can login create files and dirs but I cant access it, on web UI I cant see any files.

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

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

{"reqId":"YI0KjJm2Oe23ZJO0K1mb","level":3,"time":"2021-07-28T13:05:01+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Use of undefined constant EXPIRED_SESSION_TIMEOUT - assumed 'EXPIRED_SESSION_TIMEOUT' (this will throw an Error in a future version of PHP) at /var/www/html/nextcloud/apps/documentserver_community/lib/Channel/SessionManager.php#134","userAgent":"--","version":"22.0.0.11","exception":{"Exception":"Error","Message":"Use of undefined constant EXPIRED_SESSION_TIMEOUT - assumed 'EXPIRED_SESSION_TIMEOUT' (this will throw an Error in a future version of PHP) at /var/www/html/nextcloud/apps/documentserver_community/lib/Channel/SessionManager.php#134","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/apps/documentserver_community/lib/Channel/SessionManager.php","line":134,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"Use of undefined constant EXPIRED_SESSION_TIMEOUT - assumed 'EXPIRED_SESSION_TIMEOUT' (this will throw an Error in a future version of PHP)","/var/www/html/nextcloud/apps/documentserver_community/lib/Channel/SessionManager.php",134,{"query":{"__class__":"OC\\DB\\QueryBuilder\\QueryBuilder"}}]},{"file":"/var/www/html/nextcloud/apps/documentserver_community/lib/Channel/SessionManager.php","line":143,"function":"getExpiredSessions","class":"OCA\\DocumentServer\\Channel\\SessionManager","type":"->","args":[]},{"file":"/var/www/html/nextcloud/apps/documentserver_community/lib/BackgroundJob/Cleanup.php","line":65,"function":"cleanSessions","class":"OCA\\DocumentServer\\Channel\\SessionManager","type":"->","args":[]},{"file":"/var/www/html/nextcloud/lib/public/BackgroundJob/Job.php","line":79,"function":"run","class":"OCA\\DocumentServer\\BackgroundJob\\Cleanup","type":"->","args":[null]},{"file":"/var/www/html/nextcloud/cron.php","line":127,"function":"execute","class":"OCP\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"/var/www/html/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"6101633a713db"}


{"reqId":"YI0KjJm2Oe23ZJO0K1mb","level":3,"time":"2021-07-28T13:05:01+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"A non-numeric value encountered at /var/www/html/nextcloud/apps/documentserver_community/lib/Channel/SessionManager.php#134","userAgent":"--","version":"22.0.0.11","exception":{"Exception":"Error","Message":"A non-numeric value encountered at /var/www/html/nextcloud/apps/documentserver_community/lib/Channel/SessionManager.php#134","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/apps/documentserver_community/lib/Channel/SessionManager.php","line":134,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"A non-numeric value encountered","/var/www/html/nextcloud/apps/documentserver_community/lib/Channel/SessionManager.php",134,{"query":{"__class__":"OC\\DB\\QueryBuilder\\QueryBuilder"}}]},{"file":"/var/www/html/nextcloud/apps/documentserver_community/lib/Channel/SessionManager.php","line":143,"function":"getExpiredSessions","class":"OCA\\DocumentServer\\Channel\\SessionManager","type":"->","args":[]},{"file":"/var/www/html/nextcloud/apps/documentserver_community/lib/BackgroundJob/Cleanup.php","line":65,"function":"cleanSessions","class":"OCA\\DocumentServer\\Channel\\SessionManager","type":"->","args":[]},{"file":"/var/www/html/nextcloud/lib/public/BackgroundJob/Job.php","line":79,"function":"run","class":"OCA\\DocumentServer\\BackgroundJob\\Cleanup","type":"->","args":[null]},{"file":"/var/www/html/nextcloud/cron.php","line":127,"function":"execute","class":"OCP\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"/var/www/html/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"6101633a7137e"}

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

<?php
$CONFIG = array (
  'instanceid' => '****************',
  'passwordsalt' => '*******************',
  'secret' => '***************************',
  'trusted_domains' => 
  array (
	  0 => 'nextcloud.**********.com',
  ),
  'default_phone_region' => 'CZ',
  'allow_local_remote_servers' => true,
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '22.0.0.11',
  'overwrite.cli.url' => 'https://nextcloud.***********.com',
  'dbname' => '**********',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '*************',
  'dbpassword' => '***********',
  'installed' => true,
  'logfile' => '/var/log/nextcloud.log',
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_from_address' => '******',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '*************',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '**************',
  'mail_smtpport' => '25',
  'mail_smtpname' => '*******************',
  'mail_smtppassword' => '***************',
);

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

PASTE HERE