2025-03-31 18:43:14 +02:00
---
sidebar_position: 100
---
2023-08-25 19:44:52 +02:00
# Config File
A config file can be provided as an alternative to the UI configuration.
2026-07-30 15:37:35 -04:00
:::note Interaction with the web UI
While the config file does not need to include all keys from the below example, specifying `IMMICH_CONFIG_FILE` will disable the ability to edit other properties from the Immich web UI.
:::
2023-08-25 19:44:52 +02:00
### Step 1 - Create a new config file
2026-07-30 15:37:35 -04:00
In JSON format, create a new config file (e.g. `immich-config.json` ) and put it in a location mounted in the container that can be accessed by Immich.
2026-02-18 14:52:28 +01:00
YAML-formatted config files are also supported.
2023-08-25 19:44:52 +02:00
The default configuration looks like this:
2024-04-29 10:23:13 -04:00
< details >
2026-07-30 15:37:35 -04:00
< summary > immich-config.json< / summary >
2024-04-29 10:23:13 -04:00
2023-08-25 19:44:52 +02:00
```json
{
2025-11-05 15:05:53 +01:00
"backup": {
"database": {
"cronExpression": "0 02 * * *",
"enabled": true,
"keepLastAmount": 14
}
},
2023-08-25 19:44:52 +02:00
"ffmpeg": {
2025-11-05 15:05:53 +01:00
"accel": "disabled",
2026-05-11 08:02:26 -04:00
"accelDecode": true,
2026-03-07 21:08:42 +03:00
"acceptedAudioCodecs": ["aac", "mp3", "opus"],
2025-11-05 15:05:53 +01:00
"acceptedContainers": ["mov", "ogg", "webm"],
"acceptedVideoCodecs": ["h264"],
"bframes": -1,
"cqMode": "auto",
2023-08-25 19:44:52 +02:00
"crf": 23,
2025-11-05 15:05:53 +01:00
"gopSize": 0,
"maxBitrate": "0",
"preferredHwDevice": "auto",
2023-08-25 19:44:52 +02:00
"preset": "ultrafast",
2025-11-05 15:05:53 +01:00
"refs": 0,
2023-08-25 19:44:52 +02:00
"targetAudioCodec": "aac",
"targetResolution": "720",
2025-11-05 15:05:53 +01:00
"targetVideoCodec": "h264",
2023-11-07 15:52:44 -06:00
"temporalAQ": false,
2025-11-05 15:05:53 +01:00
"threads": 0,
2023-08-25 19:44:52 +02:00
"tonemap": "hable",
2025-11-05 15:05:53 +01:00
"transcode": "required",
"twoPass": false
2023-08-25 19:44:52 +02:00
},
2025-11-05 15:05:53 +01:00
"image": {
"colorspace": "p3",
"extractEmbedded": false,
"fullsize": {
"enabled": false,
"format": "jpeg",
"quality": 80
},
"preview": {
"format": "jpeg",
"quality": 80,
"size": 1440
},
"thumbnail": {
"format": "webp",
"quality": 80,
"size": 250
2024-11-07 18:08:02 +00:00
}
},
2023-08-25 19:44:52 +02:00
"job": {
"backgroundTask": {
"concurrency": 5
},
2025-11-05 15:05:53 +01:00
"faceDetection": {
2023-08-25 19:44:52 +02:00
"concurrency": 2
},
2025-11-05 15:05:53 +01:00
"library": {
2023-08-25 19:44:52 +02:00
"concurrency": 5
},
2025-11-05 15:05:53 +01:00
"metadataExtraction": {
"concurrency": 5
2023-08-25 19:44:52 +02:00
},
2025-11-05 15:05:53 +01:00
"migration": {
2023-08-25 19:44:52 +02:00
"concurrency": 5
},
2025-11-05 15:05:53 +01:00
"notifications": {
2023-08-25 19:44:52 +02:00
"concurrency": 5
},
2025-11-05 15:05:53 +01:00
"ocr": {
"concurrency": 1
},
"search": {
2023-11-07 15:52:44 -06:00
"concurrency": 5
},
2025-11-05 15:05:53 +01:00
"sidecar": {
2023-11-07 15:52:44 -06:00
"concurrency": 5
},
2025-11-05 15:05:53 +01:00
"smartSearch": {
"concurrency": 2
},
2023-08-25 19:44:52 +02:00
"thumbnailGeneration": {
2024-09-30 00:11:42 -04:00
"concurrency": 3
2023-08-25 19:44:52 +02:00
},
"videoConversion": {
"concurrency": 1
2025-11-05 15:05:53 +01:00
}
},
"library": {
"scan": {
"cronExpression": "0 0 * * *",
"enabled": true
2024-09-30 00:11:42 -04:00
},
2025-11-05 15:05:53 +01:00
"watch": {
"enabled": false
2023-08-25 19:44:52 +02:00
}
},
2023-12-17 12:07:53 -06:00
"logging": {
"enabled": true,
"level": "log"
},
2023-09-12 02:22:42 -04:00
"machineLearning": {
2025-11-05 15:05:53 +01:00
"availabilityChecks": {
"enabled": true,
"interval": 30000,
"timeout": 2000
},
2023-09-12 02:22:42 -04:00
"clip": {
"enabled": true,
2023-11-07 15:52:44 -06:00
"modelName": "ViT-B-32__openai"
2023-09-12 02:22:42 -04:00
},
2024-05-16 13:08:37 -04:00
"duplicateDetection": {
2024-09-30 00:11:42 -04:00
"enabled": true,
"maxDistance": 0.01
2024-05-16 13:08:37 -04:00
},
2025-11-05 15:05:53 +01:00
"enabled": true,
2023-09-12 02:22:42 -04:00
"facialRecognition": {
"enabled": true,
2024-09-30 00:11:42 -04:00
"maxDistance": 0.5,
2025-11-05 15:05:53 +01:00
"minFaces": 3,
"minScore": 0.7,
"modelName": "buffalo_l"
},
"ocr": {
"enabled": true,
"maxResolution": 736,
"minDetectionScore": 0.5,
"minRecognitionScore": 0.8,
"modelName": "PP-OCRv5_mobile"
},
"urls": ["http://immich-machine-learning:3003"]
2023-09-12 02:22:42 -04:00
},
2023-11-07 15:52:44 -06:00
"map": {
2025-11-05 15:05:53 +01:00
"darkStyle": "https://tiles.immich.cloud/v1/style/dark.json",
2023-11-07 15:52:44 -06:00
"enabled": true,
2025-11-05 15:05:53 +01:00
"lightStyle": "https://tiles.immich.cloud/v1/style/light.json"
2023-11-07 15:52:44 -06:00
},
2024-09-30 00:11:42 -04:00
"metadata": {
"faces": {
"import": false
}
},
2025-11-05 15:05:53 +01:00
"newVersionCheck": {
"enabled": true
},
"nightlyTasks": {
"clusterNewFaces": true,
"databaseCleanup": true,
"generateMemories": true,
"missingThumbnails": true,
"startTime": "00:00",
"syncQuotaUsage": true
},
"notifications": {
"smtp": {
"enabled": false,
"from": "",
"replyTo": "",
"transport": {
"host": "",
"ignoreCert": false,
"password": "",
"port": 587,
"secure": false,
"username": ""
}
}
},
2023-08-25 19:44:52 +02:00
"oauth": {
2024-09-30 00:11:42 -04:00
"autoLaunch": false,
"autoRegister": true,
"buttonText": "Login with OAuth",
2023-08-25 19:44:52 +02:00
"clientId": "",
"clientSecret": "",
2025-06-13 22:57:29 +08:00
"defaultStorageQuota": null,
2024-09-30 00:11:42 -04:00
"enabled": false,
"issuerUrl": "",
2026-04-17 21:18:21 -07:00
"endSessionEndpoint": "",
2024-09-30 00:11:42 -04:00
"mobileOverrideEnabled": false,
"mobileRedirectUri": "",
2025-11-05 15:05:53 +01:00
"profileSigningAlgorithm": "none",
"roleClaim": "immich_role",
2023-08-25 19:44:52 +02:00
"scope": "openid email profile",
2024-03-01 19:46:07 -05:00
"signingAlgorithm": "RS256",
2023-08-25 19:44:52 +02:00
"storageLabelClaim": "preferred_username",
2025-11-05 15:05:53 +01:00
"storageQuotaClaim": "immich_quota",
"timeout": 30000,
"tokenEndpointAuthMethod": "client_secret_post"
2023-08-25 19:44:52 +02:00
},
"passwordLogin": {
"enabled": true
},
2025-11-05 15:05:53 +01:00
"reverseGeocoding": {
"enabled": true
},
"server": {
"externalDomain": "",
"loginPageMessage": "",
"publicUsers": true
},
2023-08-25 19:44:52 +02:00
"storageTemplate": {
2024-03-11 23:46:42 -04:00
"enabled": false,
"hashVerificationEnabled": true,
2023-08-25 19:44:52 +02:00
"template": "{{y}}/{{y}}-{{MM}}-{{dd}}/{{filename}}"
},
2025-11-05 15:05:53 +01:00
"templates": {
"email": {
"albumInviteTemplate": "",
"albumUpdateTemplate": "",
"welcomeTemplate": ""
}
2023-11-07 15:52:44 -06:00
},
"theme": {
"customCss": ""
},
2025-11-05 15:05:53 +01:00
"trash": {
"days": 30,
"enabled": true
2024-09-30 00:11:42 -04:00
},
"user": {
"deleteDelay": 7
2023-08-25 19:44:52 +02:00
}
}
```
2024-04-29 10:23:13 -04:00
< / details >
2023-08-25 19:44:52 +02:00
:::tip
In Administration > Settings is a button to copy the current configuration to your clipboard.
So you can just grab it from there, paste it into a file and you're pretty much good to go.
:::
### Step 2 - Specify the file location
2026-07-30 15:37:35 -04:00
:::note
If you have any `microservices` workers, they will also need to have the config file mounted to their container.
:::
2023-08-25 19:44:52 +02:00
In your `.env` file, set the variable `IMMICH_CONFIG_FILE` to the path of your config.
2025-09-25 15:54:34 +01:00
For more information, refer to the [Environment Variables ](/install/environment-variables.md ) section.
2024-03-12 16:29:49 +01:00
2026-02-18 14:52:28 +01:00
:::info Docker Compose
In your `.env` file, the variables `UPLOAD_LOCATION` and `DB_DATA_LOCATION` concern the location on the host.
However, the variable `IMMICH_CONFIG_FILE` concerns the location inside the container, and informs the `immich-server` container that a configuration file is present.
It is recommended to reuse this variable in your `docker-compose.yml` :
```yaml
volumes:
2026-07-30 15:37:35 -04:00
- ./immich-config.json:${IMMICH_CONFIG_FILE}
2026-02-18 14:52:28 +01:00
```
2026-05-09 04:44:41 +02:00
:::