Skip to main content

Getting Started

Install

npm install radosgw-admin

Basic Usage

import { RadosGWAdminClient } from 'radosgw-admin';

const rgw = new RadosGWAdminClient({
host: 'https://ceph-rgw.example.com',
accessKey: process.env.RGW_ADMIN_ACCESS_KEY!,
secretKey: process.env.RGW_ADMIN_SECRET_KEY!,
});

await rgw.users.create({
uid: 'alice',
displayName: 'Alice',
});

Verify Connectivity

Before running operations, confirm the client can reach RGW:

const ok = await rgw.healthCheck();
if (!ok) throw new Error('Cannot reach RGW');

Returns true if RGW responds successfully, false otherwise. Never throws.

Common Next Steps

  • Set user/bucket quotas
  • Rotate keys
  • Collect usage reports