-
-
Notifications
You must be signed in to change notification settings - Fork 216
Configure config.php
Some Nextcloud snap settings may need to be done directly in the config.php
configuration file. Whilst the default configurations are mostly fine, it may be necessary to fine tune Nextcloud snap.
Nextcloud configuration parameters
The configuration file can be edited manually. Take good care to preserve the syntax and special characters, as incorrect formatting or misplaced characters and spaces may render your Nextcloud unusable. So be sure to backup the original config.php
file before editing.
-
Backup
config.php
sudo cp /var/snap/nextcloud/current/nextcloud/config/config.php config.php.bak
-
Edit
config.php
sudo nano /var/snap/nextcloud/current/nextcloud/config/config.php
View trusted domains (iterating values 0, 1, 2...):
sudo nextcloud.occ config:system:get trusted_domains 0
Set trusted domains (iterating values 0, 1, 2...):
sudo nextcloud.occ config:system:set trusted_domains 0 --value=cloud.mydomain.xyz
Adding multiple trusted domains manually in config.php
:
edit config.php
and add/edit section
sudo nano /var/snap/nextcloud/current/nextcloud/config/config.php
'trusted_domains' =>
array (
0 => 'cloud.mydomain.xyz',
1 => 'another.mydomain.xyz',
2 => 'localhost',
3 => 'nextcloud.local',
),
Adding trusted proxies manually in config.php
:
edit config.php
and add/edit section
sudo nano /var/snap/nextcloud/current/nextcloud/config/config.php
'trusted_proxies' =>
array (
0 => 'your.reverse.proxy.ip',
1 => 'your.other.proxy.ip',
),
or issue command on host (iterating values 0, 1, 2...):
sudo nextcloud.occ config:system:set trusted_poxies 0 --value="your.reverse.proxy.ip"
Nextcloud overwrite parameters such as overwriteprotocol
and overwritehost
are two configs that absolutely depend on your reverse proxy setup.
Be aware that some devices require an additional setting in config.php
if your Nextcloud snap instance is behind a reverse proxy.
For internet facing Nextcloud snap that handles encryption itself or a pass-through reverse proxy is present it shouldn't be necessary to set overwriteprotocol
and overwritehost
.
edit config.php
and add/edit section
'overwriteprotocol' => 'https',
'overwritehost' => 'mydomain.com',
or issue command:
sudo nextcloud.occ config:system:set overwriteprotocol --value="https"
sudo nextcloud.occ config:system:set overwritehost --value="my.domain.com"
Default documents, files and folders for new users may be placed in a "skeleton" directory. Thus new users will find documents files an folders in their Nextcloud upon first login.
Create a skeleton directory /var/snap/nextcloud/common/skeleton
sudo mkdir /var/snap/nextcloud/common/skeleton
Add your default files folders here. You may also add group folders here. See Group folders app
edit config.php
and add skeleton directory path
'skeletondirectory' => '/var/snap/nextcloud/common/skeleton',
Set default maintenance window time 01:00 (1 a.m.)
edit config.php
and add/edit line in config.php
'maintenance_window_start' => 1,
or issue command on host:
sudo nextcloud.occ config:system:set maintenance_window_start --value="1"
edit config.php
and add/edit line in config.php
'default_phone_region' => 'US',
or issue command on host:
sudo nextcloud.occ config:system:set default_phone_region --value="US"
edit config.php
and add/edit line in config.php
'default_language' => 'en',
or issue command on host:
sudo nextcloud.occ config:system:set default_language --value="en"
edit config.php
and add/edit line in config.php
'default_locale' => 'en_US',
or issue command on host:
sudo nextcloud.occ config:system:set default_locale --value="en_US"
edit config.php
and add/edit line in config.php
'share_folder' => '/SHARE_with_others',
or issue command on host:
sudo nextcloud.occ config:system:set share_folder --value="/SHARE_with_others"
edit config.php
and add/edit line in config.php
'share_folder' => '/SHARED_with_me',
or issue command on host:
sudo nextcloud.occ config:system:set share_folder --value="/SHARED_with_me"
edit config.php
and add/edit line in config.php
'simpleSignUpLink.shown' => false,
or issue command on host:
sudo nextcloud.occ config:system:set simpleSignUpLink.shown --value="false"
Nextcloud snap Wiki, use all information and scripts at own risk