Docker AIO install fail

Per instructions on https://nextcloud.com/blog/how-to-install-the-nextcloud-all-in-one-on-linux/ I tried setting up my Nextcloud AIO with the following command on my Linux box running docker:

 sudo docker run \
--sig-proxy=false \
--name nextcloud-aio-mastercontainer \
--restart always \
--publish 3901:80 \
--publish 3902:8080 \
--publish 3903:8443 \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest

This succeeds and I get a Nextcloud login page, but after I input the password it gives me, it returns this error page:

Slim Application Error

The application could not run because of the following error:
Details
Type: GuzzleHttp\Exception\ServerException
Code: 500
Message: Server error: `POST http://localhost/v1.41/containers/nextcloud-aio-domaincheck/start` resulted in a `500 Internal Server Error` response: {"message":"driver failed programming external connectivity on endpoint nextcloud-aio-domaincheck (eb849445ed5b5b2531cfd (truncated...)
File: /var/www/docker-aio/php/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
Line: 113
Trace

#0 /var/www/docker-aio/php/vendor/guzzlehttp/guzzle/src/Middleware.php(69): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response), NULL, Array, NULL)
#1 /var/www/docker-aio/php/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 /var/www/docker-aio/php/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), NULL)
#3 /var/www/docker-aio/php/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 /var/www/docker-aio/php/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\TaskQueue->run(true)
#5 /var/www/docker-aio/php/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#6 /var/www/docker-aio/php/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#7 /var/www/docker-aio/php/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#8 /var/www/docker-aio/php/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#9 /var/www/docker-aio/php/vendor/guzzlehttp/guzzle/src/Client.php(187): GuzzleHttp\Promise\Promise->wait()
#10 /var/www/docker-aio/php/vendor/guzzlehttp/guzzle/src/ClientTrait.php(95): GuzzleHttp\Client->request('POST', 'http://localhos...', Array)
#11 /var/www/docker-aio/php/src/Docker/DockerActionManager.php(182): GuzzleHttp\Client->post('http://localhos...')
#12 /var/www/docker-aio/php/src/Controller/DockerController.php(48): AIO\Docker\DockerActionManager->StartContainer(Object(AIO\Container\Container))
#13 /var/www/docker-aio/php/src/Controller/DockerController.php(246): AIO\Controller\DockerController->PerformRecursiveContainerStart('nextcloud-aio-d...')
#14 /var/www/docker-aio/php/public/index.php(78): AIO\Controller\DockerController->StartDomaincheckContainer()
#15 /var/www/docker-aio/php/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(38): Closure->{closure}(Object(GuzzleHttp\Psr7\ServerRequest), Object(GuzzleHttp\Psr7\Response), Array)
#16 /var/www/docker-aio/php/vendor/slim/slim/Slim/Routing/Route.php(358): Slim\Handlers\Strategies\RequestResponse->__invoke(Object(Closure), Object(GuzzleHttp\Psr7\ServerRequest), Object(GuzzleHttp\Psr7\Response), Array)
#17 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\Routing\Route->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#18 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\MiddlewareDispatcher->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#19 /var/www/docker-aio/php/vendor/slim/slim/Slim/Routing/Route.php(315): Slim\MiddlewareDispatcher->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#20 /var/www/docker-aio/php/vendor/slim/slim/Slim/Routing/RouteRunner.php(68): Slim\Routing\Route->run(Object(GuzzleHttp\Psr7\ServerRequest))
#21 /var/www/docker-aio/php/vendor/slim/csrf/src/Guard.php(476): Slim\Routing\RouteRunner->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#22 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(168): Slim\Csrf\Guard->process(Object(GuzzleHttp\Psr7\ServerRequest), Object(Slim\Routing\RouteRunner))
#23 /var/www/docker-aio/php/vendor/slim/twig-view/src/TwigMiddleware.php(115): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#24 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Views\TwigMiddleware->process(Object(GuzzleHttp\Psr7\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#25 /var/www/docker-aio/php/src/Middleware/AuthMiddleware.php(38): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#26 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): AIO\Middleware\AuthMiddleware->__invoke(Object(GuzzleHttp\Psr7\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#27 /var/www/docker-aio/php/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(76): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#28 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\ErrorMiddleware->process(Object(GuzzleHttp\Psr7\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#29 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#30 /var/www/docker-aio/php/vendor/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#31 /var/www/docker-aio/php/vendor/slim/slim/Slim/App.php(183): Slim\App->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#32 /var/www/docker-aio/php/public/index.php(170): Slim\App->run()
#33 {main}

And I get this error accessing it directly at https://IPADDRESS:3902 or behind my NGINX reverse proxy giving it a domain name, a Letā€™s Encrypt SSL, and following the instructions at https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md

Anyone know what Iā€™m doing wrong?

You are using the wrong docker run command. See all-in-one/reverse-proxy.md at main Ā· nextcloud/all-in-one Ā· GitHub

Ok, I deleted the AIO container I had before and used the docker-compose file below, and I get the exact same error except the number after driver failed programming external connectivity on endpoint nextcloud-aio-domaincheck changed

I see in Portainer that this has created a nextcloud-aio-domaincheck container, but it stalls as a ā€œcreatedā€ container, with the only log in it saying No log line matching the ā€˜ā€™ filter

Searching the problem leads me to another person with the same problem, and the person helping him was you (you must be very helpful!) making sure port 443 is open, I used the same check tool linked there and my port 443 is open. Any ideas?

New docker-compose:

version: "3"

volumes:
  nextcloud_aio_mastercontainer:
    name: nextcloud_aio_mastercontainer

services:
  nextcloud:
    image: nextcloud/all-in-one:latest
    restart: always
    container_name: nextcloud-aio-mastercontainer
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - 8547:80 
      - 8548:8080
      - 8549:8443 
    environment:
      - APACHE_PORT=11000 
      - APACHE_IP_BINDING=0.0.0.0 
      - COLLABORA_SECCOMP_DISABLED=false
      - DOCKER_SOCKET_PATH=/var/run/docker.sock
      - DISABLE_BACKUP_SECTION=false
      - NEXTCLOUD_DATADIR=/home/administrator/next/data/
      - NEXTCLOUD_MOUNT=/home/administrator/next/
      - NEXTCLOUD_UPLOAD_LIMIT=5G
      - NEXTCLOUD_MAX_TIME=7200
      - NEXTCLOUD_MEMORY_LIMIT=512M
      - NEXTCLOUD_TRUSTED_CACERTS_DIR=/home/administrator/nginxpm/letsencrypt
      - NEXTCLOUD_STARTUP_APPS=deck twofactor_totp tasks calendar contacts
      - NEXTCLOUD_ADDITIONAL_APKS=imagemagick
      - NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick
      - NEXTCLOUD_ENABLE_DRI_DEVICE=true
      - TALK_PORT=3478
networks:
  nowork:
    driver: bridge
    ipam:
      config:
        - subnet: 172.35.0.0/16
          gateway: 172.35.0.1
          ip_range: 172.35.0.0/24
          aux_addresses:
            my-network-ipv4-address: 172.35.0.1
            network-ipv4-address: 172.35.0.2

Ok, I realize Docker was having issues with making networks, so I used docker image prune and changed the apache ip port binding to 0.0.0.0 and I got passed the driver failed programming external connectivity on endpoint nextcloud-aio-domaincheck error to this page:

image

I have the ports in my docker-compose as:

ports:
  - 8547:80 
  - 8548:8080
  - 8549:8443 

And the following setup in Nginx Proxy Manager:

but when I try to submit my domain that is pointed to in NPM, I get this error:

Domain does not point to this server or the reverse proxy is not configured correctly. See the mastercontainer logs for more details. (ā€˜sudo docker logs -f nextcloud-aio-mastercontainerā€™)

The docker log just gives me:

NOTICE: PHP message: The response of the connection attempt to "https://mydomain.com:443" was:
NOTICE: PHP message: Expected was: f09f11cfc39b853c544c691592833818fcd1e4f08b56ca81
NOTICE: PHP message: The error message was:

Port 443 is open, checked with https://www.yougetsignal.com/tools/open-ports/

Can you point nginx prox manager at port 11000 as youā€™vw chosen in apache_port?

Also youā€™ll need to use http in there.

If I point NPM to port 11000 do I need to change any of the portmapping in my docker-compose file? Currently:

ports:
  - 8547:80 
  - 8548:8080
  - 8549:8443 

As-is, if I try to access IPADDRESS:11000 I get this text string on http:

f09f11cfc39b853c544c691592833818fcd1e4f08b56ca81

And on https I get:

(Chrome) This site canā€™t provide a secure connection
(FF) Secure Connection Failed

An error occurred during a connection to IPADDRESS:11000. SSL received a record that exceeded the maximum permissible length.

Error code: SSL_ERROR_RX_RECORD_TOO_LONG

Without making any other changes in docker, chaning NPM to point my domain to port 11000 returns 502 Bad Gateway

Yes, pointing at port 11000 is correct. Also http must be used in npm.

Thank you so much for your continued helpā€¦Iā€™ve been trying to search for solutions for my problem instead of coming back here straight away, and every time I do, I find you are the person helping people.

It looks like I might be having a similar problem to this person "Domain does not point to this server or reverse proxy not configured correctly." - #36 by marcoh and it was you helping them out too. Thanks for being really cool.

If Iā€™m understanding you right, Iā€™ve changed to the following settings:
image

With my docker-compose having:

    environment:
      - APACHE_PORT=11000 
      - APACHE_IP_BINDING=0.0.0.0

I couldnā€™t change the ports section from - 8548:8080 to - 11000:8080 which is what I believe you were suggesting, I got an error that 11000 was already taken, presumably by the apache line, because if I just delete the port forwarding for 8080, the container deploys fine.

Then when I try to go to IP:11000 or MYDOMAIN.com:11000 I get a white page with only this:
f09f11cfc39b853c544c691592833818fcd1e4f08b56ca81

Yes, so It seems correctly configured then. :+1: Did you already enter the domain in the AIO interface?

I tried when I had port forwarding set - 8548:8080 but thatā€™s when it gave me the error: Domain does not point to this server or the reverse proxy is not configured correctly.

Then switching to the new setup with - APACHE_PORT=11000 and no separate port-forwarding for 8080 in the docker-compose, only gets me that error page, so I canā€™t get back to the AIO (either by IP or domain name), just that long string of text.

Ah I see. Indeed AIO and Nextcloud have separate web interfaces. So pointing at port 11000 with http is indeed correct for Nextcloud. For the AIO interface correct would be port 8548 with https in your case. I would recommend to not expose the AIO interface publicly if possible and open it via port 8548 without terminating things via the reverse proxy. Otherwise you will need to expose both.

Ok, Iā€™ve gone back to the settings at Docker AIO install fail - #4 by nothingcorporate

which gets me back into the AIO setup, but fails when I try to enter my domain:

The notes it makes below are to make sure 443 is open, Iā€™ve verified it is | then a note about dynamic IPs, mine is static, then a note about skipping domain verificationā€¦should I do that?

The AIO container and the container it creates for nextcloud-aio-domaincheck both show as healthy and running in portainer, here are the logs I get from nextcloud-aio-domaincheck (if thatā€™s of any help)

2023-03-06 23:01:37: (server.c.1588) server started (lighttpd/1.4.67),
2023-03-06 23:02:01: (connections.c.716) unexpected TLS ClientHello on clear port (My computerā€™s IP),
2023-03-06 23:02:02: (connections.c.716) unexpected TLS ClientHello on clear port (My computerā€™s IP)

As I said are these settings incorrect and insted the one with port 11000 and http correct. What exactly did you not unterstand in my former message?

Sorry for misunderstanding your last message, I got confused when you were saying Nextcloud and AIO have separate interfaces, it took me a minute to realize that the long string of text just meant I was at the wrong one.

So, I left the long string of text at :11000 and went to my AIO interface, input my domain and it worked this time!

Then I adjusted the TZ and clicked start containers and gave it 15 minutes to deploy.

Now AIO says:

I tried stopping then restarting/updating the containers, and Apache and Nextcloud still failed to launch.

Clicking on Stopped next to Apache results in:

# Slim Application Error

The application could not run because of the following error:

## Details

**Type:** GuzzleHttp\Exception\ClientException

**Code:** 404

**Message:** Client error: `GET http://localhost/v1.41/containers/nextcloud-aio-apache/logs?stdout=true&stderr=true` resulted in a `404 Not Found` response: {"message":"No such container: nextcloud-aio-apache"}

**File:** /var/www/docker-aio/php/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php

**Line:** 113

## Trace

#0 /var/www/docker-aio/php/vendor/guzzlehttp/guzzle/src/Middleware.php(69): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response), NULL, Array, NULL) #1 /var/www/docker-aio/php/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response)) #2 /var/www/docker-aio/php/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), NULL) #3 /var/www/docker-aio/php/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() #4 /var/www/docker-aio/php/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\TaskQueue->run(true) #5 /var/www/docker-aio/php/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn() #6 /var/www/docker-aio/php/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending() #7 /var/www/docker-aio/php/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList() #8 /var/www/docker-aio/php/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() #9 /var/www/docker-aio/php/vendor/guzzlehttp/guzzle/src/Client.php(187): GuzzleHttp\Promise\Promise->wait() #10 /var/www/docker-aio/php/vendor/guzzlehttp/guzzle/src/ClientTrait.php(44): GuzzleHttp\Client->request('GET', 'http://localhos...', Array) #11 /var/www/docker-aio/php/src/Docker/DockerActionManager.php(165): GuzzleHttp\Client->get('http://localhos...') #12 /var/www/docker-aio/php/src/Controller/DockerController.php(56): AIO\Docker\DockerActionManager->GetLogs('nextcloud-aio-a...') #13 /var/www/docker-aio/php/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(38): AIO\Controller\DockerController->GetLogs(Object(GuzzleHttp\Psr7\ServerRequest), Object(GuzzleHttp\Psr7\Response), Array) #14 /var/www/docker-aio/php/vendor/slim/slim/Slim/Routing/Route.php(358): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(GuzzleHttp\Psr7\ServerRequest), Object(GuzzleHttp\Psr7\Response), Array) #15 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\Routing\Route->handle(Object(GuzzleHttp\Psr7\ServerRequest)) #16 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\MiddlewareDispatcher->handle(Object(GuzzleHttp\Psr7\ServerRequest)) #17 /var/www/docker-aio/php/vendor/slim/slim/Slim/Routing/Route.php(315): Slim\MiddlewareDispatcher->handle(Object(GuzzleHttp\Psr7\ServerRequest)) #18 /var/www/docker-aio/php/vendor/slim/slim/Slim/Routing/RouteRunner.php(68): Slim\Routing\Route->run(Object(GuzzleHttp\Psr7\ServerRequest)) #19 /var/www/docker-aio/php/vendor/slim/csrf/src/Guard.php(476): Slim\Routing\RouteRunner->handle(Object(GuzzleHttp\Psr7\ServerRequest)) #20 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(168): Slim\Csrf\Guard->process(Object(GuzzleHttp\Psr7\ServerRequest), Object(Slim\Routing\RouteRunner)) #21 /var/www/docker-aio/php/vendor/slim/twig-view/src/TwigMiddleware.php(115): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest)) #22 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Views\TwigMiddleware->process(Object(GuzzleHttp\Psr7\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous)) #23 /var/www/docker-aio/php/src/Middleware/AuthMiddleware.php(38): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest)) #24 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): AIO\Middleware\AuthMiddleware->__invoke(Object(GuzzleHttp\Psr7\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous)) #25 /var/www/docker-aio/php/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(76): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest)) #26 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\ErrorMiddleware->process(Object(GuzzleHttp\Psr7\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous)) #27 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest)) #28 /var/www/docker-aio/php/vendor/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle(Object(GuzzleHttp\Psr7\ServerRequest)) #29 /var/www/docker-aio/php/vendor/slim/slim/Slim/App.php(183): Slim\App->handle(Object(GuzzleHttp\Psr7\ServerRequest)) #30 /var/www/docker-aio/php/public/index.php(170): Slim\App->run() #31 {main}

Clicking on Stopped next to Nextcloud takes me to https://DOMAIN/api/docker/logs?id=nextcloud-aio-nextcloud but no page loads there

I now have the following containers listed in portainer:

Trying to start the nextcloud-aio-nextcloud container gives me the error:

error gathering device information while adding custom device ā€œ/dev/driā€: no such file or directory

Any thoughts?

Please set NEXTCLOUD_ENABLE_DRI_DEVICE=false, restart the mastercontainer and start your containers from the aio interface again. It is mentioned that it will fail to start if no such device is present here: GitHub - nextcloud/all-in-one: The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.