Open Source, Self Hosted Solutions for Community Organizations
Introduction
In an era where digital tools are essential for organizing community movements, many volunteer organizations face a critical challenge: how to manage content, coordinate volunteers, and track projects without expensive proprietary software or monthly subscription fees. This is where Directus, combined with self-hosting on YunoHost, provides a powerful solution.
This tutorial will guide you through installing Directus—a free, open-source headless content management system—on a YunoHost server. By the end, you'll have a fully functional, self-hosted CMS that costs nothing beyond your existing server infrastructure.
What is Directus?
Directus is an open-source data platform that wraps your database with an intuitive admin interface and a powerful API. Unlike traditional content management systems that force you into rigid structures, Directus gives you complete control over your data model while providing a user-friendly interface for non-technical team members.
Key Features
Open Source: Released under the GPL license, Directus is completely free to use, modify, and distribute
Headless Architecture: Separate your content management from content presentation, enabling multi-channel publishing
API-First Design: RESTful and GraphQL APIs built in, making integration with other tools seamless
No Vendor Lock-In: Your data remains in your database, exportable at any time
Customizable: Extend functionality through custom interfaces, modules, and hooks
Why Directus for Community Volunteer Movements?
Community organizations and volunteer movements have unique needs that Directus addresses exceptionally well:
1. Cost Efficiency
When self-hosted, Directus is completely free. There are no per-user fees, no premium tiers, and no feature limitations. For grassroots organizations operating on minimal budgets, this represents significant savings compared to commercial alternatives like Airtable, Contentful, or proprietary CMS platforms.
2. Data Sovereignty
Community movements often handle sensitive information—volunteer contact details, campaign strategies, or demographic data. Self-hosting ensures your data remains under your control, not on third-party servers subject to terms of service changes or data mining.
3. Flexibility for Diverse Use Cases
Directus can serve multiple functions within a single installation:
Volunteer Database: Track volunteer skills, availability, and participation history
Event Management: Coordinate rallies, meetings, and community actions
Resource Library: Manage documents, images, and educational materials
Multi-Language Content: Support communities speaking different languages
Campaign Tracking: Monitor petition signatures, phone banking results, or canvassing data
4. Collaboration Without Barriers
The intuitive admin interface means non-technical volunteers can contribute content and manage data without developer intervention. Role-based permissions ensure appropriate access control across your organization.
5. Integration Capabilities
Through its robust API, Directus can connect with:
Website frontends (React, Vue, WordPress)
Mobile applications
Automation tools like n8n or Zapier
Communication platforms (Slack, Discord, email)
Social media management tools
Self-Hosting: Free and Autonomous
Self-hosting means running Directus on your own server infrastructure rather than paying for cloud-hosted services. The advantages for community organizations are substantial:
Financial Benefits:
Zero recurring subscription costs
No per-user licensing fees
Predictable infrastructure costs
Technical Benefits:
Complete control over updates and maintenance schedules
Ability to customize and extend the platform
No artificial feature limitations
Organizational Benefits:
Data remains in your jurisdiction
No dependence on external service continuity
Alignment with values of digital autonomy and open technology
Prerequisites
Before beginning this tutorial, ensure you have:
A YunoHost Server: YunoHost is an open-source server operating system that simplifies self-hosting. It should be installed and accessible via SSH
External Storage (Recommended): For this tutorial, we'll use external storage to keep application data separate from system files
Domain Name: A domain or subdomain pointed to your server (e.g.,
cms.yourorganization.org)Basic Command Line Familiarity: Comfort with terminal commands and text editors
Hardware Requirements:
Minimum: 1GB RAM, 10GB storage
Recommended: 2GB+ RAM, 50GB+ storage (depending on media library size)
Installation Tutorial
Part 1: Preparing the Storage Environment
We'll install Directus on external storage to keep large databases and media files off the primary system drive.
Step 1: Create the application directory
Note: Replace /mnt/storage with your external drive mount point if different.
Step 2: Create subdirectories for Directus data
These directories will store:
database/: SQLite database fileuploads/: User-uploaded media and filesextensions/: Custom extensions and modifications
Part 2: Configuring Docker Compose
Directus runs as a Docker container, which provides isolation and easy management.
Step 3: Create the Docker Compose configuration
Step 4: Add the following configuration
Step 5: Generate secure authentication keys
Before proceeding, generate cryptographically secure keys:
The first output becomes your KEY, the second becomes your SECRET. Copy these values.
Step 6: Edit the configuration with your values
Replace the following placeholders:
REPLACE_WITH_RANDOM_STRING_1: First generated keyREPLACE_WITH_RANDOM_STRING_2: Second generated keyadmin@example.com: Your administrative emailREPLACE_WITH_STRONG_PASSWORD: A strong password (12+ characters, mixed case, numbers, symbols)https://cms.yourorganization.org: Your actual subdomain
Save and exit the editor (Ctrl + X, then Y, then Enter).
Part 3: Setting Permissions
Docker containers run with specific user permissions. We need to ensure Directus can write to its data directories.
Step 7: Set directory ownership
This grants the Docker container (running as user ID 1000) write permissions.
Part 4: Launching Directus
Step 8: Start the Directus container
This command:
Downloads the Directus Docker image (first run only)
Creates and starts the container
Runs it in detached mode (
-dflag)
Step 9: Verify the container is running
You should see output showing the Directus container in "Up" status.
Step 10: Check the logs for successful startup
Look for messages indicating:
Database migrations completed
First admin user created
Server started at http://0.0.0.0:8055
Part 5: Configuring YunoHost Reverse Proxy
Directus is now running on port 8055, but it's only accessible locally. We need to expose it through YunoHost's web server.
Step 11: Create a subdomain in YunoHost
Access your YunoHost admin panel
Navigate to Domains → Add domain
Enter your subdomain:
cms.yourorganization.orgComplete the domain installation
Step 12: Install My Webapp
Go to Applications → Install (+ button)
Search for "My Webapp"
Configure the installation:
Domain: Select
cms.yourorganization.orgPath:
/(leave as root)SFTP Access: No
Access Control: Visitors (public)
Database: None
Complete the installation
Step 13: Configure nginx reverse proxy
YunoHost uses nginx as its web server. We need to configure it to forward requests to Directus.
Replace my_webapp__X.conf with the actual filename (the number may vary).
Step 14: Replace the file contents
Delete all existing content and replace with:
Save and exit.
Step 15: Test and reload nginx
If the test is successful:
Part 6: Accessing Your Directus Installation
Step 16: Open Directus in your browser
Navigate to: https://cms.yourorganization.org
You should see the Directus login screen.
Step 17: Log in with your admin credentials
Use the email and password you set in the docker-compose.yml file.
Post-Installation: Best Practices
Security Hardening
Enable Two-Factor Authentication
Click your user avatar → User Directory
Select your admin account
Enable TOTP authentication
Use an authenticator app (Authy, Google Authenticator) to scan the QR code
Create Role-Based Access Instead of sharing the admin account:
Go to Settings → Roles & Permissions
Create roles (Editor, Contributor, Viewer)
Assign appropriate permissions
Create user accounts under Settings → User Directory
Regular Updates Keep Directus current with security patches:
Backup Strategy
Your YunoHost backup system should include /mnt/storage/directus. Verify this is configured:
For critical data, consider additional off-site backups of the database file:
Performance Optimization
For organizations managing large datasets:
Consider PostgreSQL Instead of SQLite
SQLite is excellent for getting started, but PostgreSQL provides better performance for concurrent users. To migrate:
Install PostgreSQL through YunoHost
Update docker-compose.yml with PostgreSQL connection details
Use Directus's migration tools to transfer data
Monitor Resource Usage
This shows real-time resource consumption, helping you plan server capacity.
Use Case Examples for Community Organizations
Example 1: Volunteer Coordination System
Collections to Create:
Volunteers: Name, email, phone, skills, availability, languages
Events: Date, location, type, capacity, coordinator
Assignments: Link volunteers to events, track attendance
Skills: Categorize volunteer capabilities (legal aid, translation, childcare)
Workflow:
Volunteers register through a public form (Directus Forms feature)
Coordinators assign volunteers to events based on skills and availability
Automated emails sent through n8n integration
Post-event feedback collected and stored
Example 2: Multi-Language Resource Library
Collections to Create:
Resources: Title, description, file upload, category, language
Categories: Organizing principle (Legal Rights, Housing, Healthcare)
Translations: Linked items for same resource in different languages
Workflow:
Content creators upload documents in original language
Translators access Directus to add translated versions
Public website queries Directus API based on user's language preference
Community members access materials without technical barriers
Example 3: Campaign Impact Tracking
Collections to Create:
Campaigns: Name, start date, goals, status
Actions: Type (petition, rally, letter-writing), date, participants
Metrics: Signatures collected, attendees, volunteer hours
Media: Photos, videos, press coverage
Workflow:
Campaign organizers define goals in Directus
Field volunteers log actions via mobile app connected to API
Dashboard visualizes progress toward goals
Reports generated for stakeholders and funders
Troubleshooting Common Issues
Container Won't Start
Symptom: docker compose ps shows status as "Restarting"
Solution:
Look for permission errors. Ensure directories have correct ownership:
Cannot Access via Browser
Check 1: Verify container is running
Check 2: Test local connectivity
Check 3: Verify nginx configuration
Forgot Admin Password
Reset via Docker:
SSL Certificate Issues
YunoHost automatically manages Let's Encrypt certificates. If you encounter SSL errors:
Extending Directus for Your Organization
Custom Interfaces
Directus supports custom input interfaces. For example, create a custom volunteer availability calendar:
Develop the interface using Vue.js
Place in
/mnt/storage/directus/extensions/interfaces/Restart container:
sudo docker compose restart
API Integration Examples
Python script to add volunteers:
JavaScript for public website:
Maintenance Schedule
Establish a regular maintenance routine:
Weekly:
Review user activity logs
Check disk space usage
Verify backups completed successfully
Monthly:
Update Directus to latest version
Review and update user permissions
Audit data for accuracy
Quarterly:
Full backup test (restore to test environment)
Security audit
Review and optimize database performance
Conclusion
By self-hosting Directus on YunoHost, community organizations gain a powerful, free content management and data platform without the constraints of proprietary software. The combination of Directus's flexibility and YunoHost's ease of use creates an accessible self-hosting solution even for organizations with limited technical resources.
This approach embodies the principles of digital autonomy, data sovereignty, and open-source collaboration—values that align closely with many community volunteer movements. As your organization grows, Directus scales with you, supporting everything from small volunteer databases to complex multi-project coordination systems.
The initial time investment in setup pays dividends through long-term cost savings, customization possibilities, and the security of knowing your community's data remains under your control.
Additional Resources
Directus Documentation: https://docs.directus.io
YunoHost Documentation: https://yunohost.org/docs
Directus Community Discord: https://discord.com/invite/directus
YunoHost Forum: https://forum.yunohost.org
Acknowledgments
This tutorial is built on the work of countless open-source contributors to Directus, YunoHost, Docker, and the broader free software ecosystem. Their commitment to creating accessible, powerful tools makes projects like this possible for organizations working toward social change.
This tutorial is released under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0). You are free to share and adapt this content for any purpose, including commercial use, as long as you provide attribution and share modifications under the same license.


