Registry / storage / ghost-azure-storage-adapter

ghost-azure-storage-adapter

JSON →
library0.1.3jsnpmunverified

A Ghost storage adapter for Azure Blob Storage that supports three authentication methods: connection string, account name+key, and managed identity via DefaultAzureCredential. Current stable version is 0.1.3. It relies on the official @azure/storage-blob SDK and the ghost-storage-base peer dependency. Key differentiators: supports managed identity for secure, keyless authentication and custom domains for CDN integration. Designed to be dropped into Ghost's content/adapters directory or installed via npm.

npm install ghost-azure-storage-adapter
INSTALL
IMPORT
SIG · GHOST-AZURE-STORAG
G
ghost-azure-storage-adapter
storagejavascriptv0.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AzureStorageAdapter
import AzureStorageAdapter from 'ghost-azure-storage-adapter'
const AzureStorageAdapter = require('ghost-azure-storage-adapter')
This is a Ghost storage adapter, not typically imported directly by user code. It is resolved by Ghost at runtime via the active storage configuration.

Shows a full Ghost configuration for Azure Blob Storage with connection string, custom domain, cache control, and path prefix.

// Ghost config.production.json { "storage": { "active": "ghost-azure-storage-adapter", "ghost-azure-storage-adapter": { "connectionString": "DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=base64key...;EndpointSuffix=core.windows.net", "container": "ghost-content", "customDomain": "https://cdn.example.com", "cacheControl": "public, max-age=31536000", "pathPrefix": "images" } } }
Debug
Known issues
gotchaThe adapter resolves authentication methods in priority order: connectionString > accountKey > managed identity. If both connectionString and accountKey are provided, connectionString takes precedence and accountKey is ignored.
fix
Remove the lower-priority authentication method from config to avoid confusion.
affects: >=0.0.1
gotchaWhen using managed identity, only accountName and container are required. However, you must ensure that the Ghost process has the proper Azure RBAC role (e.g., Storage Blob Data Contributor) on the storage account.
fix
Assign the managed identity to the Ghost environment (VM, App Service) and grant the Storage Blob Data Contributor role.
affects: >=0.0.1
gotchaThe peer dependency ghost-storage-base must be installed and match the version requirements (^1.1.2). Missing peer dep can cause runtime errors.
fix
Run `npm install ghost-storage-base@^1.1.2` alongside this adapter.
affects: >=0.0.1
Errors
Common errors & fixes
Error: getaddrinfo ENOTFOUND mystorageaccount.blob.core.windows.net
Invalid storage account name or DNS resolution failure.
fix
Verify the accountName is correct and that the storage account exists. Check network connectivity and DNS settings.
Error: The specified container does not exist.
The container name provided in config does not exist in the storage account.
fix
Create the container in Azure portal or via Azure CLI, or change the container name to an existing one.
Error: Azurite needs to be started or connection string is invalid.
If connectionString is set to the Azurite emulator string but Azurite is not running, or the connection string is malformed.
fix
Start Azurite (if using local emulator) or provide a valid connection string to a real Azure storage account.
Upgrade
Version history
0.1.3latest on npm
Audit
Dependencies
ghost-storage-baserequiredRequired peer dependency providing the base storage adapter class.
Agent activity
18 hits · last 30 days
node
16
Resources
ghost-azure-storage-adapter — npm install ghost-azure-storage-adapter · libregistry