Nextcloud all-in-one OCI image

Hi everyone, just wondering if anyone has had any luck with the NextCloud(All-in-one) OCI image working in their setup…

Official Image

I am trying to get it to run but it gives me the following error.

root@odroid-h3:/home/mihai# incus start nextcloud --console
To detach from the console, press: <ctrl>+a q
Error: Failed running forkconsole: "container is not running: \"nextcloud\""
                                                                            Error: stat /proc/-1: no such file or directory

I would like to help figure this out for others as well, but I’m not really sure where to start.

It looks like you might be using LXD.

God how embarrassing , I feel like im going to be kicked off the forum for admitting this. But I keep misspelling incus and im super quick typing lxc because I just got used to it , So I just made it as an alias :joy:

1 Like

Ok im forcing myself to use incus from now on… I know the history with canonical and its too messed up for me to even do that, im sorry.

1 Like

I reproduced the error on one of my systems.

I don’t understand what the error message means though.

First I launch the container.

incus launch docker:nextcloud/all-in-one nextcloud

The container fails to start.

I then try to connect via the console.

incus start nextcloud --console

I get the same error.

Error: stat /proc/-1: no such file or directory

I am working with up to date Zabbly builds of Incus 6.5, Linux, and ZFS. I am running on a Debian 12 x86 system.

same here

bummer, I kinda knew this was feeling too easy with nextcloud haha

I would think that the error message would be easier to figure out. I have never heard of that file before. It does not make sense to me that there would be a process with an ID of -1.

I think I am missing something here.

yeah ive been trying to figure out what that error message means.

according to Simon blog, it can happen at times and he is trying to figure it out himself as well.

1 Like

It looks like fork can return a -1. It is an error code.

It looks like something in the container is trying to fork a process and it failed. Then the container does not do proper error checking and continues. At some point it runs stat on the PID it has and this kills the container.

This looks like a more general problem. I suggest creating a new thread about it. Maybe other people can provide more examples.

@Mihai_G
I haven’t read through the whole thread but any container image/application including nextcloud-aio that depends on the docker API will NOT work with incus, not yet anyway.
The nc aio is an application of its own that uses the docker API to deploy and manage a nextcloud instance with all the other bells and whistles that one would normally have to configure manually.

So you’d have to fall back to manual configuration if you want to run nextcloud in OCI mode, and although there’s an incus-compose (an alternative to docker compose for incus) being developed by a community member there’s no telling if or when it will be ready/stable and if it will at all be merged into the main project.

Rant

Nextcloud-aio is an official automation tool for an extremely finicky and fragile peace of software, namely nextcloud itself. I’ve completely lost count of how many times nextcloud-aio completely borked a deployment. The aio project itself has relatively decent goals and processes in place but the nextcloud code base itself is a mess (and then some). This is NOT the kind of software you can update on a production system reliably let alone even thinking about the cardinal sin of automating the task.

1 Like

thank you so much for the explanation.

Right, you can actually see this with:

stgraber@castiana:~$ incus console --show-log nextcloud
Docker socket is not available. Cannot continue.
Please make sure to mount the docker socket into /var/run/docker.sock inside the container!
If you did this by purpose because you don't want the container to have access to the docker socket, see https://github.com/nextcloud/all-in-one/tree/main/manual-install.

Indeed not something that can/will work with Incus.
It’s also insanely unsafe to do something like that in the Docker world.

Anyone or anything with access to the Docker socket can trivially escalate to full root privileges on the host system. Exposing that kinda of access to a container defeats the whole purpose of containerization…

I guess you could run docker in incus, and “docker run” the container there. Then it would have its own private instance of dockerd to talk to.