Deploying Hubzilla
Introduction
Hubzilla is a powerful decentralized publishing and social networking platform that provides features like nomadic identity, which allows your identity to exist across multiple independent servers. Built on the Zot protocol, Hubzilla enables secure communication, content sharing, and social networking while giving you complete control over your data.
Unlike traditional social networks, Hubzilla allows you to clone your identity across servers, meaning if one server goes down, your identity and connections survive on others. The platform supports channels for different aspects of your life, fine-grained privacy controls, and federation with other platforms via ActivityPub.
Key highlights of Hubzilla:
- Nomadic Identity: Clone your identity across multiple servers
- Decentralized: No single point of failure or control
- Privacy Controls: Fine-grained permissions for every post
- Channels: Separate identities for different purposes
- Federation: Connect with Mastodon, Friendica, and more via ActivityPub
- Wiki and Files: Built-in wiki and file storage
- Events and Calendar: Event scheduling and invitations
- Apps and Addons: Extend functionality with plugins
This guide walks through deploying Hubzilla on Klutch.sh using Docker, configuring your hub, and setting up for federation.
Prerequisites
Before deploying Hubzilla on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your Hubzilla configuration
- A MySQL or MariaDB database (can be deployed separately on Klutch.sh)
- A custom domain (required for federation)
- SMTP credentials for email notifications
- Basic familiarity with Docker and containerization concepts
Preparing Your Repository
Create a GitHub repository with the following structure:
hubzilla-deploy/├── Dockerfile├── .htconfig.php (optional)├── .dockerignore└── README.mdCreating the Dockerfile
Create a Dockerfile for Hubzilla:
FROM sebt3/hubzilla:latest
# Environment variablesENV DB_HOST=${DB_HOST}ENV DB_PORT=${DB_PORT:-3306}ENV DB_NAME=${DB_NAME:-hubzilla}ENV DB_USER=${DB_USER}ENV DB_PASS=${DB_PASS}
# Site URL (must be HTTPS for federation)ENV HUBZILLA_URL=${HUBZILLA_URL}
# Admin emailENV ADMIN_EMAIL=${ADMIN_EMAIL}
# SMTP configurationENV SMTP_HOST=${SMTP_HOST}ENV SMTP_PORT=${SMTP_PORT:-587}ENV SMTP_USER=${SMTP_USER}ENV SMTP_PASS=${SMTP_PASS}
# Expose the application portEXPOSE 80
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=5 \ CMD curl -f http://localhost/ || exit 1Alternative Dockerfile
Using a different Hubzilla image:
FROM dhitchenor/hubzilla:latest
# Database configurationENV MYSQL_HOST=${DB_HOST}ENV MYSQL_DATABASE=${DB_NAME}ENV MYSQL_USER=${DB_USER}ENV MYSQL_PASSWORD=${DB_PASS}
# Site configurationENV SITEURL=${HUBZILLA_URL}ENV ADMIN_MAIL=${ADMIN_EMAIL}
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=5 \ CMD curl -f http://localhost/ || exit 1Environment Variables Reference
| Variable | Required | Description |
|---|---|---|
DB_HOST | Yes | Database server hostname |
DB_PORT | No | Database port (default: 3306) |
DB_NAME | No | Database name (default: hubzilla) |
DB_USER | Yes | Database username |
DB_PASS | Yes | Database password |
HUBZILLA_URL | Yes | Public URL (must be HTTPS) |
ADMIN_EMAIL | Yes | Admin email address |
SMTP_HOST | No | SMTP server hostname |
SMTP_PORT | No | SMTP port (default: 587) |
SMTP_USER | No | SMTP username |
SMTP_PASS | No | SMTP password |
Deploying Hubzilla on Klutch.sh
- Create a new database app with persistent storage
- Create a database named
hubzilla - Note the connection details
- Select HTTP as the traffic type
- Set the internal port to 80
Deploy MySQL Database
First, deploy a MySQL or MariaDB database on Klutch.sh:
Push Your Repository to GitHub
git initgit add Dockerfile .dockerignore README.mdgit commit -m "Initial Hubzilla deployment configuration"git remote add origin https://github.com/yourusername/hubzilla-deploy.gitgit push -u origin mainCreate a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project named “hubzilla” or “social”.
Create a New App
Within your project, create a new app. Connect your GitHub account and select your Hubzilla repository.
Configure HTTP Traffic
Set Environment Variables
Configure the following environment variables:
| Variable | Value |
|---|---|
DB_HOST | Your database hostname |
DB_NAME | hubzilla |
DB_USER | Your database username |
DB_PASS | Your database password |
HUBZILLA_URL | https://your-app-name.klutch.sh |
ADMIN_EMAIL | Your admin email |
Attach Persistent Volumes
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/var/www/hubzilla/store | 50 GB | User uploads and files |
/var/www/hubzilla/addon | 1 GB | Custom addons |
Deploy Your Application
Click Deploy to start the build process. Klutch.sh will build the container, attach volumes, and start Hubzilla with HTTPS enabled.
Complete Setup
Access your Hubzilla instance at https://your-app-name.klutch.sh and complete the web-based installation.
Initial Configuration
Web Setup
- Navigate to your Hubzilla URL
- Follow the installation wizard
- Enter database credentials
- Create your admin account
- Configure site settings
Creating Channels
- Log in to your account
- Navigate to Settings > Channels
- Create channels for different purposes:
- Personal
- Professional
- Hobby-related
- Each channel has its own profile and permissions
Privacy Settings
Configure per-channel or per-post privacy:
- Public: Visible to everyone
- Connections: Only your connections
- Specific Lists: Custom groups
- Private: Only you
Federation
ActivityPub Support
Hubzilla federates with:
- Mastodon
- Pleroma
- Friendica
- Diaspora (via protocol)
- Other Hubzilla instances
Connecting to Others
- Search for users by their address (e.g.,
user@mastodon.social) - Click Connect
- Choose the channel to connect from
- Set permissions for the connection
Nomadic Identity
Clone your identity to another Hubzilla hub:
- Go to Settings > Manage Accounts
- Click Clone Channel
- Enter the destination hub URL
- Your identity now exists on both servers
Features
Wiki
Create collaborative documentation:
- Navigate to Wiki
- Create pages with Markdown
- Set page permissions
- Track revision history
File Storage
Upload and organize files:
- Go to Files
- Create folders
- Upload files
- Set sharing permissions
- Access files from any device
Events
Create and manage events:
- Navigate to Events
- Create event with details
- Invite connections
- Track RSVPs
Troubleshooting
Federation Not Working
- Ensure URL uses HTTPS (required)
- Check WebFinger is accessible
- Verify DNS is correctly configured
- Review federation logs
Database Connection Issues
- Verify database credentials
- Check database server is accessible
- Ensure database exists and user has permissions
Email Not Sending
- Configure SMTP settings
- Verify SMTP credentials
- Check server allows outbound SMTP
Additional Resources
- Official Hubzilla Website
- Hubzilla Source Code
- Hubzilla Docker Image
- Hubzilla Documentation
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
Conclusion
Deploying Hubzilla on Klutch.sh creates your own corner of the decentralized social web with unique features like nomadic identity and fine-grained privacy controls. The federation support allows connection with the broader Fediverse while maintaining complete control over your data. Whether for personal publishing, community building, or privacy-focused social networking, Hubzilla provides a robust, feature-rich platform.