Skip to content

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

Creating the Dockerfile

Create a Dockerfile:

FROM framasoft/mobilizon:latest
# Environment configuration
ENV MOBILIZON_INSTANCE_NAME=${MOBILIZON_INSTANCE_NAME}
ENV MOBILIZON_INSTANCE_HOST=${MOBILIZON_INSTANCE_HOST}
ENV MOBILIZON_INSTANCE_PORT=443
ENV MOBILIZON_INSTANCE_SSL=true
# Database configuration
ENV 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 key
ENV MOBILIZON_INSTANCE_SECRET=${MOBILIZON_INSTANCE_SECRET}
# Email configuration
ENV 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 port
EXPOSE 4000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=3 \
CMD curl -f http://localhost:4000/health || exit 1

Environment Variables Reference

VariableRequiredDefaultDescription
MOBILIZON_INSTANCE_NAMEYes-Name of your instance
MOBILIZON_INSTANCE_HOSTYes-Public hostname
MOBILIZON_INSTANCE_SECRETYes-Secret key for signing
MOBILIZON_DATABASE_HOSTYes-PostgreSQL host
MOBILIZON_DATABASE_NAMEYes-Database name
MOBILIZON_DATABASE_USERNAMEYes-Database user
MOBILIZON_DATABASE_PASSWORDYes-Database password
MOBILIZON_ADMIN_EMAILYes-Admin contact email
MOBILIZON_SMTP_SERVERNo-SMTP server for email
MOBILIZON_SMTP_USERNAMENo-SMTP username
MOBILIZON_SMTP_PASSWORDNo-SMTP password

Deploying Mobilizon on Klutch.sh

    Generate Instance Secret

    Create a secure secret key:

    Terminal window
    openssl rand -base64 64

    Provision PostgreSQL Database

    Set up a PostgreSQL instance with the PostGIS extension for geolocation features.

    Push Your Repository to GitHub

    Terminal window
    git init
    git add Dockerfile .dockerignore README.md
    git commit -m "Initial Mobilizon deployment"
    git remote add origin https://github.com/yourusername/mobilizon-deploy.git
    git push -u origin main

    Create 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:

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

    Set Environment Variables

    Configure your environment:

    VariableValue
    MOBILIZON_INSTANCE_NAMEYour instance name
    MOBILIZON_INSTANCE_HOSTyour-app-name.klutch.sh
    MOBILIZON_INSTANCE_SECRETYour generated secret
    MOBILIZON_DATABASE_HOSTYour PostgreSQL host
    MOBILIZON_DATABASE_NAMEmobilizon
    MOBILIZON_DATABASE_USERNAMEYour database user
    MOBILIZON_DATABASE_PASSWORDYour database password
    MOBILIZON_ADMIN_EMAILYour admin email

    Attach Persistent Volumes

    Add volumes for persistent data:

    Mount PathRecommended SizePurpose
    /var/lib/mobilizon/uploads20 GBUser uploads and media
    /var/lib/mobilizon/exports5 GBData exports

    Deploy Your Application

    Click Deploy to build and launch Mobilizon.

    Run Initial Setup

    After deployment, run database migrations and create admin:

    Terminal window
    mix ecto.migrate
    mix mobilizon.users.new admin@example.com --admin

    Access Mobilizon

    Navigate to https://your-app-name.klutch.sh.

Configuring Your Instance

Instance Settings

Configure your Mobilizon instance:

  1. Log in as admin
  2. Navigate to Admin > Settings
  3. 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

  1. Click Create Event
  2. 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

  1. Navigate to My Groups
  2. Click Create Group
  3. 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

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.