⚠️ Prerequisite: DevCloudDesk Storage Server Required#
The DevCloudDesk SDK is a client library designed to communicate with your self-hosted DevCloudDesk Storage Server.
Before installing the client SDK or writing upload code, you must have an active DevCloudDesk Storage Server running. The server acts as your private media backbone—handling persistent storage (local disk or S3/Cloudflare R2), signed security tokens, upload endpoints, and GPU/CPU-accelerated on-the-fly image transformations.
👉 Deploy DevCloudDesk Storage Server (10s Docker Quickstart) → | 📖 Storage Server Overview & Architecture →
Installing the SDK#
Choose your preferred language and package manager to install the official DevCloudDesk client library:
npm install @dcd-sdk/storage-clientInitializing the Client#
Initialize the client with your running Storage Server endpoint URL and master API Key:
import { StorageClient } from '@dcd-sdk/storage-client';
// Initialize with your Storage Server instance endpoint and API key
export const storage = new StorageClient({
endpoint: process.env.DCD_STORAGE_ENDPOINT || 'https://storage.yourdomain.com',
apiKey: process.env.DCD_STORAGE_API_KEY || 'dcd_live_xxxxxxxxxxxx',
timeoutMs: 30000, // Optional timeout in ms (default 30s)
});Configuring Environment Variables#
We recommend setting your connection credentials in your application's .env file or secret manager:
bash# URL of your self-hosted DevCloudDesk Storage Server instance DCD_STORAGE_ENDPOINT="https://storage.yourdomain.com" # Master API Key generated by your Storage Server instance DCD_STORAGE_API_KEY="dcd_live_xxxxxxxxxxxxxxxxxxxxxxxx"
Next Steps#
Now that your client is installed and configured with your Storage Server, explore the core SDK workflows:
- Uploading Files & Streams →: Upload files from local paths, buffers, or streams.
- Direct Browser Uploads →: Generate secure client upload tokens to offload server bandwidth.
- Securing Private Files →: Protect confidential documents with expiring signed URLs.