# Where is config.php?

**URL:** <https://help.nextcloud.com/t/where-is-config-php/54100>\
**Category:** ℹ️ Support\
**Tags:** freebsd\
**Created:** [May 28, 2019, 9:43pm UTC](https://help.nextcloud.com/t/where-is-config-php/54100 "2019-05-28T21:43:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![nepsydude](https://help.nextcloud.com/user_avatar/help.nextcloud.com/nepsydude/32/15586_2.png) [@nepsydude](https://help.nextcloud.com/u/nepsydude)\
**Post date:** [May 28, 2019, 9:43pm UTC](https://help.nextcloud.com/t/where-is-config-php/54100/1 "2019-05-28T21:43:46Z")

</div>

Hi Guys,  
As i am setting up server in FreeBSD , i installed nextcloud, (downloaded and unzipped) changed all the needed configuration except i do not find the config.php file under config folder in nextcloud. Without which i think i cannot get access to the nextcloud server.

i installed it in apache24 and mysql56 and all needed php71 modules are installed.

Can anybody shine me some light? Why does nextcloud doesn’t install config.php file?

This worked once on my Virtual Manager but when i installed in computer it does not show up.

Thanks in advance !!

Regards,  
Prabesh

---

<div class="post-metadata">

**Author:** ![Sanook](https://help.nextcloud.com/user_avatar/help.nextcloud.com/sanook/32/13847_2.png) [@Sanook](https://help.nextcloud.com/u/Sanook)\
**Post date:** [May 29, 2019, 12:03am UTC](https://help.nextcloud.com/t/where-is-config-php/54100/2 "2019-05-29T00:03:00Z")

</div>

it’s in the `config` folder

---

<div class="post-metadata">

**Author:** ![nepsydude](https://help.nextcloud.com/user_avatar/help.nextcloud.com/nepsydude/32/15586_2.png) [@nepsydude](https://help.nextcloud.com/u/nepsydude)\
**Post date:** [May 29, 2019, 4:12am UTC](https://help.nextcloud.com/t/where-is-config-php/54100/3 "2019-05-29T04:12:57Z")

</div>

Somehow it isn’t there. I find only htaccess and sample config file, config.php is missing.

---

<div class="post-metadata">

**Author:** ![Reiner\_Nippes](https://help.nextcloud.com/user_avatar/help.nextcloud.com/reiner_nippes/32/9479_2.png) [@Reiner\_Nippes](https://help.nextcloud.com/u/Reiner_Nippes)\
**Post date:** [May 29, 2019, 6:30am UTC](https://help.nextcloud.com/t/where-is-config-php/54100/4 "2019-05-29T06:30:09Z")

</div>

It is created during initial setup. Did you run this? (web gui or occ maintenance:install)

---

<div class="post-metadata">

**Author:** ![nepsydude](https://help.nextcloud.com/user_avatar/help.nextcloud.com/nepsydude/32/15586_2.png) [@nepsydude](https://help.nextcloud.com/u/nepsydude)\
**Post date:** [May 29, 2019, 6:48am UTC](https://help.nextcloud.com/t/where-is-config-php/54100/5 "2019-05-29T06:48:55Z")

</div>

yes, i was also sure that it should be installed during setup , but it is not to be found there where it should be. I am not using GUI. As i didn’t find it i uninstalled and installed it again that too different versions of it (versions 10 to 16), hoping i will get the config.php but it is not to be found.

---

<div class="post-metadata">

**Author:** ![Reiner\_Nippes](https://help.nextcloud.com/user_avatar/help.nextcloud.com/reiner_nippes/32/9479_2.png) [@Reiner\_Nippes](https://help.nextcloud.com/u/Reiner_Nippes)\
**Post date:** [May 29, 2019, 7:29am UTC](https://help.nextcloud.com/t/where-is-config-php/54100/6 "2019-05-29T07:29:21Z")

</div>

> [@nepsydude](#):
>
> I am not using GUI

just to be sure. because i don’t know what you call “setup”.  
you have to browse to your nextcloud server to finish setup

[https://docs.nextcloud.com/server/16/admin\_manual/installation/installation\_wizard.html](https://docs.nextcloud.com/server/16/admin_manual/installation/installation_wizard.html)

or run something like

```auto
su - www-data -s /bin/bash -c 'php /var/www/nextcloud/occ maintenance:install \
--database "mysql" --database-name "nextcloud" --database-user "nextcloud" \
--database-pass "nextcloud" --admin-user "YourNextcloudAdmin" --admin-pass \
"YourNextcloudAdminPasssword" --data-dir "/var/nc_data"'

```

depends on your web server user (www-data), path to occ, database settings and so on.

[https://docs.nextcloud.com/server/16/admin\_manual/installation/command\_line\_installation.html](https://docs.nextcloud.com/server/16/admin_manual/installation/command_line_installation.html)

* * *

if you did and nextcloud is working and only config.php is missing try  
`find / -name config.php`

---

<div class="post-metadata">

**Author:** ![nepsydude](https://help.nextcloud.com/user_avatar/help.nextcloud.com/nepsydude/32/15586_2.png) [@nepsydude](https://help.nextcloud.com/u/nepsydude)\
**Post date:** [May 29, 2019, 8:22am UTC](https://help.nextcloud.com/t/where-is-config-php/54100/7 "2019-05-29T08:22:54Z")

</div>

Thankyou will try that, i installed using following.

# Go to the default apache data directory

cd /usr/local/www/apache24/data

# Download Nextcloud

wget [https://download.nextcloud.com/server/releases/nextcloud-10.0.0.zip](https://download.nextcloud.com/server/releases/nextcloud-10.0.0.zip)

# Unzip Nextcloud

unzip nextcloud-10.0.0.zip

# Make sure the www user owns this directory

chown -R www:www nextcloud

I installed GUI too but deleted later, the browser identifies the nextcloud but couldn’t execute because of the license file.

Here is the message when i try to do setup on my browser.

\<?php /\*\* \* \* Your webserver seems to be not configured to use PHP or PHP is not installed. \* Please contact your administrator or follow our documentation: \* https://docs.nextcloud.com/server/15/admin\_manual/installation/source\_installation.html \* \* @copyright Copyright (c) 2016, ownCloud, Inc. \* \* @author Georg Ehrke \<[oc.list@georgehrke.com](mailto:oc.list@georgehrke.com)\> \* @author Joas Schilling \<[coding@schilljs.com](mailto:coding@schilljs.com)\> \* @author JÃ¶rn Friedrich Dreyer \<[jfd@butonic.de](mailto:jfd@butonic.de)\> \* @author Lukas Reschke \<[lukas@statuscode.ch](mailto:lukas@statuscode.ch)\> \* @author Morris Jobke \<[hey@morrisjobke.de](mailto:hey@morrisjobke.de)\> \* @author Robin Appelman \<[robin@icewind.nl](mailto:robin@icewind.nl)\> \* @author Sergio BertolÃ­n \<[sbertolin@solidgear.es](mailto:sbertolin@solidgear.es)\> \* @author Thomas MÃ¼ller \<[thomas.mueller@tmit.eu](mailto:thomas.mueller@tmit.eu)\> \* @author Vincent Petry \<[pvince81@owncloud.com](mailto:pvince81@owncloud.com)\> \* \* @license AGPL-3.0 \* \* This code is free software: you can redistribute it and/or modify \* it under the terms of the GNU Affero General Public License, version 3, \* as published by the Free Software Foundation. \* \* This program is distributed in the hope that it will be useful, \* but WITHOUT ANY WARRANTY; without even the implied warranty of \* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \* GNU Affero General Public License for more details. \* \* You should have received a copy of the GNU Affero General Public License, version 3, \* along with this program. If not, see \* \*/

---

<div class="post-metadata">

**Author:** ![nepsydude](https://help.nextcloud.com/user_avatar/help.nextcloud.com/nepsydude/32/15586_2.png) [@nepsydude](https://help.nextcloud.com/u/nepsydude)\
**Post date:** [May 29, 2019, 8:23am UTC](https://help.nextcloud.com/t/where-is-config-php/54100/8 "2019-05-29T08:23:39Z")

</div>

and i have ainstalled all php and mysql-server packages.

---

<div class="post-metadata">

**Author:** ![Reiner\_Nippes](https://help.nextcloud.com/user_avatar/help.nextcloud.com/reiner_nippes/32/9479_2.png) [@Reiner\_Nippes](https://help.nextcloud.com/u/Reiner_Nippes)\
**Post date:** [May 29, 2019, 9:10am UTC](https://help.nextcloud.com/t/where-is-config-php/54100/9 "2019-05-29T09:10:25Z")

</div>

maybe you have to enable php in apache2. don’t know how this is done in freebsd.

[https://www.google.com/search?client=firefox-b-d&q=apache+2+enable+php](https://www.google.com/search?client=firefox-b-d&q=apache+2+enable+php)

and nextcloud 10 is rather old. actual version is 16. any reason why you want to use v10?

---

<div class="post-metadata">

**Author:** ![nepsydude](https://help.nextcloud.com/user_avatar/help.nextcloud.com/nepsydude/32/15586_2.png) [@nepsydude](https://help.nextcloud.com/u/nepsydude)\
**Post date:** [May 29, 2019, 9:16am UTC](https://help.nextcloud.com/t/where-is-config-php/54100/10 "2019-05-29T09:16:48Z")

</div>

Thankyou Rainer for your immediate response, i will try to figure it out. I am using next cloud 15 and 16 , 10 was only for reference.

will keep posted if that was a bug or a mistake.

---

<div class="post-metadata">

**Author:** ![Reiner\_Nippes](https://help.nextcloud.com/user_avatar/help.nextcloud.com/reiner_nippes/32/9479_2.png) [@Reiner\_Nippes](https://help.nextcloud.com/u/Reiner_Nippes)\
**Post date:** [May 29, 2019, 9:22am UTC](https://help.nextcloud.com/t/where-is-config-php/54100/11 "2019-05-29T09:22:38Z")

</div>

[https://www.tecmint.com/install-apache-mariadb-and-php-famp-stack-on-freebsd/](https://www.tecmint.com/install-apache-mariadb-and-php-famp-stack-on-freebsd/)

looks good to me. but i never used freebsd. 😉

---

<div class="post-metadata">

**Author:** ![nepsydude](https://help.nextcloud.com/user_avatar/help.nextcloud.com/nepsydude/32/15586_2.png) [@nepsydude](https://help.nextcloud.com/u/nepsydude)\
**Post date:** [May 29, 2019, 12:25pm UTC](https://help.nextcloud.com/t/where-is-config-php/54100/12 "2019-05-29T12:25:00Z")

</div>

Thankyou guys, sorry to disturb you. I forgot to install mod\_php71, and when accessing the setup, config.php is created. And now the nextcloud works in http.

Do you have any suggestions for certificates (https)? i want to make a private cloud of my own without any fees.

---

<div class="post-metadata">

**Author:** ![Reiner\_Nippes](https://help.nextcloud.com/user_avatar/help.nextcloud.com/reiner_nippes/32/9479_2.png) [@Reiner\_Nippes](https://help.nextcloud.com/u/Reiner_Nippes)\
**Post date:** [May 29, 2019, 12:31pm UTC](https://help.nextcloud.com/t/where-is-config-php/54100/13 "2019-05-29T12:31:13Z")

</div>

> **[Certbot - Freebsd Apache](https://certbot.eff.org/lets-encrypt/freebsd-apache)**
>
> Automatically enable HTTPS on your website with EFF's Certbot, deploying Let's Encrypt certificates.

but you need your own domain.

if you don’t have one: -\> google “selfsigned certificate openssl apache”

---

<div class="post-metadata">

**Author:** ![nepsydude](https://help.nextcloud.com/user_avatar/help.nextcloud.com/nepsydude/32/15586_2.png) [@nepsydude](https://help.nextcloud.com/u/nepsydude)\
**Post date:** [May 29, 2019, 12:36pm UTC](https://help.nextcloud.com/t/where-is-config-php/54100/14 "2019-05-29T12:36:41Z")

</div>

Can you use domain from [duckdns.org](http://duckdns.org) for certbot?

---

<div class="post-metadata">

**Author:** ![Reiner\_Nippes](https://help.nextcloud.com/user_avatar/help.nextcloud.com/reiner_nippes/32/9479_2.png) [@Reiner\_Nippes](https://help.nextcloud.com/u/Reiner_Nippes)\
**Post date:** [May 29, 2019, 1:17pm UTC](https://help.nextcloud.com/t/where-is-config-php/54100/15 "2019-05-29T13:17:49Z")

</div>

> [@nepsydude](#):
>
> [duckdns.org](http://duckdns.org) for certbot

seems so.  
[https://www.reddit.com/r/letsencrypt/comments/65ravi/duckdnsorg\_now\_supports\_txt\_records/](https://www.reddit.com/r/letsencrypt/comments/65ravi/duckdnsorg_now_supports_txt_records/)  
just try. you need to forward port 80/443 from internet to your nextcloud.

---

<div class="post-metadata">

**Author:** ![ottoman](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ottoman/32/17962_2.png) [@ottoman](https://help.nextcloud.com/u/ottoman)\
**Post date:** [December 26, 2019, 7:19pm UTC](https://help.nextcloud.com/t/where-is-config-php/54100/16 "2019-12-26T19:19:33Z")

</div>

What location/directory is the config.php located in? when I do a locate, I get several config.php files and locations. The documentation just says config/config.php, but does not provide any more on which directory specifically. I am new to server setup for linux. I mostly use Linux as a gui, but am trying to learn more linux command line. I have ubuntu server setup.

/snap/nextcloud/16402/htdocs/config/config.php  
var/snap/nextcloud/16402/nextcloud/config/config.php

---

<div class="post-metadata">

**Author:** ![Bernie\_O](https://help.nextcloud.com/user_avatar/help.nextcloud.com/bernie_o/32/40181_2.png) [@Bernie\_O](https://help.nextcloud.com/u/Bernie_O)\
**Post date:** [December 26, 2019, 8:36pm UTC](https://help.nextcloud.com/t/where-is-config-php/54100/17 "2019-12-26T20:36:43Z")

</div>

> [@ottoman](#):
>
> /snap/

Obviously you are running nextcloud-snap. Have a look in the according wiki: [Home · nextcloud-snap/nextcloud-snap Wiki · GitHub](https://github.com/nextcloud/nextcloud-snap/wiki/Finding-files)

---

<div class="post-metadata">

**Author:** ![ottoman](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ottoman/32/17962_2.png) [@ottoman](https://help.nextcloud.com/u/ottoman)\
**Post date:** [January 12, 2020, 4:50pm UTC](https://help.nextcloud.com/t/where-is-config-php/54100/18 "2020-01-12T16:50:46Z")

</div>

I took a look at that wiki and when going to `/var/snap/nextcloud/current/` the config file is completely empty.  
And when trying to access `/var/snap/nextcloud/common/nextcloud` it says permission denied.

---

<div class="post-metadata">

**Author:** ![ing.sulaiman](https://help.nextcloud.com/letter_avatar/ing.sulaiman/32/6_449c533f586939b6e5f246632a46421f.png) [@ing.sulaiman](https://help.nextcloud.com/u/ing.sulaiman)\
**Post date:** [June 19, 2023, 12:25pm UTC](https://help.nextcloud.com/t/where-is-config-php/54100/19 "2023-06-19T12:25:34Z")

</div>

Hello, I have the same problem, did you find a solution?

---

<div class="post-metadata">

**Author:** ![BlewSkrin](https://help.nextcloud.com/user_avatar/help.nextcloud.com/blewskrin/32/53720_2.png) [@BlewSkrin](https://help.nextcloud.com/u/BlewSkrin)\
**Post date:** [August 12, 2023, 4:30pm UTC](https://help.nextcloud.com/t/where-is-config-php/54100/20 "2023-08-12T16:30:23Z")

</div>

in my case, when I used an image for Raspberry Pi, I found config.php in:  
`/var/www/nextcloud/config/config.php`

[Next page](https://help.nextcloud.com/t/where-is-config-php/54100.md?page=2)
