Nextcloud fpm: No response, no logs

Hello,
I hope this is easy to answer for someone who knows how Nextcloud in Docker works. I am trying to set up a new Nextcloud instance for the first time, using the fpm Docker image with host PostgreSQL. I am unable to view the Nextcloud page when connecting directly to 9000 as well as when using the host Apache as proxy. What am I doing wrong? I am not able to find any error logs from Nextcloud itself. I appreciate your help.

Version info

Nextcloud version (eg, 20.0.5): docker nextcloud fpm fd6a1a699928 2 days ago 958MB
Operating system and version (eg, Ubuntu 20.04): Fedora 35
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.51 (Fedora)
PHP version (eg, 7.4): I did not manually install PHP anywhere

docker-compose.yml
version: '3.8'

volumes:
  nextcloud:
    external: true

services:
  app:
    image: nextcloud:fpm
    restart: always
    ports:
      - 9000:9000
    volumes:
      - nextcloud:/mnt/user_data/nextcloud
    environment:
      - POSTGRES_DB=nextcloud
      - POSTGRES_USER=nextcloud
      - POSTGRES_PASSWORD=<redacted>
      - POSTGRES_HOST=host.docker.internal
Run and log
$ sudo docker-compose up
Starting docker_app_1 ... done
Attaching to docker_app_1
app_1  | [06-Dec-2021 13:48:29] NOTICE: fpm is running, pid 1
app_1  | [06-Dec-2021 13:48:29] NOTICE: ready to handle connections
Connection error
$ wget http://localhost:9000/
--2021-12-06 15:31:00--  http://localhost:9000/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:9000... connected.
HTTP request sent, awaiting response... No data received.
Retrying.

The output of your Nextcloud log in Admin > Logging: Nextcloud not opening

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!): I am unable to find a file called “config.php” in my container. However I have made no change to any config file beyond the docker compose yml.

The output of your Apache/nginx/system log in /var/log/____: “/var/log/httpd/error_log” on the host

[Mon Dec 06 15:38:33.040493 2021] [proxy:error] [pid 291441:tid 291492] (13)Permission denied: AH00957: http: attempt to connect to 127.0.0.1:9000 (localhost) failed
[Mon Dec 06 15:38:33.040538 2021] [proxy_http:error] [pid 291441:tid 291492] [client 87.156.140.198:58058] AH01114: HTTP: failed to make connection to backend: localhost

Thanks for reading, hope to solve this. I try to have a basic setup and with Nextcloud in Docker and all other services provided by the host.

-Mercy

you always need an additional nginx webserver. the fpm container will only process php code. no static html and or css. (more or less)

see the example docker-compose files. e.g.: docker/docker-compose.yml at master · nextcloud/docker · GitHub

1 Like

Ok I will then use the default nextcloud image, and use my Apache as HTTPS proxy. I will report back how it goes and then accept the solution. Thanks for your reply!

I initially chose the fpm image, because I understood from the Docker description that it is meant to be used with any additional web server and I wanted to use my Apache anyway for HTTPS. Now I learned that this only should be used with the nginx container.