# @zaxbux/ghost-storage-b2

> Backblaze B2 storage adapter for Ghost.

Latest version **0.0.3** (published 2021-04-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @zaxbux/ghost-storage-b2
pnpm add @zaxbux/ghost-storage-b2
yarn add @zaxbux/ghost-storage-b2
bun add @zaxbux/ghost-storage-b2
```

## Health

**Score 5/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2021-04-07 |
| First published | 2021-03-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 3 |
| Unpacked size | 13.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Zachary Schneider |
| Maintainers | zaxbux |

## Links

- npm: https://www.npmjs.com/package/@zaxbux/ghost-storage-b2
- Repository: https://github.com/zaxbux/ghost-storage-b2
- Homepage: https://github.com/zaxbux/ghost-storage-b2#readme
- Issues: https://github.com/zaxbux/ghost-storage-b2/issues
- npm.io page: https://npm.io/package/@zaxbux/ghost-storage-b2

## Dependencies (3)

- [backblaze-b2](https://npm.io/package/backblaze-b2.md) github:zaxbux/backblaze-b2#76539bb002a71f0ee08cbead8339677fdd70541c
- [@tryghost/errors](https://npm.io/package/@tryghost/errors.md) ^0.2.9
- [ghost-storage-base](https://npm.io/package/ghost-storage-base.md) 0.0.5

## Recent versions

- 0.0.3 (latest) — 2021-04-07
- 0.0.1 — 2021-03-11

## README

# Backblaze B2 Storage Adapter for Ghost

A [Backblaze B2](https://www.backblaze.com/b2/docs/) storage adapter for [Ghost](https://ghost.org) version 4 (also compatiable with version 3.x).

## Installation

```
git clone https://github.com/zaxbux/ghost-storage-b2.git
cd ghost-storage-b2; npm i
cd ..
cp -r ghost-storage-b2 ./content/adapters/storage/b2
```

## Configuration

You will need to obtain or create app keys and create a bucket in your B2 Cloud Storage Account.

If your Ghost configuration file, add the B2 configuration options:

```jsonc
{
  // ...

  "storage": {
    "active": "b2",
    "b2": {
      "applicationKeyId": "",
      // See table below for all config values
    }
  }

  // ...
}
```

Alternatively, the B2 storage adapter can be configured with environment variables:

| JSON File Option   | Environment Variable    | Value
| ------------------ | ----------------------- | -----
| `applicationKeyId` | `B2_APPLICATION_KEY_ID` | Your B2 application key ID.
| `applicationKey`   | `B2_APPLICATION_KEY`    | Your B2 application key.
| `bucketId`         | `B2_BUCKET_ID`          | Your B2 bucket's ID.
| `bucketName`       | `B2_BUCKET_NAME`        | *(optional)* Your bucket's name.
| `pathPrefix`       | `B2_PATH_PREFIX`        | *(optional)* The prefix to add to uploads.
| `downloadUrl`      | `B2_DOWNLOAD_URL`       | *(optional)* Use a custom URL for downloading. (CDN, etc.)

### Custom Domain

If you're using a custom domain instead of the default backblaze domain, e.g. with a CNAME pointing `cdn.example.com` to `f001.backblazeb2.com`, and your bucket name is `my_bucket`:

 * Set **downloadUrl** to `https://cdn.example.com/file/my_bucket`

## Debugging

To debug the storage adapter, set the `DEBUG` environment variable to `ghost-storage-b2`.

## Licence

[MIT](license)

---
_Source: https://npm.io/package/@zaxbux/ghost-storage-b2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
