Deploying Mobilizon
Introduction
Mobilizon is a federated event organizing platform developed by Framasoft as an ethical alternative to Facebook Events. Built on the ActivityPub protocol, Mobilizon enables communities to create, share, and discover events while maintaining connections across the decentralized fediverse.
Written in Elixir with a Vue.js frontend, Mobilizon provides a modern, privacy-respecting platform for event management. It allows users to create multiple identities, organize events through groups, and federate with other Mobilizon instances and ActivityPub-compatible platforms.
Key highlights of Mobilizon:
- ActivityPub Federation: Connect with other Mobilizon instances and the fediverse
- Privacy-Focused: No tracking, data collection, or advertising
- Multiple Identities: Create separate profiles for different contexts
- Groups: Organize communities around shared interests
- Event Management: Create events with location, time, and capacity
- RSVPs: Track attendees with customizable registration
- Resources: Share files, links, and information within groups
- Discussions: Forum-style conversations within groups
- Search: Discover local and federated events
- External Calendars: Export to iCal and subscribe to feeds
- Moderation Tools: Manage content and users effectively
- Custom Categories: Organize events by type
- Open Source: AGPLv3 licensed and community-driven
This guide covers deploying Mobilizon on Klutch.sh, configuring federation, and setting up your event platform.
Why Deploy Mobilizon on Klutch.sh
Deploying Mobilizon on Klutch.sh provides excellent advantages:
Simplified Deployment: Klutch.sh automatically builds and deploys Mobilizon. Push to GitHub, and your event platform deploys automatically.
Persistent Storage: Attach volumes for database, uploads, and configuration that persist across updates.
HTTPS by Default: Klutch.sh provides automatic SSL certificates, required for ActivityPub federation.
GitHub Integration: Connect your repository for automatic deployments.
Scalable Resources: Allocate CPU and memory based on community size and event volume.
Environment Variable Management: Securely store database credentials and configuration secrets.
Custom Domains: Use your own domain for a branded, professional event platform.
Always-On Availability: Your platform stays accessible 24/7 for event discovery and federation.
Prerequisites
Before deploying Mobilizon on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your configuration
- Basic familiarity with Docker and containerization
- PostgreSQL database (can be provisioned on Klutch.sh)
- (Optional) SMTP server for email notifications
- (Optional) A custom domain for federation identity
Understanding Mobilizon Architecture
Mobilizon consists of several components:
Elixir Backend: Phoenix-based API server handling all business logic and federation.
Vue.js Frontend: Modern SPA providing the user interface.
PostgreSQL Database: Stores events, users, groups, and federation data.
GeoData Service: Optional geocoding for event locations.
Task Queue: Background job processing for federation and notifications.
ActivityPub Handler: Manages federation with other instances.
Preparing Your Repository
Repository Structure
mobilizon-deploy/├── Dockerfile├── README.md└── .dockerignoreCreating the Dockerfile
Create a Dockerfile:
FROM framasoft/mobilizon:latest
# Environment configurationENV MOBILIZON_INSTANCE_NAME=${MOBILIZON_INSTANCE_NAME}ENV MOBILIZON_INSTANCE_HOST=${MOBILIZON_INSTANCE_HOST}ENV MOBILIZON_INSTANCE_PORT=443ENV MOBILIZON_INSTANCE_SSL=true
# Database configurationENV MOBILIZON_DATABASE_HOST=${MOBILIZON_DATABASE_HOST}ENV MOBILIZON_DATABASE_NAME=${MOBILIZON_DATABASE_NAME}ENV MOBILIZON_DATABASE_USERNAME=${MOBILIZON_DATABASE_USERNAME}ENV MOBILIZON_DATABASE_PASSWORD=${MOBILIZON_DATABASE_PASSWORD}
# Secret keyENV MOBILIZON_INSTANCE_SECRET=${MOBILIZON_INSTANCE_SECRET}
# Email configurationENV MOBILIZON_SMTP_SERVER=${MOBILIZON_SMTP_SERVER}ENV MOBILIZON_SMTP_PORT=${MOBILIZON_SMTP_PORT:-587}ENV MOBILIZON_SMTP_USERNAME=${MOBILIZON_SMTP_USERNAME}ENV MOBILIZON_SMTP_PASSWORD=${MOBILIZON_SMTP_PASSWORD}ENV MOBILIZON_ADMIN_EMAIL=${MOBILIZON_ADMIN_EMAIL}
# Expose portEXPOSE 4000
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=3 \ CMD curl -f http://localhost:4000/health || exit 1Environment Variables Reference
| Variable | Required | Default | Description |
|---|---|---|---|
MOBILIZON_INSTANCE_NAME | Yes | - | Name of your instance |
MOBILIZON_INSTANCE_HOST | Yes | - | Public hostname |
MOBILIZON_INSTANCE_SECRET | Yes | - | Secret key for signing |
MOBILIZON_DATABASE_HOST | Yes | - | PostgreSQL host |
MOBILIZON_DATABASE_NAME | Yes | - | Database name |
MOBILIZON_DATABASE_USERNAME | Yes | - | Database user |
MOBILIZON_DATABASE_PASSWORD | Yes | - | Database password |
MOBILIZON_ADMIN_EMAIL | Yes | - | Admin contact email |
MOBILIZON_SMTP_SERVER | No | - | SMTP server for email |
MOBILIZON_SMTP_USERNAME | No | - | SMTP username |
MOBILIZON_SMTP_PASSWORD | No | - | SMTP password |
Deploying Mobilizon on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 4000
Generate Instance Secret
Create a secure secret key:
openssl rand -base64 64Provision PostgreSQL Database
Set up a PostgreSQL instance with the PostGIS extension for geolocation features.
Push Your Repository to GitHub
git initgit add Dockerfile .dockerignore README.mdgit commit -m "Initial Mobilizon deployment"git remote add origin https://github.com/yourusername/mobilizon-deploy.gitgit push -u origin mainCreate a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a project named “mobilizon” or “events”.
Create a New App
Create a new app and connect your GitHub repository.
Configure HTTP Traffic
In deployment settings:
Set Environment Variables
Configure your environment:
| Variable | Value |
|---|---|
MOBILIZON_INSTANCE_NAME | Your instance name |
MOBILIZON_INSTANCE_HOST | your-app-name.klutch.sh |
MOBILIZON_INSTANCE_SECRET | Your generated secret |
MOBILIZON_DATABASE_HOST | Your PostgreSQL host |
MOBILIZON_DATABASE_NAME | mobilizon |
MOBILIZON_DATABASE_USERNAME | Your database user |
MOBILIZON_DATABASE_PASSWORD | Your database password |
MOBILIZON_ADMIN_EMAIL | Your admin email |
Attach Persistent Volumes
Add volumes for persistent data:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/var/lib/mobilizon/uploads | 20 GB | User uploads and media |
/var/lib/mobilizon/exports | 5 GB | Data exports |
Deploy Your Application
Click Deploy to build and launch Mobilizon.
Run Initial Setup
After deployment, run database migrations and create admin:
mix ecto.migratemix mobilizon.users.new admin@example.com --adminAccess Mobilizon
Navigate to https://your-app-name.klutch.sh.
Configuring Your Instance
Instance Settings
Configure your Mobilizon instance:
- Log in as admin
- Navigate to Admin > Settings
- Configure:
- Instance name and description
- Registration policy (open, invite, closed)
- Default language
- Contact information
Federation Settings
Control ActivityPub federation:
- Open Federation: Discover and connect with any instance
- Allowlist: Only federate with approved instances
- Blocklist: Block specific instances
Registration Options
Configure how users join:
- Open: Anyone can register
- Invite Only: Require invitation codes
- Closed: Admin creates accounts manually
Creating and Managing Events
Creating Events
- Click Create Event
- Fill in event details:
- Title and description
- Date, time, and duration
- Location (physical or online)
- Category and tags
- Visibility settings
- Registration options
Event Options
Configure event behavior:
- Capacity: Limit attendee count
- Anonymous Participation: Allow without account
- Approval Required: Review registrations
- Comments: Enable/disable discussion
Event Visibility
- Public: Visible to everyone, federated
- Unlisted: Accessible via link only
- Private: Only visible to invited participants
Groups and Communities
Creating Groups
- Navigate to My Groups
- Click Create Group
- Configure group settings:
- Name and description
- Visibility (public, private)
- Moderation settings
Group Features
Groups provide:
- Events: Create events within the group
- Resources: Share files and links
- Discussions: Forum-style conversations
- Members: Manage membership
- Settings: Configure group behavior
Group Federation
Groups can federate with other instances:
- Members from other instances can join
- Events are discoverable across the fediverse
- Resources sync across federation
Moderation
Content Moderation
Access moderation tools in Admin > Moderation:
- Review reported content
- Take action on violations
- Manage user accounts
Instance Moderation
Control federation relationships:
- Block problematic instances
- Review incoming federation requests
- Monitor federated content
Troubleshooting
Federation Not Working
- Verify HTTPS is properly configured
- Check domain is publicly accessible
- Review ActivityPub endpoint responses
Database Connection Issues
- Verify PostgreSQL credentials
- Check PostGIS extension is installed
- Ensure database is accessible
Email Not Sending
- Verify SMTP configuration
- Check email provider settings
- Review email logs
Performance Issues
- Monitor database query performance
- Check background job queue
- Review resource allocation
Additional Resources
- Mobilizon Official Website
- Mobilizon Documentation
- Mobilizon GitLab Repository
- ActivityPub Specification
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
Conclusion
Mobilizon on Klutch.sh provides a privacy-respecting, federated alternative to centralized event platforms. With ActivityPub federation, groups, and comprehensive event management, Mobilizon empowers communities to organize without surveillance capitalism. The self-hosted approach ensures data sovereignty, while Klutch.sh simplifies deployment and maintenance, letting you focus on building your community and organizing events.