Deploying Loomio
Introduction
Loomio is a collaborative decision-making platform that helps groups work together to make better decisions. Originally developed by a worker-owned cooperative in New Zealand, Loomio provides tools for structured discussions, proposals, and various voting methods that enable inclusive participation from all group members, regardless of their location or schedule.
Unlike traditional meetings where the loudest voices dominate, Loomio creates space for everyone to contribute thoughtfully. The platform supports asynchronous participation, meaning team members can engage with discussions and vote on proposals at times that work for them, making it ideal for distributed teams, community organizations, and democratic governance.
Key highlights of Loomio:
- Structured Discussions: Threaded conversations with context and clarity
- Multiple Decision Types: Proposals, polls, time polls, ranked choices, and more
- Inclusive Participation: Asynchronous engagement for diverse schedules
- Reply by Email: Participate without logging into the platform
- Subgroups: Organize large groups into manageable units
- Privacy Options: Public, secret, or closed group settings
- Integration Ready: Webhooks and API for workflow automation
- Mobile Friendly: Full-featured mobile experience
- Accessibility: Designed for inclusive access
- Open Source: AGPL licensed with active development
This guide walks through deploying Loomio on Klutch.sh using Docker, configuring the platform, and setting up for collaborative decision-making.
Why Deploy Loomio on Klutch.sh
Deploying Loomio on Klutch.sh provides several advantages:
Complete Control: Self-hosting ensures your discussions and decisions remain private within your infrastructure.
Persistent Storage: Attach persistent volumes for your database and files. Decision history and documents survive restarts.
HTTPS by Default: Klutch.sh provides automatic SSL certificates for secure communications.
GitHub Integration: Connect your configuration repository directly from GitHub for automatic deployments.
Custom Domains: Use your own domain for a professional, branded experience.
Scalable Resources: Allocate CPU and memory based on your group size and activity level.
Email Integration: Configure SMTP for notifications and reply-by-email functionality.
Always Available: Your decision-making platform remains accessible 24/7.
Prerequisites
Before deploying Loomio 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 concepts
- SMTP credentials for email notifications
- A domain name with DNS access for email configuration
- (Optional) MX record configuration for reply-by-email
Understanding Loomio Architecture
Loomio uses a Ruby on Rails architecture with multiple components:
Rails Application: The core application handles discussions, proposals, voting, and user management.
PostgreSQL Database: Stores all group data, discussions, decisions, and user information.
Redis: Manages background job queues and caching for performance.
Worker Processes: Handle background tasks like sending emails and processing notifications.
Live Update Server: Provides real-time updates for discussions using WebSockets.
Preparing Your Repository
To deploy Loomio on Klutch.sh, use the official loomio-deploy repository as a base.
Repository Structure
loomio-deploy/├── docker-compose.yml├── Dockerfile├── env.example└── .dockerignoreCreating the Dockerfile
Create a Dockerfile in the root of your repository:
FROM loomio/loomio:latest
# Set environment variablesENV RAILS_ENV=productionENV RAILS_LOG_TO_STDOUT=true
# Expose the web interface portEXPOSE 3000
# The base image includes the default entrypointCreating Docker Compose Configuration
Create a docker-compose.yml for reference:
version: '3.8'
services: loomio: image: loomio/loomio:latest container_name: loomio restart: unless-stopped ports: - "3000:3000" environment: - DATABASE_URL=${DATABASE_URL} - SECRET_KEY_BASE=${SECRET_KEY_BASE} - CANONICAL_HOST=${CANONICAL_HOST} - SMTP_SERVER=${SMTP_SERVER} - SMTP_PORT=${SMTP_PORT} - SMTP_USERNAME=${SMTP_USERNAME} - SMTP_PASSWORD=${SMTP_PASSWORD} - SMTP_DOMAIN=${SMTP_DOMAIN} - REPLY_HOSTNAME=${REPLY_HOSTNAME} volumes: - loomio_uploads:/loomio/public/system - loomio_files:/loomio/public/files depends_on: - db - redis
db: image: postgres:15 container_name: loomio_db restart: unless-stopped environment: - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - POSTGRES_DB=loomio_production volumes: - loomio_pgdata:/var/lib/postgresql/data
redis: image: redis:7 container_name: loomio_redis restart: unless-stopped
worker: image: loomio/loomio:latest container_name: loomio_worker restart: unless-stopped command: bundle exec rake jobs:work environment: - DATABASE_URL=${DATABASE_URL} - SECRET_KEY_BASE=${SECRET_KEY_BASE} depends_on: - db - redis
volumes: loomio_uploads: loomio_files: loomio_pgdata:Creating the .dockerignore File
Create a .dockerignore file:
.git.github*.mdLICENSE.gitignore*.log.DS_Store.env.env.localEnvironment Variables Reference
Loomio requires extensive configuration:
| Variable | Required | Description |
|---|---|---|
SECRET_KEY_BASE | Yes | Rails secret key (generate with openssl rand -hex 64) |
DATABASE_URL | Yes | PostgreSQL connection string |
CANONICAL_HOST | Yes | Public hostname for your Loomio instance |
SMTP_SERVER | Yes | SMTP server hostname |
SMTP_PORT | Yes | SMTP port (typically 587) |
SMTP_USERNAME | Yes | SMTP authentication username |
SMTP_PASSWORD | Yes | SMTP authentication password |
SMTP_DOMAIN | Yes | Domain for SMTP HELO |
REPLY_HOSTNAME | No | Hostname for reply-by-email |
REDIS_URL | No | Redis connection URL |
RAILS_ENV | No | Rails environment (production) |
Deploying Loomio on Klutch.sh
Once your repository is prepared, follow these steps to deploy:
- Use Klutch.sh’s database services
- Deploy PostgreSQL alongside Loomio
- Use an external managed PostgreSQL service
- Select HTTP as the traffic type
- Set the internal port to 3000
- Detect your Dockerfile automatically
- Build the container image
- Attach the persistent volumes
- Start the Loomio container
- Provision an HTTPS certificate
Generate Security Keys
Generate required secrets:
# Secret key baseopenssl rand -hex 64
# Database passwordopenssl rand -base64 24Save these securely for environment variables configuration.
Set Up Database
Loomio requires PostgreSQL. You can:
Push Your Repository to GitHub
Initialize your repository and push to GitHub:
git initgit add Dockerfile docker-compose.yml .dockerignoregit commit -m "Initial Loomio deployment configuration"git remote add origin https://github.com/yourusername/loomio-deploy.gitgit push -u origin mainCreate a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project. Give it a descriptive name like “loomio” or “decisions”.
Create a New App
Within your project, create a new app. Connect your GitHub account if you haven’t already, then select the repository containing your Loomio configuration.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
In the environment variables section, add:
| Variable | Value |
|---|---|
SECRET_KEY_BASE | Your generated 128-character hex string |
DATABASE_URL | postgresql://user:password@host:5432/loomio_production |
CANONICAL_HOST | your-loomio.klutch.sh |
SMTP_SERVER | Your SMTP server |
SMTP_PORT | 587 |
SMTP_USERNAME | Your SMTP username |
SMTP_PASSWORD | Your SMTP password |
SMTP_DOMAIN | Your domain |
Attach Persistent Volumes
Add persistent storage:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/loomio/public/system | 10 GB | Uploaded files and attachments |
/loomio/public/files | 10 GB | Document exports and downloads |
Deploy Your Application
Click Deploy to start the build process. Klutch.sh will:
Run Database Migrations
After first deployment, run migrations (check Klutch.sh’s console access):
bundle exec rake db:setupAccess Loomio
Once deployment completes, access your Loomio instance at https://your-app-name.klutch.sh.
Initial Setup
Creating Your First Group
After accessing Loomio:
- Sign Up: Create your admin account
- Create Group: Click Start a group
- Name and Describe: Give your group a meaningful name and description
- Set Privacy: Choose between open, closed, or secret
- Invite Members: Add initial members via email
Group Settings
Configure your group:
- Navigate to Group settings
- Set the group handle (URL slug)
- Configure member permissions
- Set up subgroups if needed
- Customize the group cover image
Decision-Making Features
Starting a Discussion
Create focused discussions:
- Click New thread
- Add a clear title
- Provide context in the description
- Tag relevant members
- Attach files if needed
Creating Proposals
Make decisions with proposals:
- Within a thread, click Start a proposal
- Choose the proposal type:
- Proposal: Yes/No/Abstain voting
- Poll: Multiple choice options
- Time poll: Find meeting times
- Ranked choice: Prioritize options
- Score poll: Rate options numerically
- Set the closing time
- Add a clear proposal statement
- Notify relevant members
Voting and Positions
Members can participate by:
- Voting: Select their position
- Stating reasons: Explain their choice
- Changing votes: Update positions as discussion evolves
- Abstaining: Explicitly choose not to decide
Outcomes
Document decisions:
- After voting closes, click Set outcome
- Summarize the decision
- List action items
- Assign responsible parties
- The outcome appears in the thread
Reply by Email
Configuring Email Reply
Enable participation without logging in:
- Set up MX records for a reply subdomain
- Configure
REPLY_HOSTNAMEenvironment variable - Ensure SMTP is properly configured
- Test with a sample discussion
How It Works
- Members receive email notifications
- They can reply directly to the email
- Their response appears in the discussion
- Votes can be cast via email commands
Subgroups and Organization
Creating Subgroups
Organize large organizations:
- Navigate to your main group
- Click New subgroup
- Name and configure the subgroup
- Set membership (inherit or separate)
- Invite subgroup members
Subgroup Use Cases
- Departments: Engineering, Marketing, Finance
- Projects: Specific initiatives
- Committees: Governance bodies
- Regions: Geographic divisions
Integrations
Webhook Integration
Connect to external services:
- Navigate to Group settings → Webhooks
- Add webhook URL
- Select events to trigger:
- New discussions
- Proposals started
- Votes cast
- Outcomes set
Slack Integration
Connect Loomio to Slack:
- Configure Slack webhook URL
- Map groups to Slack channels
- Receive notifications in Slack
- Start discussions from Slack
API Access
Programmatic access:
# Get discussionscurl -H "Authorization: Bearer TOKEN" \ https://your-loomio.klutch.sh/api/v1/discussions
# Create a discussioncurl -X POST \ -H "Authorization: Bearer TOKEN" \ -H "Content-Type: application/json" \ -d '{"discussion": {"title": "New Topic", "group_id": 1}}' \ https://your-loomio.klutch.sh/api/v1/discussionsProduction Best Practices
Security Recommendations
- Strong Secrets: Use complex values for SECRET_KEY_BASE
- Database Security: Secure PostgreSQL access
- Email Security: Use TLS for SMTP connections
- Access Control: Configure appropriate group permissions
Performance Optimization
- Redis Caching: Ensure Redis is properly configured
- Background Workers: Scale workers for email volume
- Database Indexes: Keep PostgreSQL optimized
- CDN: Consider CDN for static assets
Backup Strategy
Protect your decision history:
- Database Backups: Regular PostgreSQL backups
- File Backups: Back up uploaded files
- Configuration: Export group settings
- Automated Schedule: Daily backup routine
Troubleshooting Common Issues
Emails Not Sending
Symptoms: Users don’t receive notifications.
Solutions:
- Verify SMTP credentials
- Check SMTP server connectivity
- Review mail logs
- Test SMTP connection directly
Database Connection Issues
Symptoms: Application errors about database.
Solutions:
- Verify DATABASE_URL format
- Check PostgreSQL is running
- Review connection limits
- Test direct database connection
Live Updates Not Working
Symptoms: Need to refresh for new content.
Solutions:
- Check WebSocket configuration
- Review nginx/proxy settings
- Verify channels server is running
- Test WebSocket connection
Additional Resources
- Loomio GitHub Repository
- Loomio Deploy Repository
- Loomio Help Center
- Loomio Official Website
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
Conclusion
Deploying Loomio on Klutch.sh gives you a powerful platform for collaborative decision-making with complete control over your data. The combination of structured discussions, multiple voting methods, and asynchronous participation makes it ideal for distributed teams and democratic organizations.
With email integration, webhook support, and comprehensive API access, Loomio integrates seamlessly into existing workflows. The self-hosted approach ensures sensitive discussions and decisions remain within your infrastructure.
Whether you’re governing a cooperative, running a community organization, or making team decisions, Loomio on Klutch.sh provides the tools needed for inclusive, transparent decision-making.