Nextcloud
services.nextcloud.appstoreEnable
Allow the installation and updating of apps from the Nextcloud appstore. Enabled by default unless there are packages in . Set this to true to force enable the store even if is used. Set this to false to disable the installation of apps from the global appstore. App management is always enabled regardless of this setting.
Type: null or boolean
Default
null
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.autoUpdateApps.enable
Run a regular auto-update of all apps installed from the Nextcloud app store.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.autoUpdateApps.startAt
When to run the update. See systemd.services.<name>.startAt
.
Type: string or list of string
Default
"05:00:00"
Example
"Sun 14:00:00"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.caching.apcu
Whether to load the APCu module into PHP.
Type: boolean
Default
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.caching.memcached
Whether to load the Memcached module into PHP. You still need to enable Memcached in your config.php. See https://docs.nextcloud.com/server/14/admin_manual/configuration_server/caching_configuration.html
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.caching.redis
Whether to load the Redis module into PHP. You still need to enable Redis in your config.php. See https://docs.nextcloud.com/server/14/admin_manual/configuration_server/caching_configuration.html
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.cli.memoryLimit
The memory_limit
of PHP is equal to .
The value can be customized for nextcloud-cron.service
using this option.
Type: null or string
Default
null
Example
"1G"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.adminpassFile
The full path to a file that contains the admin's password. Must be
readable by user nextcloud
. The password is set only in the initial
setup of Nextcloud by the systemd service nextcloud-setup.service
.
Type: string
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.adminuser
Username for the admin account. The username is only set during the initial setup of Nextcloud! Since the username also acts as unique ID internally, it cannot be changed later!
Type: string
Default
"root"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.dbhost
Database host (+port) or socket path.
If is true and
is either pgsql
or mysql
,
defaults to the correct Unix socket instead.
Type: null or string
Default
"localhost"
Example
"localhost:5000"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.dbname
Database name.
Type: null or string
Default
"nextcloud"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.dbpassFile
The full path to a file that contains the database password.
Type: null or string
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.dbtableprefix
Table prefix in Nextcloud's database.
Note: since Nextcloud 20 it's not an option anymore to create a database schema with a custom table prefix. This option only exists for backwards compatibility with installations that were originally provisioned with Nextcloud <20.
Type: null or string
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.dbtype
Database type.
Type: one of "sqlite", "pgsql", "mysql"
Default
"sqlite"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.dbuser
Database user.
Type: null or string
Default
"nextcloud"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.objectstore.s3.autocreate
Create the objectstore if it does not exist.
Type: boolean
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.objectstore.s3.bucket
The name of the S3 bucket.
Type: string
Example
"nextcloud"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.objectstore.s3.enable
Whether to enable S3 object storage as primary storage.
This mounts a bucket on an Amazon S3 object storage or compatible implementation into the virtual filesystem.
Further details about this feature can be found in the
upstream documentation
.
Type: boolean
Default
false
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.objectstore.s3.hostname
Required for some non-Amazon implementations.
Type: null or string
Default
null
Example
"example.com"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.objectstore.s3.key
The access key for the S3 bucket.
Type: string
Example
"EJ39ITYZEUH5BGWDRUFY"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.objectstore.s3.port
Required for some non-Amazon implementations.
Type: null or 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.objectstore.s3.region
Required for some non-Amazon implementations.
Type: null or string
Default
null
Example
"REGION"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.objectstore.s3.secretFile
The full path to a file that contains the access secret. Must be
readable by user nextcloud
.
Type: string
Example
"/var/nextcloud-objectstore-s3-secret"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.objectstore.s3.sseCKeyFile
If provided this is the full path to a file that contains the key to enable server-side encryption with customer-provided keys (SSE-C).
The file must contain a random 32-byte key encoded as a base64 string, e.g. generated with the command
openssl rand 32 | base64
Must be readable by user nextcloud
.
Type: null or path
Default
null
Example
"/var/nextcloud-objectstore-s3-sse-c-key"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.objectstore.s3.usePathStyle
Required for some non-Amazon S3 implementations.
Ordinarily, requests will be made with
http://bucket.hostname.domain/
, but with path style
enabled requests are made with
http://hostname.domain/bucket
instead.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.config.objectstore.s3.useSsl
Use SSL for objectstore access.
Type: boolean
Default
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.configureRedis
Whether to configure Nextcloud to use the recommended Redis settings for small instances.
::: {.note}
The notify_push
app requires Redis to be configured. If this option is turned off, this must be configured manually.
:::
Type: boolean
Default
config.services.nextcloud.notify_push.enable
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.database.createLocally
Whether to create the database and database user locally.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.datadir
Nextcloud's data storage path. Will be by default. This folder will be populated with a config.php file and a data folder which contains the state of the instance (excluding the database).";
Type: string
Default
config.services.nextcloud.home
Example
"/mnt/nextcloud-file"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.enable
Whether to enable nextcloud.
Type: boolean
Default
false
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.enableImagemagick
Whether to enable the ImageMagick module for PHP.
This is used by the theming app and for generating previews of certain images (e.g. SVG and HEIF).
You may want to disable it for increased security. In that case, previews will still be available
for some images (e.g. JPEG and PNG).
See https://github.com/nextcloud/server/issues/13099
.
Type: boolean
Default
true
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.extraApps
Extra apps to install. Should be an attrSet of appid to packages generated by fetchNextcloudApp. The appid must be identical to the "id" value in the apps appinfo/info.xml. Using this will disable the appstore to prevent Nextcloud from updating these apps (see ).
Type: attribute set of package
Default
{ }
Example
{inherit (pkgs.nextcloud25Packages.apps) mail calendar contact;phonetrack = pkgs.fetchNextcloudApp {name = "phonetrack";sha256 = "0qf366vbahyl27p9mshfma1as4nvql6w75zy2zk5xwwbp343vsbc";url = "https://gitlab.com/eneiluj/phonetrack-oc/-/wikis/uploads/931aaaf8dca24bf31a7e169a83c17235/phonetrack-0.6.9.tar.gz";version = "0.6.9";};}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.extraAppsEnable
Automatically enable the apps in every time Nextcloud starts.
If set to false, apps need to be enabled in the Nextcloud web user interface or with nextcloud-occ app:enable
.
Type: boolean
Default
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.fastcgiTimeout
FastCGI timeout for database connection in seconds.
Type: signed integer
Default
120
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.home
Storage path of nextcloud.
Type: string
Default
"/var/lib/nextcloud"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.hostName
FQDN for the nextcloud instance.
Type: string
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.https
Use HTTPS for generated links.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.maxUploadSize
The upload limit for files. This changes the relevant options in php.ini and nginx if enabled.
Type: string
Default
"512M"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.nginx.hstsMaxAge
Value for the max-age
directive of the HTTP
Strict-Transport-Security
header.
See section 6.1.1 of IETF RFC 6797 for detailed information on this directive and header.
Type: positive integer, meaning >0
Default
15552000
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.nginx.recommendedHttpHeaders
Enable additional recommended HTTP response headers
Type: boolean
Default
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.notify_push.bendDomainToLocalhost
Whether to add an entry to /etc/hosts
for the configured nextcloud domain to point to localhost
and add localhost
to nextcloud's trusted_proxies
config option.
This is useful when nextcloud's domain is not a static IP address and when the reverse proxy cannot be bypassed because the backend connection is done via unix socket.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud-notify_push.nix
services.nextcloud.notify_push.dbhost
Database host (+port) or socket path.
If is true and
is either pgsql
or mysql
,
defaults to the correct Unix socket instead.
Type: null or string
Default
"config.services.nextcloud.config.dbhost"
Example
"localhost:5000"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud-notify_push.nix
services.nextcloud.notify_push.dbname
Database name.
Type: null or string
Default
"config.services.nextcloud.config.dbname"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud-notify_push.nix
services.nextcloud.notify_push.dbpassFile
The full path to a file that contains the database password.
Type: null or string
Default
"config.services.nextcloud.config.dbpassFile"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud-notify_push.nix
services.nextcloud.notify_push.dbtableprefix
Table prefix in Nextcloud's database.
Note: since Nextcloud 20 it's not an option anymore to create a database schema with a custom table prefix. This option only exists for backwards compatibility with installations that were originally provisioned with Nextcloud <20.
Type: null or string
Default
"config.services.nextcloud.config.dbtableprefix"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud-notify_push.nix
services.nextcloud.notify_push.dbtype
Database type.
Type: one of "sqlite", "pgsql", "mysql"
Default
"config.services.nextcloud.config.dbtype"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud-notify_push.nix
services.nextcloud.notify_push.dbuser
Database user.
Type: null or string
Default
"config.services.nextcloud.config.dbuser"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud-notify_push.nix
services.nextcloud.notify_push.enable
Whether to enable Notify push.
Type: boolean
Default
false
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud-notify_push.nix
services.nextcloud.notify_push.logLevel
Log level
Type: one of "error", "warn", "info", "debug", "trace"
Default
"error"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud-notify_push.nix
services.nextcloud.notify_push.package
Which package to use for notify_push
Type: package
Default
pkgs.nextcloud-notify_push
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud-notify_push.nix
services.nextcloud.notify_push.socketPath
Socket path to use for notify_push
Type: string
Default
"/run/nextcloud-notify_push/sock"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud-notify_push.nix
services.nextcloud.occ
The nextcloud-occ program preconfigured to target this Nextcloud instance.
Type: package
Default
generated script
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.package
Which package to use for the Nextcloud instance.
Type: package
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.phpExtraExtensions
Additional PHP extensions to use for Nextcloud. By default, only extensions necessary for a vanilla Nextcloud installation are enabled, but you may choose from the list of available extensions and add further ones. This is sometimes necessary to be able to install a certain Nextcloud app that has additional requirements.
Type: function that evaluates to a(n) list of package
Default
all: []
Example
all: [ all.pdlib all.bz2 ]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.phpOptions
Options for PHP's php.ini file for nextcloud.
Please note that this option is additive on purpose while the attribute values inside the default are option defaults: that means that
{
services.nextcloud.phpOptions."opcache.interned_strings_buffer" = "23";
}
will override the php.ini
option opcache.interned_strings_buffer
without
discarding the rest of the defaults.
Overriding all of phpOptions
(including upload_max_filesize
, post_max_size
and memory_limit
which all point to
by default) can be done like this:
{
services.nextcloud.phpOptions = lib.mkForce {
/* ... */
};
}
Type: attribute set of (string or signed integer)
Default
{catch_workers_output = "yes";display_errors = "stderr";error_reporting = "E_ALL & ~E_DEPRECATED & ~E_STRICT";expose_php = "Off";"opcache.fast_shutdown" = "1";"opcache.interned_strings_buffer" = "8";"opcache.max_accelerated_files" = "10000";"opcache.memory_consumption" = "128";"opcache.revalidate_freq" = "1";"openssl.cafile" = "/etc/ssl/certs/ca-certificates.crt";output_buffering = "0";short_open_tag = "Off";}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.phpPackage
The php package to use.
Type: package
Default
pkgs.php
Example
php82
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.poolConfig
Options for Nextcloud's PHP pool. See the documentation on php-fpm.conf
for details on configuration directives.
Type: null or strings concatenated with "\n"
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.poolSettings
Options for nextcloud's PHP pool. See the documentation on php-fpm.conf
for details on configuration directives.
Type: attribute set of (string or signed integer or boolean)
Default
{pm = "dynamic";"pm.max_children" = "32";"pm.max_requests" = "500";"pm.max_spare_servers" = "4";"pm.min_spare_servers" = "2";"pm.start_servers" = "2";}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.secretFile
Secret options which will be appended to Nextcloud's config.php file (written as JSON, in the same
form as the option), for example
{"redis":{"password":"secret"}}
.
Type: null or string
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.settings
Extra options which should be appended to Nextcloud's config.php file.
Type: JSON value
Default
{ }
Example
{redis = {host = "/run/redis/redis.sock";port = 0;dbindex = 0;password = "secret";timeout = 1.5;};}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.settings."profile.enabled"
Makes user-profiles globally available under nextcloud.tld/u/user.name
.
Even though it's enabled by default in Nextcloud, it must be explicitly enabled
here because it has the side-effect that personal information is even accessible to
unauthenticated users by default.
By default, the following properties are set to “Show to everyone”
if this flag is enabled:
- About
- Full name
- Headline
- Organisation
- Profile picture
- Role
- Twitter
- Website
Only has an effect in Nextcloud 23 and later.
Type: boolean
Default
false
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.settings.default_phone_region
An ISO 3166-1 country code which replaces automatic phone-number detection without a country code.
As an example, with DE
set as the default phone region,
the +49
prefix can be omitted for phone numbers.
Type: string
Default
""
Example
"DE"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.settings.log_type
Logging backend to use. systemd requires the php-systemd package to be added to services.nextcloud.phpExtraExtensions. See the nextcloud documentation for details.
Type: one of "errorlog", "file", "syslog", "systemd"
Default
"syslog"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.settings.loglevel
Log level value between 0 (DEBUG) and 4 (FATAL).
-
0 (debug): Log all activity.
-
1 (info): Log activity such as user logins and file activities, plus warnings, errors, and fatal errors.
-
2 (warn): Log successful operations, as well as warnings of potential problems, errors and fatal errors.
-
3 (error): Log failed operations and fatal errors.
-
4 (fatal): Log only fatal errors that cause the server to stop.
Type: integer between 0 and 4 (both inclusive)
Default
2
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.settings.overwriteprotocol
Force Nextcloud to always use HTTP or HTTPS i.e. for link generation.
Nextcloud uses the currently used protocol by default, but when
behind a reverse-proxy, it may use http
for everything although
Nextcloud may be served via HTTPS.
Type: one of "", "http", "https"
Default
""
Example
"https"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.settings.skeletondirectory
The directory where the skeleton files are located. These files will be copied to the data directory of new users. Leave empty to not copy any skeleton files.
Type: string
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.settings.trusted_domains
Trusted domains, from which the nextcloud installation will be
accessible. You don't need to add
services.nextcloud.hostname
here.
Type: list of string
Default
[ ]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.settings.trusted_proxies
Trusted proxies, to provide if the nextcloud installation is being proxied to secure against e.g. spoofing.
Type: list of string
Default
[ ]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
services.nextcloud.webfinger
Enable this option if you plan on using the webfinger plugin. The appropriate nginx rewrite rules will be added to your configuration.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix