{"record":{"id":"abdb784d2cb4b740","repo":"n8n-io/n8n","slug":"azure-blob-container-name-not-configured-please-s","errorCode":null,"errorMessage":"Azure Blob container name not configured. Please set `N8N_EXTERNAL_STORAGE_AZURE_CONTAINER_NAME`.","messagePattern":"Azure Blob container name not configured\\. Please set `N8N_EXTERNAL_STORAGE_AZURE_CONTAINER_NAME`\\.","errorType":"exception","errorClass":"UserError","httpStatus":null,"severity":"critical","filePath":"packages/@n8n/blob-storage/src/azure-blob/azure-blob.service.ee.ts","lineNumber":25,"sourceCode":"import { UnexpectedError, UserError } from 'n8n-workflow';\nimport { PassThrough, Readable, pipeline } from 'node:stream';\n\nimport { AzureBlobConfig } from './azure-blob.config';\nimport { createFixedSizeChunker } from '../stream-utils';\nimport type { BlobMetadata, PreWriteBlobMetadata } from '../types';\n\n@Service()\nexport class AzureBlobService {\n\tprivate readonly containerClient: ContainerClient;\n\n\tprivate isReady = false;\n\n\tconstructor(\n\t\tprivate readonly logger: Logger,\n\t\tprivate readonly config: AzureBlobConfig,\n\t) {\n\t\tif (config.containerName === '') {\n\t\t\tthrow new UserError(\n\t\t\t\t'Azure Blob container name not configured. Please set `N8N_EXTERNAL_STORAGE_AZURE_CONTAINER_NAME`.',\n\t\t\t);\n\t\t}\n\t\tthis.containerClient = this.buildContainerClient();\n\t}\n\n\tprivate buildContainerClient(): ContainerClient {\n\t\tconst { connectionString, accountName, accountKey, containerName, endpoint, authAutoDetect } =\n\t\t\tthis.config;\n\n\t\tif (connectionString) {\n\t\t\treturn BlobServiceClient.fromConnectionString(connectionString).getContainerClient(\n\t\t\t\tcontainerName,\n\t\t\t);\n\t\t}\n\n\t\tconst url = endpoint || `https://${accountName}.blob.core.windows.net`;\n\t\tconst serviceClient = authAutoDetect","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/blob-storage/src/azure-blob/azure-blob.service.ee.ts#L7-L43","documentation":"UserError thrown in the AzureBlobService constructor when config.containerName === ''. The container name is sourced from N8N_EXTERNAL_STORAGE_AZURE_CONTAINER_NAME. Without it the service cannot construct a ContainerClient, so it fails fast at DI time rather than producing confusing per-request errors later.","triggerScenarios":"AzureBlobService is instantiated (via @n8n/di during startup) while N8N_EXTERNAL_STORAGE_AZURE_CONTAINER_NAME is unset or empty AND external blob storage mode is set to azure. The constructor check at line 24 throws before any Azure call is attempted.","commonSituations":"Enabling N8N_EXTERNAL_STORAGE_MODE=azure without setting the container name env var; a typo in the env var name; a deployment template that omits the variable; CI that copies a partial env file.","solutions":["Set N8N_EXTERNAL_STORAGE_AZURE_CONTAINER_NAME to an existing Azure container name.","Confirm the env var is actually exported in the process running n8n (printenv in the same shell).","If Azure is not intended, switch N8N_EXTERNAL_STORAGE_MODE back to filesystem (or s3).","Restart n8n after setting the variable so the DI container re-constructs the service."],"exampleFix":"# before\nN8N_EXTERNAL_STORAGE_MODE=azure\n# container name missing\n\n# after\nN8N_EXTERNAL_STORAGE_MODE=azure\nN8N_EXTERNAL_STORAGE_AZURE_CONTAINER_NAME=my-n8n-blobs","handlingStrategy":"validation","validationCode":"function assertAzureConfig(env: NodeJS.ProcessEnv) {\n  if (env.N8N_EXTERNAL_STORAGE_MODE === 'azure' && !env.N8N_EXTERNAL_STORAGE_AZURE_CONTAINER_NAME) {\n    throw new Error('N8N_EXTERNAL_STORAGE_AZURE_CONTAINER_NAME must be set when mode=azure');\n  }\n}","typeGuard":"const hasAzureContainer = (env: NodeJS.ProcessEnv): boolean =>\n  !!env.N8N_EXTERNAL_STORAGE_AZURE_CONTAINER_NAME && env.N8N_EXTERNAL_STORAGE_AZURE_CONTAINER_NAME.length > 0;","tryCatchPattern":"try {\n  await azureBlobService.init();\n} catch (e) {\n  if (e instanceof UserError && /container name not configured/.test(e.message)) {\n    // halt startup with a clear config-missing message\n  }\n  throw e;\n}","preventionTips":["Validate required env vars in a pre-startup checklist before DI constructs services.","Document the full set of N8N_EXTERNAL_STORAGE_AZURE_* variables in the deployment template.","Run a config smoke test in CI against the production env file."],"tags":["azure","blob-storage","config","env-vars","startup"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}