Skip to content

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
└── .dockerignore

Creating the Dockerfile

Create a Dockerfile in the root of your repository:

FROM peergos/peergos:latest
# Set environment variables
ENV PEERGOS_PATH=/data
ENV PEERGOS_PORT=8000
# Create data directories
RUN mkdir -p /data
# Expose ports
# 8000 - Web interface
# 4001 - IPFS swarm
# 5001 - IPFS API
EXPOSE 8000 4001 5001
# Start Peergos
CMD ["java", "-jar", "/app/peergos.jar", "-PEERGOS_PATH", "/data"]

Creating the .dockerignore File

Create a .dockerignore file:

.git
.github
*.md
LICENSE
.gitignore
*.log
.DS_Store
.env
.env.local

Environment Variables Reference

VariableRequiredDefaultDescription
PEERGOS_PATHNo/dataData storage directory
PEERGOS_PORTNo8000Web interface port
IPFS_SWARM_PORTNo4001IPFS peer-to-peer port
IPFS_API_PORTNo5001IPFS API port
MAX_USERSNo-Maximum number of user accounts
DOMAINNo-Your domain name

Deploying Peergos on Klutch.sh

    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:

    • Select HTTP as the traffic type
    • Set the internal port to 8000

    Set Environment Variables

    Add the following environment variables:

    VariableValue
    DOMAINyour-app-name.klutch.sh
    MAX_USERSAdjust as needed

    Attach Persistent Volumes

    Add the following volumes:

    Mount PathRecommended SizePurpose
    /data100+ GBIPFS blocks and user data

    Deploy Your Application

    Click Deploy to start the build process. Klutch.sh will:

    • Detect your Dockerfile automatically
    • Build the container image
    • Attach the persistent volumes
    • Start the Peergos container
    • Provision an HTTPS certificate

    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

  1. Navigate to your Peergos instance
  2. Click “Sign up”
  3. Choose a username (this becomes your identity)
  4. Create a strong password (this derives your encryption keys)
  5. 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

  1. Log in to your Peergos account
  2. Navigate to your Files
  3. Upload files by dragging and dropping
  4. Files are encrypted before leaving your browser
  5. Organize with folders and subfolders

Sharing Files

Share with other Peergos users:

  1. Right-click on a file or folder
  2. Select “Share”
  3. Enter the recipient’s username
  4. Choose permission level (view, edit)
  5. 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

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.