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.
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.
I thank you much time, you saved me. @mritzmann@ernolf
I didn’t know that I could find it in the DebianServer.
I am very new with Nextcloud. And the AIO installation was easy.
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.
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.
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.