Nextcloud getCutoffTimestamp() must be of the type int, bool returned

Nextcloud version (eg, 18.0.2):
Operating system and version (eg, Ubuntu 20.04): linuxserver Docker on Raspbian buster
Apache or nginx version (eg, Apache 2.4.25): nginx 1.18.0 + s6
PHP version (eg, 7.1): 7.4.14

The issue you are facing:
Since upgrade to 20.5 , I have a 500 error and I see in the logs:

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

The output of your Nextcloud log in Admin > Logging:

{"reqId":"ftECshhAumj5ATjpXBv9","level":4,"time":"2071-05-17T09:03:52+00:00","remoteAddr":"","user":"--","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/olivier/Eklectik%20Mood","message":{"Exception":"TypeError","Message":"Return value of OC\\Security\\Bruteforce\\Throttler::getCutoffTimestamp() must be of the type int, bool returned","Code":0,"Trace":[{"file":"/config/www/nextcloud/lib/private/Security/Bruteforce/Throttler.php","line":238,"function":"getCutoffTimestamp","class":"OC\\Security\\Bruteforce\\Throttler","type":"->"},{"file":"/config/www/nextcloud/lib/private/Security/Bruteforce/Throttler.php","line":265,"function":"getAttempts","class":"OC\\Security\\Bruteforce\\Throttler","type":"->"},{"file":"/config/www/nextcloud/lib/private/Security/Bruteforce/Throttler.php","line":332,"function":"getDelay","class":"OC\\Security\\Bruteforce\\Throttler","type":"->"},{"file":"/config/www/nextcloud/lib/private/User/Session.php","line":441,"function":"sleepDelay","class":"OC\\Security\\Bruteforce\\Throttler","type":"->"},{"file":"/config/www/nextcloud/apps/dav/lib/Connector/Sabre/Auth.php","line":131,"function":"logClientIn","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Backend/AbstractBasic.php","line":106,"function":"validateUserPass","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/config/www/nextcloud/apps/dav/lib/Connector/Sabre/Auth.php","line":254,"function":"check","class":"Sabre\\DAV\\Auth\\Backend\\AbstractBasic","type":"->"},{"file":"/config/www/nextcloud/apps/dav/lib/Connector/Sabre/Auth.php","line":156,"function":"auth","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":192,"function":"check","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":144,"function":"check","class":"Sabre\\DAV\\Auth\\Plugin","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMethod","class":"Sabre\\DAV\\Auth\\Plugin","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":458,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/apps/dav/lib/Server.php","line":332,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/remote.php","line":167,"args":["/config/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/config/www/nextcloud/lib/private/Security/Bruteforce/Throttler.php","Line":109,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)","version":""}

Unfortunately, when I tried to show it formatted with occ logs, I get adatabse connection error
The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'maintenance' => false,
  'version' => '',
  'installed' => true,
  'theme' => '',
  'datadirectory' => '/data',
  'instanceid' => '***',
  'passwordsalt' => '***',
  'secret' => '***',
  'trusted_domains' =>
  array (
    0 => 'my domain',
    1 => 'my blog domain',
    2 => '',
  '' => 'stable',
  'overwrite.cli.url' => 'my domain',
  'overwriteprotocol' => 'https',
  'log_type' => 'file',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'redis',
    'port' => 6379,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'dbtype' => 'mysql',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbport' => '3306',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '***',
mail stuff here
  'jpeg_quality' => '60',
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' =>
  array (
  'twofactor_enforced_excluded_groups' =>
  array (
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'loglevel' => 0,
  'app_install_overwrite' =>
  array (
    0 => 'keeweb',
  'encryption.legacy_format_support' => false,
  'encryption.key_storage_migrated' => false,

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

empty log in /var/log/nginx
Docker logs:
[s6-init] making user provided files available at /var/run/s6/etc…exited 0.,
[s6-init] ensuring user provided files have correct perms…exited 0.,
[fix-attrs.d] applying ownership & permissions fixes…,
[fix-attrs.d] done.,
[cont-init.d] executing container initialization scripts…,
[cont-init.d] 01-envfile: executing… ,
[cont-init.d] 01-envfile: exited 0.,
[cont-init.d] 10-adduser: executing… ,
_ (),
| | ___ _ _,
| | / | | | / \ ,
| | _
\ | | | () |,
|| |
/ || _/,
Brought to you by,
To support LSIO projects visit:,,
User uid: 1000,
User gid: 1000,
[cont-init.d] 10-adduser: exited 0.,
[cont-init.d] 20-config: executing… ,
[cont-init.d] 20-config: exited 0.,
[cont-init.d] 30-keygen: executing… ,
using keys found in /config/keys,
[cont-init.d] 30-keygen: exited 0.,
[cont-init.d] 40-config: executing… ,
[cont-init.d] 40-config: exited 0.,
[cont-init.d] 50-install: executing… ,
[cont-init.d] 50-install: exited 0.,
[cont-init.d] 60-memcache: executing… ,
[cont-init.d] 60-memcache: exited 0.,
[cont-init.d] 70-aliases: executing… ,
[cont-init.d] 70-aliases: exited 0.,
[cont-init.d] 99-custom-files: executing… ,
[custom-init] no custom files found exiting…,
[cont-init.d] 99-custom-files: exited 0.,
[cont-init.d] done.,
[services.d] starting services,
[services.d] done.,

I fixed the issue by forcing (casting) the return type in the getCutoffTimestamp function but it’s quite weird: it returns a date->getTimestamp() which is declared as returning an int…

EDIT: error, not fixed, the database error masked this issue.

Hi leolivier,
I’m facing the same issue on my docker-environment since my watchtower-container updated my nextcloud-container… :frowning:
I didn’t really figure out if I can do something at the moment (casting the type?) or do I have to wait for an updated nextcloud-container image?

I moved to the official docker version and now it’s working again (except that 2fa doesn’t work anymore)

Have to see if this is a way for me - I’m using linuxserver/nextcloud container as I’m running that stuff on a raspberry pi 4…

Same for me. I struggled a bit this afternoon to move to the offical docker but I finally succeeded

Could you give me some hints/tips how to…?
I’m quite new to docker so I’m a littlebit lost on how to switch the running linuxserver/nextcloud container to the docker original one without loosing data and/or config…

Thank you! :pray:

–> as i cannot answer for 3rd time as new user I’ll add here:
thanks a lot :+1: I’ll give this a try responding to my environment (no proxy, mysql/mariadb,…)

Thank you guys - also followed the steps described by @heoxqih -> everything’s fine again!

My biggest hint is my docker-compose file which is:
version: ‘3’


    image: yobasystems/alpine-mariadb
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --log-bin=a43dd04cc60a-bin
    container_name: nc.official.db
    image: yobasystems/alpine-mariadb
      - "../nextcloud/db/mysql:/var/lib/mysql" # location where you persist DB files
      - "../nextcloud/db/restore:/restore" # mount folder to store mysql_dump file
      - TZ=Europe/Paris
    env_file: .env
    restart: always

    container_name: nc.official.redis
    image: redis:alpine
    restart: always
      - "./redis:/data"

    image: nextcloud:production
    restart: always
    container_name: nc.official
      - db
      - nextcloud:/var/www/html
      - ./config:/var/www/html/config
      - /hdd/nextcloud:/var/www/html/data
      - ./apps:/var/www/html/apps
    env_file: .env
      - db
      - redis
      - 8081:80

I have an apache in front of all my docker containers as a reverse proxy and https manager and the vhost for my nextcloud is proxying to port 8081. If you don’t have a proxy you can use directly either 443:443 or 80:80 for the ports mapping
Important point: this works because I’m using an external database. If you’re using sqlite, not sure how to do the move. If you’re on mysql/mariadb, then the configuration of your database must be the same as today, the volumes must refers to the actual directory containing your current db. The .env file is the same as before for MYSQL variables but now contains a lot more variables that you can find on Docker Hub
Also, the data volume you had in your previous version should be pointed to /var/www/html/data.
If you want to keep your apps, copy them from your previous install to the new dir and set the apps volume.

Hope it helps…


Same problem here, anyone found a solution for the docker version?
the tip from leoliver to switch to the official nextcloud version is good but i am a very afraid of switching, because my server is running since 4 years and theres many data in it :frowning:

I am having the same issue on a docker based on armhf. Seems like the issue is because of the update to alpine 3.13. There is a workaround at FAQ -

Option 2 suggests
sudo dpkg -i libseccomp2_2.4.4-1~bpo10+1_armhf.deb

See if that works for you.


Thanks for the information, my nextcloud is running on a rpi4, and there iadded the backports repo for DebianBuster, these are the commands according to the FAQ:

sudo apt-key adv --keyserver --recv-keys 04EE7237B7D453EC 648ACFD622F3D138

echo “deb buster-backports main” | sudo tee -a /etc/apt/sources.list.d/buster-backports.list

sudo apt update

sudo apt install -t buster-backports libseccomp2

After this i restarted my nextcloud container, and it is running well now!


Did you have a look at this issue too?

Just my five cents.

After a apt upgrade I became the error:
“Internal Server Error
The server encountered an internal error and was unable to complete your request.”
I reinstalled all my docker containers with databases with no success, but your command finally worked.

Thank you very much.

1 Like