Charm-managed configuration settings

The LocalSettings.php file provides basic configuration settings for MediaWiki. Though the MediaWiki charm allows for users to configure their own settings, some settings are managed by the charm itself to provide sensible defaults and to ensure proper operation and integration with other services.

Setting

Overridable

Notes

$wgAWSBucketName

Partially

This is only set when the s3-parameters relation is in use.

$wgAWSCredentials

Partially

This is only set when the s3-parameters relation is in use.

$wgAWSRegion

Partially

This is only set when the s3-parameters relation is in use.

$wgAllowSchemaUpdates

No

This is always set to false other than when the charm is performing a database update.

$wgAntivirus

Yes

Defaults to clamavd.

$wgAntivirusSetup[‘clamavd’]

Yes

Configuration for antivirus scans using clamdscan.

$wgArticlePath

Yes

$wgAuthenticationTokenVersion

No

Generated by the charm. It can be rotated with rotate-secrets.

$wgCacheDirectory

No

$wgDBname

No

This is based on the relation data from the database relation.

$wgDBservers

No

This is based on the relation data from the database relation.

$wgDebugLogFile

No

Controlled by mediawiki-debug-log.

$wgDebugLogGroups

No

Controlled by mediawiki-debug-log-groups.

$wgDiff3

No

$wgEnableUploads

Partially

When the s3-parameters relation is not in use, this setting is forced to be false to prevent uploads when S3-backed object storage is not available.

$wgEnableEmail

Partially

This is set to false when the smtp relation data is incomplete or malformed.

$wgFileBackends[‘s3’][‘endpoint’]

Partially

This is only set when the s3-parameters relation is in use.

$wgFileBackends[‘s3’][‘use_path_style_endpoint’]

Partially

This is sometimes set when the s3-parameters relation is in use.

$wgHTTPProxy

No

This is based on the model configuration key juju-http-proxy.

$wgImageMagickConvertCommand

No

$wgImagePreconnect

Yes

Defaults to true, since thumbnails are never hosted locally.

$wgInternalServer

No

$wgJobRunRate

No

Set to 0, disabling web request triggered job runs. Jobs are handled by an asynchronous job runner using Valkey.

$wgJobTypeConf[‘default’]

No

Configures the Valkey-backed job queue.

$wgLocalisationCacheConf[‘manualRecache’]

No

Set to true. The localisation cache is automatically rebuilt asynchronously when required.

$wgLogos

Yes

$wgMainCacheType

No

$wgObjectCaches[‘redis’]

No

Configures the cache using the required Valkey integration.

$wgOpenTelemetryConfig

No

Managed by the workload-tracing relation and tracing-sampling-probability.

$wgPasswordSender

Partially

This is set when the smtp relation includes a sender address.

$wgPluggableAuth_Config[‘OpenIDConnect’]

Partially

This is only set when the oauth relation is in use. The charm configures plugin, data.providerURL, data.clientID, data.clientSecret, data.scope, and data.proxy. User modifications are otherwise merged in where possible.

$wgPluggableAuth_Config[‘SimpleSAMLphp’]

Partially

This is only set when the saml relation is in use. The charm configures plugin and data.authSourceId. User modifications are otherwise merged in where possible.

$wgPygmentizePath

No

Set to the Pygments installation in the Shellbox sidecar container, which runs SyntaxHighlight’s commands.

$wgReadOnly

Partially

The charm sets this while performing a database update and while operator-requested maintenance mode is enabled.

$wgResourceBasePath

Yes

$wgScribuntoDefaultEngine

Yes

Defaults to luasandbox.

$wgScriptPath

Yes

$wgSecretKey

No

This is generated by the charm. Refer to the security overview for more information.

$wgServer

Yes

The default is based on the charm configuration key url-origin but it may still be overridden.

$wgSessionCacheType

No

$wgSessionSecret

No

This is generated by the charm. Refer to the security overview for more information.

$wgShellboxSecretKey

No

This is generated by the charm for each unit.

$wgShellboxUrls[‘syntaxhighlight’]

No

Points to the Shellbox sidecar container in the same pod. Other entries of $wgShellboxUrls may still be set.

$wgSMTP

Partially

This is only set when the smtp relation is in use.

$wgSimpleSAMLphp_InstallDir

No

$wgSitename

Yes

$wgStatsFormat

No

Set to dogstatsd while a metrics consumer is related, otherwise null.

$wgStatsPrefix

No

Always set to mediawiki. See native metrics and the StatsLib manual.

$wgStatsTarget

No

Set to udp://127.0.0.1:9125 while a metrics consumer is related, otherwise null.

$wgSVGConverter

Yes

Defaults to rsvg.

$wgUseImageMagick

Yes

Defaults to true.