Deploying Noosfero
Introduction
Noosfero is a free software web platform for social and solidarity economy networks, combining social networking features with content management capabilities. Developed initially for the Brazilian solidarity economy movement, Noosfero enables communities, organizations, and movements to create their own social networks and collaborative platforms.
Built with Ruby on Rails, Noosfero provides a flexible framework that supports multiple environments (communities) within a single installation. Each environment can have its own branding, plugins, and configuration, making it ideal for networks of organizations that need both autonomy and interconnection.
Key highlights of Noosfero:
- Multi-Environment Architecture: Host multiple independent networks on a single installation
- Social Networking: User profiles, friendships, communities, and messaging
- Content Management: Blog posts, articles, galleries, and custom pages
- E-Commerce: Product catalogs and solidarity economy marketplace features
- Community Tools: Forums, events, tasks, and collaborative workspaces
- Plugin Architecture: Extend functionality with community-developed plugins
- Theme System: Fully customizable appearance per environment
- Federation Ready: Connect with other Noosfero instances
- Multilingual: Support for multiple languages
- Open Source: Licensed under AGPL with active community development
This guide walks through deploying Noosfero on Klutch.sh using Docker.
Why Deploy Noosfero on Klutch.sh
Deploying Noosfero on Klutch.sh provides several advantages:
Simplified Deployment: Klutch.sh handles the Ruby on Rails deployment complexity automatically.
Persistent Storage: Attach persistent volumes for your database, uploaded files, and configurations.
HTTPS by Default: Automatic SSL certificates ensure secure access for all network participants.
GitHub Integration: Version-controlled deployments through your GitHub repository.
Scalable Resources: Allocate CPU and memory based on your community size and activity.
Environment Variable Management: Securely store database credentials and configuration.
Custom Domains: Use your own domain for your community platform.
Always-On Availability: Your social network remains accessible 24/7.
Prerequisites
Before deploying Noosfero on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your configuration
- Basic familiarity with Ruby on Rails applications
- A PostgreSQL database (can use a managed database service)
- (Optional) A custom domain for your Noosfero instance
Understanding Noosfero Architecture
Noosfero consists of several integrated components:
Rails Application: The core platform built on Ruby on Rails, handling all business logic and rendering.
PostgreSQL Database: Stores all user data, content, relationships, and configuration.
Background Jobs: Delayed Job workers for email notifications, indexing, and other async tasks.
Asset Pipeline: Manages CSS, JavaScript, and image assets.
Search Engine: Optional integration with Solr or Elasticsearch for enhanced search.
Cache Layer: Redis or Memcached for session storage and caching.
Deploying Noosfero on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 3000
- Access the container console
- Run
bundle exec rake db:create db:migrate - Create initial admin user
- Configure environment settings
- Enable desired plugins
- Customize themes
Create Your GitHub Repository
Create a new GitHub repository for your Noosfero deployment configuration.
Create the Dockerfile
Create a Dockerfile in your repository root:
FROM ruby:2.7-slim
# Install dependenciesRUN apt-get update && apt-get install -y \ build-essential \ libpq-dev \ nodejs \ npm \ imagemagick \ git \ curl \ && rm -rf /var/lib/apt/lists/*
# Install YarnRUN npm install -g yarn
# Set working directoryWORKDIR /app
# Clone NoosferoRUN git clone https://gitlab.com/noosfero/noosfero.git .
# Install Ruby dependenciesRUN bundle install --deployment --without development test
# Install JavaScript dependenciesRUN yarn install
# Precompile assetsRUN RAILS_ENV=production bundle exec rake assets:precompile
# Configure environmentENV RAILS_ENV=productionENV RAILS_LOG_TO_STDOUT=true
EXPOSE 3000
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project.
Create a New App
Within your project, create a new app and connect your GitHub repository.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Configure the following environment variables:
| Variable | Value |
|---|---|
DATABASE_URL | postgresql://user:pass@host/noosfero |
SECRET_KEY_BASE | Generate with rails secret |
RAILS_ENV | production |
NOOSFERO_DOMAIN | Your app domain |
Attach Persistent Volumes
Add persistent storage:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/app/public/uploads | 50 GB | User uploaded files |
/app/tmp | 5 GB | Temporary files |
/app/log | 5 GB | Application logs |
Deploy Your Application
Click Deploy to start the build process.
Run Database Migrations
After initial deployment, run database setup:
Configure Your Environment
Access the admin panel to:
Initial Configuration
Creating the First Environment
Set up your main network environment:
- Access the admin panel at
/admin - Navigate to Environments
- Configure the default environment or create a new one
- Set the environment name, description, and theme
User Registration Settings
Configure how users join your network:
- Go to Environment Settings
- Configure registration options
- Set up email validation requirements
- Define default user permissions
Enabling Plugins
Activate additional functionality:
- Navigate to Plugins management
- Enable desired plugins:
- Products: E-commerce features
- Events: Calendar and event management
- Blogs: Enhanced blogging
- Sub-organizations: Nested organization support
Building Your Community
Creating Organizations
Set up community organizations:
- Users can create communities or enterprises
- Organizations have their own profiles and content
- Members can have different roles and permissions
Content Types
Noosfero supports various content:
- Articles: Rich text content pages
- Blogs: Personal or organizational blogs
- Galleries: Image collections
- Files: Document uploads
- Events: Calendar entries
Solidarity Economy Features
For economic networks:
- Enable the Products plugin
- Create enterprise profiles
- Add product catalogs
- Enable consumption/production tracking
Production Best Practices
Performance Optimization
- Configure Redis for caching and sessions
- Enable asset compression
- Use a CDN for static assets
- Optimize database queries
Security Recommendations
- Use strong SECRET_KEY_BASE
- Enable HTTPS for all traffic
- Configure rate limiting
- Regular security updates
Backup Strategy
- Database Backups: Regular PostgreSQL dumps
- File Backups: Back up
/app/public/uploads - Configuration: Document environment settings
Troubleshooting Common Issues
Application Won’t Start
- Check database connection settings
- Verify SECRET_KEY_BASE is set
- Review deployment logs
- Ensure migrations ran successfully
Asset Issues
- Verify assets were precompiled
- Check public/assets directory
- Clear asset cache and recompile
Email Not Sending
- Configure SMTP settings
- Verify email credentials
- Check mail server connectivity
Additional Resources
Conclusion
Deploying Noosfero on Klutch.sh provides a powerful platform for building community networks and solidarity economy initiatives. The combination of social networking, content management, and economic features makes it ideal for organizations seeking to create their own digital spaces while maintaining control over their data and community governance.