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.mdCreating the Dockerfile
Create a Dockerfile using the official Haven image:
FROM ghcr.io/havenweb/haven:latest
# Environment variables for initial setupENV 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 directoryRUN mkdir -p /data
# Expose the application portEXPOSE 3000
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ CMD curl -f http://localhost:3000/health || exit 1Advanced 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=productionENV DATABASE_URL=${DATABASE_URL}
# Optional: SMTP configuration for email notificationsENV 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 1Environment Variables Reference
| Variable | Required | Description |
|---|---|---|
HAVEN_USER_EMAIL | Yes | Initial admin user email |
HAVEN_USER_PASS | Yes | Initial admin user password |
SECRET_KEY_BASE | Yes | Rails secret key (generate with rails secret) |
DATABASE_URL | No | Database connection URL (SQLite default) |
SMTP_ADDRESS | No | SMTP server hostname |
SMTP_PORT | No | SMTP server port (default: 587) |
SMTP_USERNAME | No | SMTP username |
SMTP_PASSWORD | No | SMTP password |
SMTP_DOMAIN | No | SMTP domain for HELO |
Deploying Haven on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 3000
Generate Secret Key
Generate a secure secret key for Rails:
openssl rand -hex 64Save this value for the environment variables configuration.
Push Your Repository to GitHub
git initgit add Dockerfile .dockerignore README.mdgit commit -m "Initial Haven deployment configuration"git remote add origin https://github.com/yourusername/haven-deploy.gitgit push -u origin mainCreate 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
Set Environment Variables
Configure the following environment variables:
| Variable | Value |
|---|---|
HAVEN_USER_EMAIL | Your admin email address |
HAVEN_USER_PASS | A secure password for your account |
SECRET_KEY_BASE | Your generated 128-character hex key |
RAILS_ENV | production |
Attach Persistent Volumes
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/data | 10 GB | SQLite database and uploads |
/app/public/uploads | 20 GB | Media 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
- Log in to your Haven instance
- Click New Post from the dashboard
- Write your content using Markdown
- Preview your post in real-time
- 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
- Click the media button in the editor
- Select files to upload (images, videos, audio)
- Haven generates embed code automatically
- Insert media into your post
Managing Users
Haven is invite-only by design:
- Navigate to Settings > Users
- Click Invite User
- Enter their email address
- They receive an invitation link to create an account
Using the RSS Reader
- Navigate to Subscriptions
- Click Add Subscription
- Enter the RSS feed URL
- New posts appear in your reader
Sharing Via RSS
Haven generates private RSS feeds for your readers:
- Go to Settings > Feeds
- Generate a new private feed URL
- Share with friends and family
- 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
- Haven GitHub Repository
- Haven Website
- Markdown Guide
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
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.