Getting Started with Aleph Cloud
Welcome to the Aleph Cloud Developer Hub! This guide will help you get started with building on Aleph Cloud's decentralized cloud platform.
What is Aleph Cloud?
Aleph Cloud is a decentralized cloud platform that provides storage, computing, and indexing services for Web3 applications. It offers a more decentralized alternative to traditional cloud providers, with features specifically designed for blockchain and Web3 use cases.
Key Features
- Decentralized Storage: Store files, objects, and databases with redundancy and persistence
- Decentralized Computing: Run code in a decentralized environment (on-demand or persistent)
- Blockchain Indexing: Index and query blockchain data efficiently
- Web3 Hosting: Host websites and applications in a decentralized manner
- Cross-Chain Support: Work with multiple blockchains through a unified API
Prerequisites
Before you begin, you'll need:
- Basic knowledge of programming (JavaScript, Python, or other supported languages)
- Familiarity with Web3 concepts (optional, but helpful)
- An Aleph Cloud account (can be created through wallet authentication)
- ALEPH tokens for paying for services (available on various exchanges)
Quick Start
1. Choose Your SDK
Aleph Cloud provides SDKs for multiple programming languages:
- TypeScript - Most feature-complete SDK
- Python - Great for data science and backend applications
2. Install the SDK
npm install @aleph-sdk/client
pip install aleph-client
3. Initialize the Client
import { Account, ETHAccount, ItemType, StoreType } from '@aleph-sdk/core';
import { AlephHttpClient } from '@aleph-sdk/client';
// Create a client instance
const aleph = new AlephHttpClient();
// If you need to authenticate (example with Ethereum)
const account = new ETHAccount();
await account.connect(); // Connect with MetaMask or other provider
from aleph_sdk_python.asynchronous import AsyncClient
# Create a client instance
client = AsyncClient()
# If you need to authenticate
account = client.get_account()
4. Try a Simple Example
Store Data on Aleph Cloud
// Store a simple message
const content = { message: 'Hello, Aleph Cloud!' };
const result = await aleph.store.storeContent(
account,
content,
{ tags: ['example', 'hello-world'], storageType: StoreType.storage, itemType: ItemType.inline }
);
console.log(`Stored message with hash: ${result.item_hash}`);
// Retrieve the message
const message = await aleph.store.getContent(result.item_hash);
console.log(message);
# Store a simple message
result = await client.create_store(
"Hello, Aleph Cloud!",
tags=['example', 'hello-world']
)
print(f"Stored message with hash: {result['item_hash']}")
# Retrieve the message
message = await client.get_message(result['item_hash'])
print(message['content'])
Common Use Cases
Decentralized Storage
Store files, objects, and structured data with persistence and redundancy:
Decentralized Computing
Run code in a decentralized environment:
- On-demand Execution - For serverless functions
- Persistent Execution - For always-on applications
- Confidential Computing - For secure, private execution
Blockchain Indexing
Index and query blockchain data efficiently:
Web3 Authentication
Authenticate users with their blockchain wallets:
Sample Projects
To help you get started, we've prepared some sample projects:
Next Steps
- Explore the SDK documentation for your preferred language
- Check out the API Reference for detailed endpoint information
- Join the Aleph Cloud Discord to connect with the community
- Browse example projects for inspiration
Getting Help
If you encounter any issues or have questions:
- Check the documentation for your specific use case
- Join the Aleph Cloud Discord for community support
- Visit the Aleph Cloud GitHub to report issues or contribute
- Contact the Aleph Cloud team through the official website