Skip to content

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

    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 dependencies
    RUN apt-get update && apt-get install -y \
    build-essential \
    libpq-dev \
    nodejs \
    npm \
    imagemagick \
    git \
    curl \
    && rm -rf /var/lib/apt/lists/*
    # Install Yarn
    RUN npm install -g yarn
    # Set working directory
    WORKDIR /app
    # Clone Noosfero
    RUN git clone https://gitlab.com/noosfero/noosfero.git .
    # Install Ruby dependencies
    RUN bundle install --deployment --without development test
    # Install JavaScript dependencies
    RUN yarn install
    # Precompile assets
    RUN RAILS_ENV=production bundle exec rake assets:precompile
    # Configure environment
    ENV RAILS_ENV=production
    ENV 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:

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

    Set Environment Variables

    Configure the following environment variables:

    VariableValue
    DATABASE_URLpostgresql://user:pass@host/noosfero
    SECRET_KEY_BASEGenerate with rails secret
    RAILS_ENVproduction
    NOOSFERO_DOMAINYour app domain

    Attach Persistent Volumes

    Add persistent storage:

    Mount PathRecommended SizePurpose
    /app/public/uploads50 GBUser uploaded files
    /app/tmp5 GBTemporary files
    /app/log5 GBApplication logs

    Deploy Your Application

    Click Deploy to start the build process.

    Run Database Migrations

    After initial deployment, run database setup:

    1. Access the container console
    2. Run bundle exec rake db:create db:migrate
    3. Create initial admin user

    Configure Your Environment

    Access the admin panel to:

    1. Configure environment settings
    2. Enable desired plugins
    3. Customize themes

Initial Configuration

Creating the First Environment

Set up your main network environment:

  1. Access the admin panel at /admin
  2. Navigate to Environments
  3. Configure the default environment or create a new one
  4. Set the environment name, description, and theme

User Registration Settings

Configure how users join your network:

  1. Go to Environment Settings
  2. Configure registration options
  3. Set up email validation requirements
  4. Define default user permissions

Enabling Plugins

Activate additional functionality:

  1. Navigate to Plugins management
  2. 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:

  1. Users can create communities or enterprises
  2. Organizations have their own profiles and content
  3. 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:

  1. Enable the Products plugin
  2. Create enterprise profiles
  3. Add product catalogs
  4. 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

  1. Database Backups: Regular PostgreSQL dumps
  2. File Backups: Back up /app/public/uploads
  3. 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.