1

I installed nextcloud using docker on Debian. I finished setting up my Nextcloud I got this:

Screenshot of "intrernal server error" message

Where I can find these logs?

BTW: this is my /var folder:

total 44
6422529 drwxr-xr-x 11 root root  4096 Oct  5 11:58 ./
      2 drwxr-xr-x 21 root root  4096 Feb 24 11:16 ../
6422704 drwxr-xr-x  2 root root  4096 Feb 24 06:23 backups/
6422534 drwxr-xr-x 12 root root  4096 Jan 21 20:46 cache/
6422530 drwxr-xr-x 39 root root  4096 Feb 24 00:22 lib/
6422706 drwxrwsr-x  2 root staff 4096 Sep 19 23:39 local/
6422707 lrwxrwxrwx  1 root root     9 Oct  5 11:58 lock -> /run/lock/
6422702 drwxr-xr-x 10 root root  4096 Feb 24 00:22 log/
6422752 drwxrwsr-x  2 root mail  4096 Oct  5 11:58 mail/
6422751 drwxr-xr-x  2 root root  4096 Oct  5 11:58 opt/
6422708 lrwxrwxrwx  1 root root     4 Oct  5 11:58 run -> /run/
6422709 drwxr-xr-x  6 root root  4096 Feb 19 14:55 spool/
6422710 drwxrwxrwt  3 root root  4096 Feb 24 11:16 tmp/

From official docs it should be in /var/log/nextcloud.log but no such file exists.

I tried to create log file manually:

sudo touch /var/log/nextcloud.log

and signing owenership of www-data group:

sudo chown www-data /var/log/nextcloud.log

But it did not help.

Jan Černý
  • 1,185
  • 2
  • 24
  • 46

3 Answers3

2

Inside a docker container, Nextcloud will usually write its logs to stdout.

You can check the logs using docker logs command.

docker logs --follow CONTAINER

where CONTAINER is your Nextcloud's container name or ID (find out with docker ps).

Docker also captures the logs and saves it to a json file with additional information (timestamp, etc). You can find it at:

/var/lib/docker/containers/<container_id>/<container_id>-json.log
pLumo
  • 22,231
  • 2
  • 41
  • 66
1

Try in /var/log/apache2/nextcloud.log assuming you're using an Apache LAMP stack.

You can also set where the logs will be by adding a TransferLog section to your Apache virtual host file usually located in /etc/apache2/sites-available/. Also see this great setup guide which covers most everything:

https://wiki.learnlinux.tv/index.php/Nextcloud_-_Complete_Setup_Guide

terdon
  • 234,489
  • 66
  • 447
  • 667
Jason Croyle
  • 773
  • 2
  • 13
1

I found it by installing locate:

sudo apt install locate

Then I updated the db:

sudo updatedb

And the last thing was to locate the file itself:

$ locate nextcloud.log
/var/lib/docker/volumes/03eae9cea7bb7b1cff1f0095298b17972805c8b47f9eb5314fc2dcef122382b8/_data/data/nextcloud.log 
/var/lib/docker/volumes/4f5d3a9d2775c178af0c02a01215be9aee3134f9a95c3495624332dd0a84a48e/_data/data/nextcloud.log 
/var/lib/docker/volumes/56668230c3ede69d3785fb040afc276244af53bd491e50315a2531becf7c62c9/_data/data/nextcloud.log 
/var/lib/docker/volumes/5bd4dbab8d92023769472c10a5b0b578d64bfc5fd317efef7ab049011740e806/_data/data/nextcloud.log 
/var/lib/docker/volumes/73c044cbc87e6355477581f1ae7bda25cee273b960986f40c31bd25520bc6052/_data/data/nextcloud.log 
/var/lib/docker/volumes/dfdff10754f4ad637733856569fe7a8fc7cbc4ee05b16385d369bae050e3344b/_data/data/nextcloud.log 
/var/lib/docker/volumes/e1d5f7094baaae80f635e166dfe20f64f3740ceb62f622425ccc2c50ecd5f852/_data/data/nextcloud.log

I do not know why are there so many, but still I am happy it worked.


Special thanks to user @terdon for his assistance.

terdon
  • 234,489
  • 66
  • 447
  • 667
Jan Černý
  • 1,185
  • 2
  • 24
  • 46