# Where is the config.php file for Nextcloud?

**URL:** <https://community.ovhcloud.com/t/ou-se-trouve-le-fichier-config-php-de-nextcloud/53834>\
**Category:** Bare Metal et VPS\
**Tags:** hébergement-web\
**Created:** [September 3, 2026, 7:31am UTC](https://community.ovhcloud.com/t/ou-se-trouve-le-fichier-config-php-de-nextcloud/53834 "2026-09-03T07:31:50Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanielG34](https://community.ovhcloud.com/letter_avatar/danielg34/32/6_22734026db12803ebb3e059622ac3534.png) [@DanielG34](https://community.ovhcloud.com/u/DanielG34)\
**Post date:** [September 3, 2026, 7:31am UTC](https://community.ovhcloud.com/t/ou-se-trouve-le-fichier-config-php-de-nextcloud/53834/1 "2026-09-03T07:31:50Z")

</div>

I would like to modify the config.php file to reset the trusted\_domains variable.

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![sturpin](https://community.ovhcloud.com/user_avatar/community.ovhcloud.com/sturpin/32/30025_2.png) [@sturpin](https://community.ovhcloud.com/u/sturpin)\
**Post date:** [September 3, 2026, 7:40am UTC](https://community.ovhcloud.com/t/ou-se-trouve-le-fichier-config-php-de-nextcloud/53834/2 "2026-09-03T07:40:15Z")

</div>

Hi @DanielG34

The **config.php** file is located inside the installation folder of your application, usually at a path like `/path/to/nextcloud/config/config.php`, although the exact location may vary depending on your setup.

Inside the file, look for the **trusted\_domains** section.

Let us know, cheers.  
Sergio Turpín

---

<div class="post-metadata">

**Author:** ![DanielG34](https://community.ovhcloud.com/letter_avatar/danielg34/32/6_22734026db12803ebb3e059622ac3534.png) [@DanielG34](https://community.ovhcloud.com/u/DanielG34)\
**Post date:** [September 4, 2026, 2:48am UTC](https://community.ovhcloud.com/t/ou-se-trouve-le-fichier-config-php-de-nextcloud/53834/3 "2026-09-04T02:48:22Z")

</div>

hello,

I can't find it

I installed Nextcloud with Docker (I'm new to Linux)

thanks

---

<div class="post-metadata">

**Author:** ![sturpin](https://community.ovhcloud.com/user_avatar/community.ovhcloud.com/sturpin/32/30025_2.png) [@sturpin](https://community.ovhcloud.com/u/sturpin)\
**Post date:** [September 4, 2026, 6:51am UTC](https://community.ovhcloud.com/t/ou-se-trouve-le-fichier-config-php-de-nextcloud/53834/4 "2026-09-04T06:51:53Z")

</div>

Good morning @DanielG34

It’s normal that you can’t find the file, because in a Docker installation the **config.php** file resides inside the container, not directly on your host’s filesystem.

The simplest and most direct option for you is to edit the file inside the container:

1. First we need to know the name of the Nextcloud container; you can find it by running `docker ps`.
2. Then, to open the **config.php** file you can do it by executing this command:  
`docker exec -it nombre-de-tu-app nano /var/www/html/config/config.php`
3. Once inside, look for the **'trusted\_domains'** array and add your domain or IP.
4. Save the file and then restart the container. To restart it you can run `docker restart nombre-de-tu-app`.

If you will be modifying your **config.php** frequently, it’s more convenient to map the file to your host, but for now the above should work as explained.

Kind regards,  
Sergio Turpín

---

<div class="post-metadata">

**Author:** ![DanielG34](https://community.ovhcloud.com/letter_avatar/danielg34/32/6_22734026db12803ebb3e059622ac3534.png) [@DanielG34](https://community.ovhcloud.com/u/DanielG34)\
**Post date:** [September 14, 2026, 2:11pm UTC](https://community.ovhcloud.com/t/ou-se-trouve-le-fichier-config-php-de-nextcloud/53834/5 "2026-09-14T14:11:39Z")

</div>

Hello

I ran the command  
ubuntu@vps-a71e1ee4:~$ docker ps -a  
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES  
f9c599362f57 nextcloud "/entrypoint.sh apac…" 2 weeks ago Up About an hour 0.0.0.0:8080-\>80/tcp, [::]:8080-\>80/tcp nextcloud-app-1  
9ab1e8e60e71 mariadb:11 "docker-entrypoint.s…" 2 weeks ago Up About an hour 3306/tcp nextcloud-db-1

What is the container name, please?

---

<div class="post-metadata">

**Author:** ![DanielG34](https://community.ovhcloud.com/letter_avatar/danielg34/32/6_22734026db12803ebb3e059622ac3534.png) [@DanielG34](https://community.ovhcloud.com/u/DanielG34)\
**Post date:** [September 14, 2026, 2:19pm UTC](https://community.ovhcloud.com/t/ou-se-trouve-le-fichier-config-php-de-nextcloud/53834/6 "2026-09-14T14:19:02Z")

</div>

I ran the command and got an error

```bash
docker exec -it nextcloud-app-1 nano /var/www/html/config/config.php
OCI runtime exec failed: exec failed: unable to start container process: exec: "nano": executable file not found in $PATH
ubuntu@vps-a71e1ee4:~$

```

---

<div class="post-metadata">

**Author:** ![sturpin](https://community.ovhcloud.com/user_avatar/community.ovhcloud.com/sturpin/32/30025_2.png) [@sturpin](https://community.ovhcloud.com/u/sturpin)\
**Post date:** [September 14, 2026, 3:35pm UTC](https://community.ovhcloud.com/t/ou-se-trouve-le-fichier-config-php-de-nextcloud/53834/7 "2026-09-14T15:35:58Z")

</div>

Hi @DanielG34

Yes, that error is because the container doesn’t have the `nano` editor installed.

Try this command:

`docker exec -it nextcloud-app-1 vi /var/www/html/config/config.php`

Let me know, cheers.  
Sergio Turpín

---

<div class="post-metadata">

**Author:** ![DanielG34](https://community.ovhcloud.com/letter_avatar/danielg34/32/6_22734026db12803ebb3e059622ac3534.png) [@DanielG34](https://community.ovhcloud.com/u/DanielG34)\
**Post date:** [September 14, 2026, 3:52pm UTC](https://community.ovhcloud.com/t/ou-se-trouve-le-fichier-config-php-de-nextcloud/53834/8 "2026-09-14T15:52:36Z")

</div>

it's the same with vi

ubuntu@vps-a71e1ee4:~$ docker exec -it nextcloud-app-1 vi /var/www/html/config/config.php  
OCI runtime exec failed: exec failed: unable to start container process: exec: "vi": executable file not found in $PATH  
ubuntu@vps-a71e1ee4:~$

---

<div class="post-metadata">

**Author:** ![DanielG34](https://community.ovhcloud.com/letter_avatar/danielg34/32/6_22734026db12803ebb3e059622ac3534.png) [@DanielG34](https://community.ovhcloud.com/u/DanielG34)\
**Post date:** [September 14, 2026, 4:05pm UTC](https://community.ovhcloud.com/t/ou-se-trouve-le-fichier-config-php-de-nextcloud/53834/9 "2026-09-14T16:05:17Z")

</div>

I managed to install nano

---

<div class="post-metadata">

**Author:** ![DanielG34](https://community.ovhcloud.com/letter_avatar/danielg34/32/6_22734026db12803ebb3e059622ac3534.png) [@DanielG34](https://community.ovhcloud.com/u/DanielG34)\
**Post date:** [September 14, 2026, 4:10pm UTC](https://community.ovhcloud.com/t/ou-se-trouve-le-fichier-config-php-de-nextcloud/53834/10 "2026-09-14T16:10:15Z")

</div>

I managed to modify the config file to add the domain name

Thank you for your help

---

<div class="post-metadata">

**Author:** ![system](https://community.ovhcloud.com/user_avatar/community.ovhcloud.com/system/32/5_2.png) [@system](https://community.ovhcloud.com/u/system)\
**Post date:** [September 16, 2026, 4:10pm UTC](https://community.ovhcloud.com/t/ou-se-trouve-le-fichier-config-php-de-nextcloud/53834/11 "2026-09-16T16:10:50Z")

</div>

Ce sujet a été automatiquement fermé après 2 jours. Aucune réponse n'est permise dorénavant.
