Sorry to hear you’re facing problems
help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.
In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:
Or for longer, use three backticks above and below the code snippet:
Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can
Nextcloud version 17.0.2:
Operating system and version Widows 10:
Apache or nginx version ?:
PHP version ?:
The issue you are facing:
Unable to find (and hence) modify the
config.php in a Windows 10 Docker installation of Nextcloud.
Is this the first time you’ve seen this error? Y:
Steps to replicate it:
- Open CMD (in admin mode) and enter:
docker run -d -p 8080:80 nextcloud
docker run -t -d -p 9980:9980 -e "extra_params=--o:ssl.enable=false" collabora/code
- Open browser, and enter:
http://<my local ipv4-adress>:8080/settings
The output of your config.php file in
/path/to/nextcloud (make sure you remove any identifiable information!):
This relates back the the question, where is the path to nextcloud inside docker in Windows?
The output of your Apache/nginx/system log in
This relates back the the question, where is the /var/.. to nextcloud inside docker in Windows?
According to: https://stackoverflow.com/questions/19234831/where-are-docker-images-stored-on-the-host-machine and https://blog.jongallant.com/2017/11/ssh-into-docker-vm-windows/
You can’t directly access/browse the files within the docker images directly, but you can still access them with:
0. open cmd
docker run --privileged -it -v /var/run/docker.sock:/var/run/docker.sock jongallant/ubuntu-docker-client
docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v /:/host alpine /bin/sh
- Then you’re into the linux file system that is used by docker, and I presume you can then locate your nextcloud config.php with (assuming it is in
find . -name "config.php"
That results in the list of all config.php files within directory
/var/lib/. Then you should find the nextcloud one, I think you should use the long code you get when you enter:
docker run -d -p 8080:80 nextcloud
To identify the correct instance of the
config.php files, but I have not tested it yet.
You can display the contents of the
config.php file with cat config.php after browsing into the correct directory. However I do not yet know how to edit the file as nano and vim are not available through the cmd bash. Furthermore, the
config.php file consists of the php code that renders the interface through which one can set the configuration, instead of a storage of the actual configurations which I intended to modify. Therefore I would have to look further to identify the correct file to modify to satisfy the xy-problem.
Since Nano is not available in the ubuntu version downloaded in docker by the commands specified at 1, one can use the
cat command to modify files.
- Browse into the directory that contains the
- Display the content of the
config.php file by typing:
Copy that content.
6. Paste and edit the copied content in a windows editor, e.g. notepad++
5. Re-open cmd Delete the
- Re-create the file and enter its content by:
cat > config.php
- RMB in the command window to paste the content
ctrl+c to end entering lines to the file.
- That should be it, verify again with
nope. you modify the file inside the container. and hence will be astonished when you update your image and start a new container.
important to understand the difference between image and container!
normally you create a volume for all data you want to have persistent between updates of your image. that’s why you use
nextcloud (not a path in your hosts file system) you’ll find your nextcloud installation somewhere below
/var/lib/docker (if i remember well)
docker inspect nextcloud will tell you. or
docker volumes ls. if you want to have
c:\user\a-t-0\documents accessible inside your container it’s probably
-v c:\user\a-t-0\documents:/var/www/html (<- just an example. not a clever idea. )
so: use a
-v option on your windows system and
inspect your docker objects. (or google: “docker windows volumes location”.)