Skip to content

Deploying Haven

Introduction

Haven is a private, self-hosted blogging system designed with privacy as the top priority. Unlike traditional blogging platforms, Haven has no JavaScript frameworks, no ads, no trackers, and no self-signup for users. This means only people you explicitly invite can access your blog, making it perfect for family updates, private journals, or sharing with close friends.

Built with Ruby on Rails, Haven offers a clean web interface for writing posts with Markdown and live preview support. It includes a built-in RSS reader so you can follow other blogs, and generates private RSS feeds for your readers to follow you without needing accounts. Haven supports media uploads for images, videos, and audio, making it a complete private publishing solution.

Key highlights of Haven:

  • Privacy First: No trackers, no analytics, no JavaScript frameworks
  • Invite Only: No public signup - you control who has access
  • Markdown Editing: Write with Markdown and see live preview
  • Media Support: Upload and embed images, videos, and audio
  • Built-in RSS Reader: Follow your favorite blogs from within Haven
  • Private RSS Feeds: Share posts via RSS without requiring accounts
  • Simple Design: Clean, distraction-free reading and writing experience
  • Self-Hosted: Full control over your data

This guide walks through deploying Haven on Klutch.sh using Docker, setting up user accounts, and configuring your private blog.

Prerequisites

Before deploying Haven on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your Haven configuration
  • Basic familiarity with Docker and containerization concepts
  • (Optional) A custom domain for your blog

Preparing Your Repository

Create a GitHub repository with the following structure:

haven-deploy/
├── Dockerfile
├── .dockerignore
└── README.md

Creating the Dockerfile

Create a Dockerfile using the official Haven image:

FROM ghcr.io/havenweb/haven:latest
# Environment variables for initial setup
ENV HAVEN_USER_EMAIL=${HAVEN_USER_EMAIL}
ENV HAVEN_USER_PASS=${HAVEN_USER_PASS}
ENV SECRET_KEY_BASE=${SECRET_KEY_BASE}
ENV RAILS_ENV=production
# Database configuration (SQLite by default)
ENV DATABASE_URL=${DATABASE_URL:-sqlite3:///data/haven.db}
# Create data directory
RUN mkdir -p /data
# Expose the application port
EXPOSE 3000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1

Advanced Dockerfile with PostgreSQL

For production with PostgreSQL:

FROM ghcr.io/havenweb/haven:latest
ENV HAVEN_USER_EMAIL=${HAVEN_USER_EMAIL}
ENV HAVEN_USER_PASS=${HAVEN_USER_PASS}
ENV SECRET_KEY_BASE=${SECRET_KEY_BASE}
ENV RAILS_ENV=production
ENV DATABASE_URL=${DATABASE_URL}
# Optional: SMTP configuration for email notifications
ENV SMTP_ADDRESS=${SMTP_ADDRESS}
ENV SMTP_PORT=${SMTP_PORT:-587}
ENV SMTP_USERNAME=${SMTP_USERNAME}
ENV SMTP_PASSWORD=${SMTP_PASSWORD}
ENV SMTP_DOMAIN=${SMTP_DOMAIN}
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1

Environment Variables Reference

VariableRequiredDescription
HAVEN_USER_EMAILYesInitial admin user email
HAVEN_USER_PASSYesInitial admin user password
SECRET_KEY_BASEYesRails secret key (generate with rails secret)
DATABASE_URLNoDatabase connection URL (SQLite default)
SMTP_ADDRESSNoSMTP server hostname
SMTP_PORTNoSMTP server port (default: 587)
SMTP_USERNAMENoSMTP username
SMTP_PASSWORDNoSMTP password
SMTP_DOMAINNoSMTP domain for HELO

Deploying Haven on Klutch.sh

    Generate Secret Key

    Generate a secure secret key for Rails:

    Terminal window
    openssl rand -hex 64

    Save this value for the environment variables configuration.

    Push Your Repository to GitHub

    Terminal window
    git init
    git add Dockerfile .dockerignore README.md
    git commit -m "Initial Haven deployment configuration"
    git remote add origin https://github.com/yourusername/haven-deploy.git
    git push -u origin main

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project named “haven-blog” or “private-blog”.

    Create a New App

    Within your project, create a new app. Connect your GitHub account and select your Haven repository.

    Configure HTTP Traffic

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

    Set Environment Variables

    Configure the following environment variables:

    VariableValue
    HAVEN_USER_EMAILYour admin email address
    HAVEN_USER_PASSA secure password for your account
    SECRET_KEY_BASEYour generated 128-character hex key
    RAILS_ENVproduction

    Attach Persistent Volumes

    Mount PathRecommended SizePurpose
    /data10 GBSQLite database and uploads
    /app/public/uploads20 GBMedia file storage

    Deploy Your Application

    Click Deploy to start the build process. Klutch.sh will build the container, attach volumes, and start Haven with HTTPS enabled.

    Access Haven

    Once deployment completes, access your Haven blog at https://your-app-name.klutch.sh. Log in with your configured email and password.

Using Haven

Writing Your First Post

  1. Log in to your Haven instance
  2. Click New Post from the dashboard
  3. Write your content using Markdown
  4. Preview your post in real-time
  5. Click Publish when ready

Markdown Features

Haven supports standard Markdown plus:

  • Headers and text formatting
  • Code blocks with syntax highlighting
  • Links and images
  • Lists (ordered and unordered)
  • Blockquotes
  • Tables

Uploading Media

  1. Click the media button in the editor
  2. Select files to upload (images, videos, audio)
  3. Haven generates embed code automatically
  4. Insert media into your post

Managing Users

Haven is invite-only by design:

  1. Navigate to Settings > Users
  2. Click Invite User
  3. Enter their email address
  4. They receive an invitation link to create an account

Using the RSS Reader

  1. Navigate to Subscriptions
  2. Click Add Subscription
  3. Enter the RSS feed URL
  4. New posts appear in your reader

Sharing Via RSS

Haven generates private RSS feeds for your readers:

  1. Go to Settings > Feeds
  2. Generate a new private feed URL
  3. Share with friends and family
  4. They can follow without an account

Privacy Features

No Tracking

Haven includes:

  • No analytics or tracking scripts
  • No third-party JavaScript
  • No external fonts or resources
  • No cookies beyond session management

Access Control

  • All content requires authentication
  • No public pages or search indexing
  • Invitation-only user registration
  • Private RSS feeds with unique tokens

Troubleshooting

Cannot Log In

  • Verify email and password are correct
  • Check that initial user was created properly
  • Review application logs for authentication errors

Media Upload Fails

  • Check available storage space
  • Verify upload directory permissions
  • Ensure file size is within limits

Database Errors

  • Verify persistent volume is mounted
  • Check database connection URL
  • Ensure SECRET_KEY_BASE is consistent

Additional Resources

Conclusion

Deploying Haven on Klutch.sh provides a truly private blogging platform where you control who can access your content. The combination of Haven’s privacy-first design and Klutch.sh’s managed infrastructure means you can share personal updates with family and friends without worrying about data harvesting or unwanted visibility. With Markdown editing, media support, and built-in RSS features, Haven offers everything you need for private, intimate blogging.