Deploying Peergos
Introduction
Peergos is a self-hosted, peer-to-peer encrypted storage, social media, and application platform that puts privacy first. Unlike traditional cloud storage services, Peergos encrypts all your data client-side before it ever leaves your device, ensuring that even the server operator cannot access your files.
Built on top of IPFS (InterPlanetary File System), Peergos provides a decentralized infrastructure where your data can be stored across multiple nodes while remaining fully encrypted and under your control.
Key highlights of Peergos:
- End-to-End Encryption: All data is encrypted on your device before upload
- Zero-Knowledge Architecture: Server operators cannot access your data
- Peer-to-Peer: Built on IPFS for decentralized, resilient storage
- File Sharing: Share files and folders with fine-grained access control
- Social Features: Timeline, messaging, and collaborative workspaces
- Applications: Calendar, contacts, notes, and more built on the platform
- Cross-Platform: Web, desktop, and mobile clients
- Self-Sovereign Identity: You control your identity and data
- Quantum-Resistant: Post-quantum cryptography for future-proof security
- Open Source: Licensed under AGPL-3.0
This guide walks through deploying Peergos on Klutch.sh using Docker, configuring the platform, and setting up secure, encrypted storage.
Why Deploy Peergos on Klutch.sh
Deploying Peergos on Klutch.sh provides several advantages:
Simplified Deployment: Klutch.sh automatically detects your Dockerfile and builds Peergos without complex orchestration. Push to GitHub, and your encrypted storage platform deploys automatically.
Persistent Storage: Attach persistent volumes for IPFS blocks and user data. Your encrypted data survives container restarts and redeployments.
HTTPS by Default: Klutch.sh provides automatic SSL certificates for secure web access.
Custom Domains: Use your own domain for a professional, branded experience.
Always Available: Your encrypted storage is accessible 24/7 from anywhere.
Privacy by Default: Combined with Peergos’s encryption, your data remains private even from infrastructure providers.
Prerequisites
Before deploying Peergos on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your Peergos configuration
- Basic familiarity with Docker and containerization concepts
- Understanding of encryption concepts (helpful but not required)
Understanding Peergos Architecture
Peergos consists of several components:
Peergos Server: The main application handling user authentication, key management, and API requests.
IPFS Node: Stores encrypted data blocks in a content-addressed manner.
PKI (Public Key Infrastructure): Manages user identities and key distribution.
Client-Side Encryption: All encryption/decryption happens in the user’s browser or app.
Preparing Your Repository
Create a GitHub repository containing your Dockerfile for Peergos deployment.
Repository Structure
peergos-deploy/├── Dockerfile└── .dockerignoreCreating the Dockerfile
Create a Dockerfile in the root of your repository:
FROM peergos/peergos:latest
# Set environment variablesENV PEERGOS_PATH=/dataENV PEERGOS_PORT=8000
# Create data directoriesRUN mkdir -p /data
# Expose ports# 8000 - Web interface# 4001 - IPFS swarm# 5001 - IPFS APIEXPOSE 8000 4001 5001
# Start PeergosCMD ["java", "-jar", "/app/peergos.jar", "-PEERGOS_PATH", "/data"]Creating the .dockerignore File
Create a .dockerignore file:
.git.github*.mdLICENSE.gitignore*.log.DS_Store.env.env.localEnvironment Variables Reference
| Variable | Required | Default | Description |
|---|---|---|---|
PEERGOS_PATH | No | /data | Data storage directory |
PEERGOS_PORT | No | 8000 | Web interface port |
IPFS_SWARM_PORT | No | 4001 | IPFS peer-to-peer port |
IPFS_API_PORT | No | 5001 | IPFS API port |
MAX_USERS | No | - | Maximum number of user accounts |
DOMAIN | No | - | Your domain name |
Deploying Peergos on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 8000
- Detect your Dockerfile automatically
- Build the container image
- Attach the persistent volumes
- Start the Peergos container
- Provision an HTTPS certificate
Push Your Repository to GitHub
Initialize your repository and push to GitHub with your Dockerfile.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project. Give it a descriptive name like “peergos” or “encrypted-storage”.
Create a New App
Within your project, create a new app. Connect your GitHub account if you haven’t already, then select the repository containing your Peergos Dockerfile.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Add the following environment variables:
| Variable | Value |
|---|---|
DOMAIN | your-app-name.klutch.sh |
MAX_USERS | Adjust as needed |
Attach Persistent Volumes
Add the following volumes:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/data | 100+ GB | IPFS blocks and user data |
Deploy Your Application
Click Deploy to start the build process. Klutch.sh will:
Access Peergos
Once deployment completes, access your Peergos instance at https://your-app-name.klutch.sh and create your first account.
Initial Setup
Creating Your Account
- Navigate to your Peergos instance
- Click “Sign up”
- Choose a username (this becomes your identity)
- Create a strong password (this derives your encryption keys)
- Your account and encryption keys are generated locally
Important: Your password is never sent to the server. It’s used locally to derive your encryption keys. If you forget your password, your data cannot be recovered.
Understanding Encryption
Peergos uses sophisticated cryptography:
- Identity Key: Derived from your username and password
- Encryption Keys: Generated per-file for fine-grained access control
- Sharing: Keys are securely shared using public-key cryptography
- Post-Quantum: Uses post-quantum resistant algorithms
Using Peergos
File Storage
- Log in to your Peergos account
- Navigate to your Files
- Upload files by dragging and dropping
- Files are encrypted before leaving your browser
- Organize with folders and subfolders
Sharing Files
Share with other Peergos users:
- Right-click on a file or folder
- Select “Share”
- Enter the recipient’s username
- Choose permission level (view, edit)
- The recipient receives access instantly
Sharing creates new keys that grant access without exposing your master keys.
Social Features
Peergos includes social capabilities:
- Timeline: Share posts with followers
- Messaging: End-to-end encrypted direct messages
- Groups: Create collaborative spaces
Built-in Applications
Access applications from your Peergos account:
- Calendar: Schedule events
- Contacts: Address book
- Notes: Markdown notes
- PDF Viewer: View documents in-browser
- Media Player: Play audio and video
Security Best Practices
Password Security
- Use a strong, unique password
- Consider using a passphrase (multiple words)
- Never share your password
- Store a password backup securely (you cannot recover without it)
Sharing Carefully
- Review sharing permissions regularly
- Revoke access when no longer needed
- Use the minimum necessary permissions
Device Security
- Keep your devices secure
- Log out when using shared computers
- Use the desktop app for additional security
Federation
Peergos supports federation between servers:
- Users on different servers can interact
- Share files across server boundaries
- Decentralized identity verification
Additional Resources
- Peergos Official Website
- Peergos Documentation
- Peergos GitHub Repository
- Peergos Hosted Instance
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
Conclusion
Deploying Peergos on Klutch.sh gives you a powerful, privacy-first platform for encrypted storage and collaboration. The combination of end-to-end encryption, zero-knowledge architecture, and decentralized infrastructure means your data remains truly private.
With social features, built-in applications, and the ability to share securely, Peergos provides a complete platform for individuals and organizations who prioritize privacy without sacrificing functionality.