MCPSERV.CLUB
Haven

Haven

Self-Hosted

Private, ad‑free blogging for friends and family

Active(87)
733stars
0views
Updated 8 days ago

Overview

Discover what makes Haven powerful

**Haven** is a lightweight, privacy‑centric blogging platform written in **Ruby on Rails**. It exposes a web interface for authoring Markdown posts, managing user accounts, and customizing appearance via CSS or custom fonts. The core idea is to give developers a self‑hosted, low‑bandwidth solution that can run on anything from a Raspberry Pi to a cloud VM. Unlike commercial blogs, Haven intentionally rejects self‑signups and third‑party tracking, making it ideal for personal or family content.

Private RSS

Media Handling

No JavaScript Frameworks

Custom CSS / Fonts

Overview

Haven is a lightweight, privacy‑centric blogging platform written in Ruby on Rails. It exposes a web interface for authoring Markdown posts, managing user accounts, and customizing appearance via CSS or custom fonts. The core idea is to give developers a self‑hosted, low‑bandwidth solution that can run on anything from a Raspberry Pi to a cloud VM. Unlike commercial blogs, Haven intentionally rejects self‑signups and third‑party tracking, making it ideal for personal or family content.

Key Features

  • Private RSS: Each user can generate a secure RSS feed that only authorized readers consume. The built‑in reader lets you follow friends’ feeds without exposing them to public search engines.
  • Media Handling: Images, videos, and audio uploads are automatically downscaled or transcoded to reduce bandwidth. No external CDN is required unless you choose to add one.
  • No JavaScript Frameworks: The UI relies on vanilla JS and server‑side rendering, keeping the footprint small (≈ 50 KB) and making it accessible on low‑end devices or slow networks.
  • Custom CSS / Fonts: A simple admin panel allows you to override the default theme with arbitrary stylesheets, giving full control over look and feel.
  • Extensibility: The application exposes a RESTful API for posts, users, and feeds. Webhooks can be added via the config/webhook.yml file to notify external services on events such as post creation or user addition.

Technical Stack

LayerTechnology
FrameworkRuby on Rails 7 (ActionCable for real‑time updates)
DatabasePostgreSQL (production) or SQLite3 (development / demos)
Background JobsSidekiq + Redis for media processing and email notifications
Web ServerPuma (default) behind Nginx or Apache as a reverse proxy
ContainerizationDockerfile and docker‑compose for local development; Helm charts available via KubeSail
DeploymentCloud‑agnostic scripts (deploy-aws.rb, cleanup-aws.rb) that provision EC2, RDS, and ACM certificates

The absence of heavy JavaScript frameworks means the Rails asset pipeline (Webpacker) is only used for optional admin scripts; most pages are served as pure HTML/CSS.

Core Capabilities & APIs

  • REST API: /api/v1/posts, /api/v1/users with JSON payloads. Supports pagination, filtering by tags, and full‑text search via PostgreSQL tsvector.
  • Webhooks: Configurable endpoints triggered on events (post.created, user.invited). Payloads are signed with HMAC for security.
  • RSS/Atom Feeds: GET /feeds/:user_id.atom or .rss. Supports Basic Auth for private feeds.
  • Markdown Rendering: Uses Redcarpet with a custom renderer that sanitizes HTML and embeds media links.
  • Image Proxy: All uploaded images are served through a proxy that resizes on demand (via mini_magick) to the requested dimensions, ensuring consistent bandwidth usage.

Deployment & Infrastructure

Haven is designed for self‑hosting but offers multiple deployment pathways:

  • Docker Compose: A single docker-compose.yml spins up Rails, PostgreSQL, Redis, and Nginx. Ideal for local or home‑server use.
  • Kubernetes: A Helm chart is bundled with the repo; KubeSail provides a pre‑configured template that manages secrets and scaling automatically.
  • AWS: The deploy-aws.rb script provisions an EC2 instance, RDS PostgreSQL, and ACM certificate. It also sets up a CloudWatch log group for monitoring.
  • PikaPods / Heroku: Quick‑start options that abstract away the underlying infrastructure, though Heroku’s free tier is now deprecated.

Scalability is handled by horizontally scaling Sidekiq workers and the Rails app behind a load balancer. For media storage, you can swap out local disk for an S3 bucket via the aws-sdk-s3 gem, preserving the same API surface.

Integration & Extensibility

  • Plugins: While Haven does not ship a formal plugin system, developers can fork the repo and add custom controllers or background jobs. The modular Rails structure makes it straightforward to inject new services.
  • Third‑Party Auth: OAuth2 providers (Google, GitHub) can be integrated via omniauth to replace the native auth flow if desired.
  • Custom Webhooks: By editing config/webhook.yml, you can hook into any external service (e.g., Slack, Mattermost) to receive real‑time updates.
  • Theme Engine: The app/views/layouts/application.html.erb template loads a user‑supplied CSS file, enabling dynamic theming without code changes.

Developer Experience

  • Configuration: Environment variables control everything from database URLs to email SMTP credentials. The config/initializers folder contains clear documentation for each setting.
  • Documentation: A comprehensive README.md, API reference, and deployment guides are included. The codebase follows Rails conventions, making onboarding quick for seasoned Ruby developers.
  • Community & Support: Hosted on GitHub under the MIT license, issues and pull requests are actively managed. The project’s lightweight nature means there is minimal maintenance overhead compared to larger CMSs.

Use Cases

ScenarioWhy Haven?
Family Photo BlogPrivate RSS feeds, no spam signup

Open SourceReady to get started?

Join the community and start self-hosting Haven today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
MIT
Stars
733
Technical Specs
Pricing
Open Source
Database
PostgreSQL
Docker
Dockerfile
Supported OS
LinuxmacOSDocker
Author
havenweb
havenweb
Last Updated
8 days ago