Skip to content

Deploying SPIS

Introduction

SPIS (Simple Protocol for Independent Servers) is a decentralized protocol and server implementation for building federated social networking applications. It enables independent servers to communicate and share content while giving users control over their own data and social connections.

The protocol emphasizes simplicity, privacy, and independence from centralized platforms. Each SPIS node operates autonomously while maintaining the ability to federate with other nodes, creating a resilient, distributed social network that cannot be controlled by any single entity.

Key highlights of SPIS:

  • Decentralized Architecture: No central authority or single point of failure
  • Federation Support: Connect with other SPIS nodes across the network
  • Data Ownership: Users control their own data on their own servers
  • Simple Protocol: Straightforward API for client development
  • Privacy Focused: Minimal data collection and sharing
  • Self-Hosted: Run your own node with full control
  • Open Standard: Well-documented protocol for interoperability
  • Lightweight: Minimal resource requirements
  • API-First Design: RESTful API for easy integration
  • Extensible: Plugin system for custom functionality

This guide walks through deploying a SPIS node on Klutch.sh using Docker, configuring federation, and connecting to the decentralized network.

Why Deploy SPIS on Klutch.sh

Deploying SPIS on Klutch.sh provides several advantages for decentralized networking:

Simplified Deployment: Klutch.sh automatically builds your SPIS configuration without complex server setup.

Persistent Storage: Attach persistent volumes for user data and federation state. Your social graph survives container restarts.

HTTPS by Default: Secure federation connections with automatic SSL certificates, essential for trusted inter-node communication.

GitHub Integration: Store configuration in version control for reproducible deployments.

Always-On Federation: 24/7 availability ensures your node remains connected to the federated network.

Custom Domain: Establish your node’s identity with a professional domain name.

Prerequisites

Before deploying SPIS on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your SPIS configuration
  • Basic familiarity with Docker and containerization concepts
  • Understanding of federated/decentralized protocols
  • A custom domain for your SPIS node (recommended)

Deploying SPIS on Klutch.sh

    Create Your Repository

    Create a new GitHub repository for your SPIS deployment. Add a Dockerfile:

    FROM node:20-alpine
    WORKDIR /app
    RUN npm install -g spis-server
    ENV NODE_ENV=production
    ENV PORT=3000
    ENV SPIS_DOMAIN=your-domain.com
    EXPOSE 3000
    HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
    CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
    CMD ["spis-server"]

    Push to GitHub

    Commit and push your Dockerfile to your GitHub repository.

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project.

    Create a New App

    Within your project, create a new app. Connect your GitHub account and select your repository.

    Configure HTTP Traffic

    In the deployment settings:

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

    Set Environment Variables

    Configure essential settings:

    VariableValue
    SPIS_DOMAINYour node’s domain name
    SPIS_SECRETSecure random secret for signing
    DATABASE_URLDatabase connection string

    Attach Persistent Volumes

    Add volumes for data persistence:

    Mount PathRecommended SizePurpose
    /app/data10 GBUser data and content
    /app/keys100 MBCryptographic keys

    Deploy Your Application

    Click Deploy to start the build process.

    Configure Custom Domain

    Set up your custom domain to establish your node’s identity in the federated network.

Node Configuration

Identity Setup

Configure your node’s identity:

  1. Access the admin interface
  2. Set node name and description
  3. Configure public information
  4. Generate federation keys

Federation Settings

Enable inter-node communication:

{
"federation": {
"enabled": true,
"allowlist": [],
"blocklist": [],
"autofollow": false
}
}

Privacy Configuration

Control data sharing:

  • Set default privacy levels
  • Configure data retention
  • Enable/disable public profiles
  • Manage discovery settings

User Management

Registration Options

Configure user registration:

  • Open registration
  • Invite-only mode
  • Approval required
  • Disabled (single user)

User Roles

Manage access levels:

RoleCapabilities
AdminFull node control
ModeratorContent moderation
UserStandard access
GuestLimited read access

Federation

Connecting to Nodes

Federate with other SPIS nodes:

  1. Enter remote node address
  2. Send federation request
  3. Wait for approval
  4. Content flows between nodes

Federation Policies

Control federation behavior:

  • Allowlist specific nodes
  • Block problematic nodes
  • Set content filtering rules
  • Configure relay behavior

Content Distribution

Understand how content spreads:

  • Local posts stay on your node
  • Federated posts share with connected nodes
  • Public content is widely distributed
  • Private content respects permissions

Client Applications

Web Interface

Access your node via browser:

  • Built-in web client
  • Responsive design
  • Full feature access

API Access

Develop custom clients:

GET /api/v1/timeline
Authorization: Bearer YOUR_TOKEN

Mobile Apps

Connect mobile clients:

  • Configure server URL
  • Authenticate with credentials
  • Access federated content

Content Moderation

Moderation Tools

Manage content on your node:

  • Report handling system
  • Content flagging
  • User suspension
  • Defederation options

Automated Moderation

Configure automated rules:

  • Keyword filtering
  • Spam detection
  • Rate limiting
  • Content warnings

Security

Transport Security

Secure communications:

  • HTTPS enforced via Klutch.sh
  • Certificate verification for federation
  • Encrypted data at rest

Authentication

Protect user accounts:

  • Strong password requirements
  • Optional two-factor authentication
  • Session management

Key Management

Handle cryptographic keys:

  • Automatic key generation
  • Secure key storage
  • Key rotation procedures

Monitoring

Node Statistics

Track node health:

  • User count
  • Post volume
  • Federation status
  • Resource usage

Federation Health

Monitor connections:

  • Connected nodes list
  • Message queue status
  • Error rates
  • Latency metrics

Backup and Recovery

Data Backup

Protect your node data:

  1. Backup database regularly
  2. Export user data
  3. Store federation keys securely
  4. Document configuration

Node Migration

Move to new infrastructure:

  1. Export all data
  2. Transfer to new deployment
  3. Update DNS records
  4. Verify federation connectivity

Troubleshooting

Federation Issues

  • Verify network connectivity
  • Check SSL certificates
  • Review federation policies
  • Confirm domain configuration

Authentication Problems

  • Check user credentials
  • Verify token validity
  • Review session settings

Performance Issues

  • Monitor resource usage
  • Optimize database queries
  • Review federation volume
  • Scale resources as needed

Additional Resources

Conclusion

Deploying SPIS on Klutch.sh gives you a self-hosted node in the decentralized social web. With federation support, privacy-focused design, and full data ownership, you can participate in a distributed network without relying on centralized platforms. Klutch.sh’s automatic HTTPS and reliable hosting ensure your node remains a trusted, always-available participant in the federated network.