Where is config.php?

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

it’s in the config folder

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

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

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.

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

or run something like

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


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

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

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 * */

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

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

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

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.

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

looks good to me. but i never used freebsd. :wink:

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.

but you need your own domain.

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

Can you use domain from duckdns.org for certbot?

seems so.


just try. you need to forward port 80/443 from internet to your nextcloud.

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

Obviously you are running nextcloud-snap. Have a look in the according wiki: https://github.com/nextcloud/nextcloud-snap/wiki/Finding-files

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.