Centram › Documentation

Centram Documentation

Welcome to the Centram documentation. This guide covers everything from initial setup to advanced configuration, economic incentives, and policies.

What is Centram? Centram is a peer-to-peer decentralized storage system. You encrypt files on your device, split them into chunks, and distribute them across a network of peers. No central server ever holds your unencrypted data.

System Requirements

PlatformMinimumRecommended
Desktop4 GB RAM, 2 GB free disk8 GB RAM, 50+ GB shareable
AndroidAndroid 8.0+ (API 26)Android 12+ with 4 GB RAM
iOSiOS 14.0+iOS 16+ with 4 GB RAM
Web MonitorAny modern browserChrome, Safari, or Firefox
Storage Note By default, Centram reserves 50 GB of disk space for the operating system. Only space beyond this reserve is available for sharing with the network.

Installation

Desktop

Download the latest release for your platform:

OSFormat
macOSDMG or ZIP
WindowsInstaller (NSIS) or Portable
LinuxAppImage or DEB

Mobile

Install from your device's app store or sideload the APK / IPA directly from the releases page.

From Source

1

Clone the repository

git clone https://github.com/centram/centram.git
cd centram
2

Install dependencies

npm install
3

Install the daemon

cd daemon
pip install -e .
4

Build the C++ core (optional, for native crypto)

cd core
mkdir build && cd build
cmake ..
make

Quick Start

1

Start the daemon

The daemon is the backend service that handles storage, P2P networking, and blockchain operations.

centram-daemon

You should see output confirming the API is listening and the P2P node is active.

2

Launch a client

Open whichever client you prefer. All clients connect to the daemon running on your machine.

# Desktop (Electron)
npm run start:electron

# Desktop (JavaFX)
cd desktop && ./gradlew run

# Web Monitor
cd web-monitor/frontend && npm run dev

# Android
npm run build:android && npm run open:android
3

Upload a file

Navigate to the Files tab, choose a file, and enter a passphrase. Centram will encrypt, chunk, and distribute it automatically.

Daemon Configuration

The daemon reads its configuration from ~/.centram/config.json. If the file doesn't exist, defaults are used.

Default Configuration

{
  "api_host": "127.0.0.1",
  "api_port": 9740,
  "p2p_port": 9741,
  "data_dir": "~/.centram",
  "reserved_gb": 50,
  "node_type": "storage",
  "subscription_cost": 0.0,
  "accept_24_7_policy": false,
  "bluetooth_fallback": false,
  "bootstrap_peers": []
}

Configuration Options

KeyDefaultDescription
api_port9740Port for the REST API and WebSocket
p2p_port9741Port for peer-to-peer connections
reserved_gb50Disk space reserved for the OS (not shared)
node_type"storage"Node role: "storage", "server", or "database"
subscription_cost0.0Price you charge per GB/month for storage
accept_24_7_policyfalseRequired for server/database nodes
bootstrap_peers[]List of "host:port" peers to connect to on startup

Node Types

Every Centram node operates as one of three types. Your node type affects allocation priority, trust rewards, and uptime requirements.

Storage (Default)

Casual participants. Share unused disk space when your device is online. No uptime commitment required. Lowest allocation priority but easiest to run.

Server

Always-on hosting nodes with highest allocation priority. Server nodes commit to the 24/7 Uptime Policy and must remain online at all times. Downtime results in trust score penalties. Best for dedicated machines or VPS instances.

Database

Persistent data nodes with medium allocation priority. Like servers, database nodes require the 24/7 policy. Designed for nodes that store large volumes of indexed data.

Changing Node Type You can change your node type at any time via the Cloud/Node settings in any client or the API. Switching to Server or Database requires accepting the 24/7 Uptime Policy.

Storage Configuration

Data Directory

All Centram data is stored under ~/.centram/ by default:

~/.centram/
  chunks/               Encrypted file chunks (256-way fan-out)
  chain/                Blockchain data
  trust_scores.json     Peer trust records
  config.json           Your configuration

Chunk Storage

Files are split into 4 MB chunks, encrypted individually, and stored in a fan-out directory structure. The first two hex characters of each chunk's SHA-256 hash determine the subdirectory (256 possible directories), ensuring efficient file system lookup.

Reserved Space

The reserved_gb setting (default: 50 GB) tells Centram how much disk space to leave free for the operating system and other applications. Only space beyond this reserve is available for the network.

Replication

Every chunk is replicated to 3 independent peers. The replication manager checks for under-replicated chunks every 60 seconds and automatically repairs them by pushing copies to new peers.

Networking

Connecting to Peers

Centram discovers peers through:

Firewall

If you're behind a firewall or NAT, ensure port 9741 (P2P) is open for incoming connections. The API port (9740) only needs to be accessible from localhost.

Relay Support If direct connections aren't possible, Centram can relay data through other peers using the circuit relay protocol. This is handled automatically.

CenTrust Score

CenTrust is Centram's reputation system. Every peer starts with a score of 50 (range: 0–100). Your score reflects your reliability on the network.

How Your Score Changes

EventEffectDescription
Storage proof success+0.5You proved you hold a chunk when challenged
Storage proof failure-5.0You failed to prove chunk possession
Uptime tick (per hour)+0.1Earned for each hour your node stays online
Downtime penalty (per hour)-2.024/7 nodes only — when your node goes offline
Successful transfer+0.2You completed a chunk transfer to another peer
Failed transfer-1.0A transfer to/from your node failed

Trust Levels

ScoreLevelGas Discount
80 – 100Trusted40% – 50%
60 – 79Reliable30% – 39%
40 – 59Normal20% – 29%
0 – 39Low0% – 19%

Benefits of High Trust

Gas Fees

Every storage transaction incurs a 5% base gas fee. This fee is paid to the block miner who validates the transaction.

How Gas is Calculated

Base gas rate:       5%
Trust discount:      (your_score / 100) × 50%
Effective rate:      5% × (1 - trust_discount)

Example (trust score = 80):
  Trust discount  = (80 / 100) × 50% = 40%
  Effective rate  = 5% × (1 - 0.40) = 3%
  On a 100 unit tx: gas = 3 units, you pay 97
Maximize Savings Stay online, complete transfers reliably, and pass storage proofs to build trust and minimize your gas costs. A perfect score of 100 gives you a 50% discount (2.5% effective rate).

Subscription Pricing

As a storage sharer, you set your own price per GB per month. This is the amount peers pay you for storing their data on your node.

Setting Your Price

Pricing Strategy

Price Discovery The marketplace shows all active sharers with their pricing, trust score, and available capacity. Peers can compare options before choosing where to store.

Marketplace

The Centram marketplace lists all peers offering storage. It's accessible through the web monitor or any client's Economics section.

Each listing shows:

Encryption

Centram uses a layered encryption scheme to ensure only you can access your files:

Encryption Pipeline

  1. Key Derivation — Your passphrase is run through PBKDF2-SHA256 (100,000 iterations) with a random 16-byte salt to produce a 256-bit master key.
  2. Per-Chunk Keys — Each chunk gets its own key, derived from the master key using HKDF-SHA256 with the chunk index as info parameter.
  3. Encryption — Each chunk is encrypted with AES-256-GCM using a random 12-byte IV. The output is: [IV (12B) | Ciphertext | Auth Tag (16B)]
Your Passphrase is Everything Centram never stores your passphrase or encryption keys. If you lose your passphrase, your files are permanently unrecoverable. There is no "forgot password" option.

Zero-Knowledge Design

Storage nodes hold encrypted chunks but have no ability to decrypt them. They don't know what files the chunks belong to, what the content is, or who uploaded them. Only the file owner with the correct passphrase can reconstruct and decrypt the data.

Storage Proofs

Centram uses Proof of Storage (PoSt) to verify that peers actually hold the data they claim. This prevents free-riding and ensures data integrity.

How It Works

  1. A challenge is derived from the previous block hash and a chunk hash
  2. The challenged node must produce a proof by hashing the challenge with the actual chunk data
  3. The proof is verified by miners and recorded on the blockchain
  4. Successful proofs increase your trust score; failures decrease it

Blockchain

Centram's blockchain is a lightweight chain optimized for storage operations. It records all allocations, storage proofs, trust updates, and economic transactions.

Consensus

Blocks are mined using Proof of Storage rather than Proof of Work. This means mining rewards go to nodes that prove they store data, not nodes that waste energy on hash puzzles.

What Gets Recorded On-Chain

Privacy Policy

Data We Never Collect

Data That Exists on the Network

Encryption Guarantee

All file data is encrypted client-side before leaving your device. No peer, relay, or server on the network can read your files. Even if every other node on the network colluded, they could not access your data without your passphrase.

Terms of Use

Acceptable Use

By using Centram, you agree to:

Liability

Centram is open-source software. The developers are not responsible for data loss, service interruption, or any damages arising from the use of this software. You are solely responsible for your passphrase and data backups.

Data Responsibility

As a storage sharer, you store encrypted chunks on behalf of other peers. You cannot see or access the content of these chunks. You are not responsible for their content.

24/7 Uptime Policy

Server and Database nodes must accept the 24/7 Uptime Policy. This is a commitment to keep your node online at all times.

Requirements

Penalties

Opting Out

You can switch back to a Storage node at any time, which removes the 24/7 requirement. However, this also reduces your allocation priority.

API Reference

The daemon exposes a REST API at http://127.0.0.1:9740. All endpoints are prefixed with /api.

Status & Info

MethodEndpointDescription
GET/api/statusNode status, peer count, chain height, trust
GET/api/storageDisk usage stats
GET/api/peersConnected peers list
GET/api/filesLocal file chunks

Node Configuration

MethodEndpointDescription
GET/api/node/typeCurrent node type and policy
POST/api/node/typeSet node type + accept policy
GET/api/node/subscriptionCurrent subscription price
POST/api/node/subscriptionSet subscription price

Trust & Economics

MethodEndpointDescription
GET/api/trust/selfYour trust score and gas discount
GET/api/trust/{peer_id}A peer's trust info
GET/api/trust/leaderboardTop trusted peers
GET/api/gas/estimate?amount=XGas fee estimate
GET/api/economics/summaryFull economics overview
GET/api/marketplace/sharersBrowse sharers

Blockchain

MethodEndpointDescription
GET/api/blockchain/statusChain height and validity
GET/api/blockchain/blocksPaginated block list
GET/api/blockchain/block/{n}Single block by height
POST/api/uploadUpload file (multipart + passphrase)

WebSocket

Real-time events are available at ws://127.0.0.1:9740/ws.

Ports & Endpoints

PortServiceBindingNotes
9740REST API + WebSocketlocalhostClient-daemon communication
9741P2P Node0.0.0.0Open this port for incoming peer connections

FAQ

Can I recover my files if I lose my passphrase?

No. Centram is zero-knowledge by design. Your passphrase is never stored anywhere. Without it, your encryption keys cannot be derived and your files are permanently lost.

What happens if peers storing my data go offline?

Every chunk is replicated to 3 peers. If one goes offline, the replication manager automatically detects the under-replication and pushes the chunk to a new peer. Your data is safe as long as at least one copy remains available.

Can storage nodes read my files?

No. All chunks are encrypted with AES-256-GCM before they leave your device. Storage nodes only hold encrypted blobs. They cannot determine what file a chunk belongs to, its content, or who uploaded it.

How much can I earn by sharing storage?

Earnings depend on your subscription price, available capacity, trust score, and network demand. You set your own price and the marketplace determines how competitive it is.

Do I need a static IP address?

No. Centram supports relay connections for peers behind NAT or firewalls. However, a static IP or open port 9741 will improve your connectivity and peer discovery.

Is there a minimum storage requirement?

No. You can share as little or as much as you want. The reserved_gb setting ensures your OS always has enough space.

What's the difference between the Electron app and the JavaFX app?

Both are full desktop clients. The Electron app wraps the web-based React UI for a familiar experience. The JavaFX app is a fully native desktop interface. Both connect to the same daemon backend.


Need help? Check the GitHub issues page or join the community. Centram is open source and community-driven.