Where can I find the nextcloud config.php

In which docker container is the “/ver/www/nextcloud/config/config.php” in a portainer/docker environment?

I would like to edit my menu bar and the account menu entries. But I don’t know in which of the ongoing containers I have to look and find it.

im using Nextcloud 30 AIO on a debian server with portainer.

1 Like

How to edit Nextclouds config.php file with a texteditor?

You can edit Nextclouds config.php file directly from the host with your favorite text editor. E.g. like this: sudo docker run -it --rm --volume nextcloud_aio_nextcloud:/var/www/html:rw alpine sh -c "apk add --no-cache nano && nano /var/www/html/config/config.php". Make sure to not break the file though which might corrupt your Nextcloud instance otherwise. In best case, create a backup using the built-in backup solution before editing the file.

Source: https://github.com/nextcloud/all-in-one?tab=readme-ov-file#how-to-edit-nextclouds-configphp-file-with-a-texteditor

The name of the container may vary depending on the setup, but I can’t say without knowing your system. Maybe it helps if you post the output of ‘docker ps’ here.

3 Likes

In your AIO host you should look here:

/var/lib/docker/volumes/nextcloud_aio_nextcloud/_data/config/

h.t.h.


Much and good luck,
ernolf

1 Like

I thank you much time, you saved me.
@mritzmann @ernolf
I didn’t know that I could find it in the DebianServer.
:100::heavy_heart_exclamation: I am very new with Nextcloud. And the AIO installation was easy.

1 Like

Then you might want to familiarize yourself with the concept of Docker volumes :slight_smile:

Yes, I really thought that because everything in container is I can do that in a docker container. But it is all the more beautiful when it simply goes over the command line on the server itself.

Just one point as addendum:

I would highly discourage to do things in /var/lib/docker directly. This is owned by the docker daemon and it might work or break stuff. This depends potentially on your config of docker and thus on the defaults of your server’s distribution.

There are other options to achieve what you need. There is docker cp, docker run, docker exec, possible remounting of the file, and I guess a thousand options more.

So, this depends a bit on your goal and also in your experience. Side remark: I am more into development and not experienced about the AIO images. So this is a rather generic advice for use with docker than Nextcloud specific.

Chris

3 Likes

I wonder @sunny did you even read this? This is from the official documentation and I wonder why this was not marked as the answer since this is indeed the correct way to do it.

3 Likes

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.