Deploying Bludit
Bludit is a simple, fast, and flexible flat-file CMS (Content Management System) designed for creating blogs and websites without the complexity of traditional database-driven systems. Built with PHP and utilizing JSON for content storage, Bludit provides an elegant solution for bloggers, small businesses, and content creators who need a lightweight, easy-to-use platform. Whether you’re launching a personal blog, building a business website, or creating a documentation site, Bludit offers the simplicity and speed you need with complete control over your content.
Why Bludit?
Bludit stands out as the premier choice for simple, fast, and flexible content management with exceptional features:
- No Database Required: Content stored as JSON files, no database setup needed
- Flat-File Architecture: Simple file structure for easy backup and migration
- Lightning Fast: Minimal overhead for maximum performance
- Easy Installation: Quick setup in minutes without complex configuration
- Markdown Support: Create content with Markdown or HTML
- Theme System: Beautiful themes with easy customization
- Plugin System: Extend functionality with community plugins
- User Friendly: Intuitive admin interface for content management
- Multi-Language Support: Write and manage content in multiple languages
- SEO Friendly: Built-in SEO features for better search visibility
- Static Pages: Create both blog posts and static pages
- Drafts and Scheduling: Schedule posts for future publication
- Categories and Tags: Organize content with categories and tags
- Media Management: Easy image and file upload management
- Mobile Responsive: All themes include mobile responsiveness
- Backup Friendly: Easy backup and restore of JSON content files
- Open Source: MIT licensed with transparent codebase
- Community Plugins: Extend with SEO plugins, analytics, forms, and more
- Custom Domain Support: Full support for custom domains
- API Available: Programmatic access to content
Bludit is ideal for bloggers seeking simplicity, small business websites, documentation sites, personal portfolios, and anyone preferring flat-file storage over databases. With persistent storage on Klutch.sh, your blog content is permanently secure and accessible.
Prerequisites
Before deploying Bludit, ensure you have:
- A Klutch.sh account
- A GitHub repository with your Bludit deployment configuration
- Basic familiarity with Docker and Git
- A custom domain name (recommended for production)
- Sufficient storage for blog content and media (typically 5-20GB)
- Understanding of PHP and web server basics
Important Considerations
Deploying Bludit
Create a New Project
Log in to your Klutch.sh dashboard and create a new project for your Bludit deployment.
Prepare Your Repository
Create a GitHub repository with the following structure for your Bludit deployment:
bludit-deploy/├─ Dockerfile├─ .env.example├─ docker-entrypoint.sh├─ .gitignore└─ README.mdHere’s a Dockerfile for Bludit:
FROM php:8.2-apache# Install system dependenciesRUN apt-get update && apt-get install -y \git \curl \libpng-dev \libjpeg62-turbo-dev \libfreetype6-dev \libxml2-dev \libzip-dev \zip \unzip \&& rm -rf /var/lib/apt/lists/*# Install PHP extensionsRUN docker-php-ext-configure gd --with-freetype --with-jpeg && \docker-php-ext-install -j$(nproc) \gd \mbstring \dom \json \zip# Enable Apache rewrite moduleRUN a2enmod rewrite# Set working directoryWORKDIR /var/www/html# Clone Bludit repositoryRUN git clone https://github.com/bludit/bludit.git . && \git checkout master# Create necessary directoriesRUN mkdir -p /var/www/html/bl-content/pages \/var/www/html/bl-content/posts \/var/www/html/bl-content/databases \/var/www/html/bl-content/uploads \/var/www/data \/var/www/logs && \chmod -R 755 /var/www/html && \chown -R www-data:www-data /var/www/html# Copy Apache configurationCOPY apache-config.conf /etc/apache2/sites-available/000-default.confRUN a2ensite 000-default# Copy entrypoint scriptCOPY docker-entrypoint.sh /RUN chmod +x /docker-entrypoint.sh# Expose portEXPOSE 80# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \CMD curl -f http://localhost/ || exit 1# Run entrypointENTRYPOINT ["/docker-entrypoint.sh"]CMD ["apache2-foreground"]Create an
apache-config.conffile:<VirtualHost *:80>ServerAdmin admin@localhostDocumentRoot /var/www/htmlErrorLog /var/www/logs/error.logCustomLog /var/www/logs/access.log combined<Directory /var/www/html>Options Indexes FollowSymLinksAllowOverride AllRequire all granted</Directory><IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php?url=$1 [QSA,L]</IfModule></VirtualHost>Create a
docker-entrypoint.shfile:#!/bin/bashset -e# Create necessary directoriesmkdir -p /var/www/html/bl-content/pages \/var/www/html/bl-content/posts \/var/www/html/bl-content/databases \/var/www/html/bl-content/uploads \/var/www/data \/var/www/logs# Set proper permissionschmod -R 755 /var/www/htmlchown -R www-data:www-data /var/www/htmlchown -R www-data:www-data /var/www/datachown -R www-data:www-data /var/www/logs# Wait for any dependenciesecho "Bludit is starting..."if [ "$1" = "apache2-foreground" ]; then# Start Apacheexec apache2-foregroundelseexec "$@"fiCreate a
.env.examplefile:Terminal window # Bludit ConfigurationAPP_NAME=Bludit BlogAPP_DESCRIPTION=My Personal BlogAPP_URL=https://blog.yourdomain.comAPP_LANGUAGE=enAPP_TIMEZONE=UTC# Admin UserADMIN_USER=adminADMIN_PASSWORD=secure_password_hereADMIN_EMAIL=admin@yourdomain.com# Blog SettingsPOSTS_PER_PAGE=5ITEMS_PER_PAGE=10SHOW_HOME_PAGE=truePERMALINK_STRUCTURE=/:slug/# SecurityENABLE_COMMENTS=falseALLOW_ANONYMOUS_COMMENTS=false# SEO SettingsENABLE_SEO=trueHOMEPAGE_TITLE=Welcome to My BlogHOMEPAGE_DESCRIPTION=My personal blog and thoughts# PluginsENABLE_PLUGINS=trueDEFAULT_THEME=londinium# LoggingLOG_LEVEL=infoCommit and push to your GitHub repository:
Terminal window git initgit add .git commit -m "Initial Bludit deployment"git remote add origin https://github.com/yourusername/bludit-deploy.gitgit push -u origin mainCreate a New App
In the Klutch.sh dashboard:
- Click “Create New App”
- Select your GitHub repository containing the Dockerfile
- Choose the branch (typically
mainormaster) - Klutch.sh will automatically detect the Dockerfile in the root directory
Configure Environment Variables
Set up these essential environment variables in your Klutch.sh dashboard:
Variable Description Example APP_NAMEBlog/website name My BlogAPP_DESCRIPTIONSite description My thoughts and ideasAPP_URLYour blog domain https://blog.yourdomain.comAPP_LANGUAGEDefault language enAPP_TIMEZONESite timezone UTCADMIN_USERAdmin username adminADMIN_PASSWORDAdmin password secure_passwordADMIN_EMAILAdmin email address admin@yourdomain.comPOSTS_PER_PAGEPosts per page 5ENABLE_SEOEnable SEO features trueENABLE_COMMENTSAllow post comments falseDEFAULT_THEMEActive theme name londiniumENABLE_PLUGINSEnable plugin system trueLOG_LEVELLogging verbosity infoConfigure Persistent Storage
Bludit requires persistent storage for blog content and media files. Add persistent volumes:
Mount Path Description Recommended Size /var/www/html/bl-contentBlog posts, pages, and content 20GB /var/www/dataApplication data and backups 10GB /var/www/logsApache and application logs 5GB In the Klutch.sh dashboard:
- Navigate to your app settings
- Go to the “Volumes” section
- Click “Add Volume” for each mount path
- Set mount paths and sizes as specified above
Set Network Configuration
Configure your app’s network settings:
- Select traffic type: HTTP (Bludit uses standard web ports)
- Recommended internal port: 80 (as specified in Dockerfile)
- Klutch.sh will automatically handle HTTPS termination via reverse proxy
- Ensure ports 80 and 443 are accessible from your domain
Configure Custom Domain
Bludit works best with a custom domain for professional blogging:
- Navigate to your app’s “Domains” section in Klutch.sh
- Click “Add Custom Domain”
- Enter your domain (e.g.,
blog.yourdomain.com) - Configure DNS with a CNAME record to point to your Klutch.sh app
- Update
APP_URLenvironment variable to match your domain - Klutch.sh will automatically provision SSL certificates
Deploy Your App
- Review all settings and environment variables
- Verify all persistent volumes are properly configured
- Click “Deploy”
- Klutch.sh will build the Docker image and start your Bludit instance
- Wait for the deployment to complete (typically 5-10 minutes)
- Access your Bludit instance at your configured domain
- Log in with admin credentials to begin creating content
Initial Setup and Configuration
After deployment completes, access your Bludit instance to complete setup.
Accessing Bludit
Navigate to your domain: https://blog.yourdomain.com
Log in to the admin panel using admin credentials you configured.
Admin Panel Access
Access administration features:
- Click “Login” or visit
/admin/path - Enter admin username and password
- You’re now in the Bludit admin dashboard
- Configure site settings and create content
Creating Your First Blog Post
Start publishing content:
- In admin panel, click “New Post”
- Enter post title
- Write content in Markdown or HTML
- Add featured image (optional)
- Set category/tags
- Enable/disable comments
- Publish immediately or schedule for later
- Save and publish
Configuring Blog Settings
Customize your blog appearance and behavior:
- Navigate to “Settings” in admin panel
- Configure:
- Site title and description
- Site language and timezone
- Posts per page
- Permalink structure
- Homepage content
- Save settings
- Check “Advanced Settings” for more options
Managing Pages vs Posts
Understand content types:
- Blog Posts: Time-stamped content with categories/tags, appears in feed
- Static Pages: Timeless content like About, Contact, Privacy Policy
- Create pages for essential static content
- Use posts for blog-style time-based content
Selecting and Customizing Themes
Personalize your blog appearance:
- Navigate to “Themes” section
- Browse available themes
- Click to activate a theme
- Customize theme settings:
- Site colors and fonts
- Header and footer content
- Widget positioning
- Layout options
- Preview changes before publishing
Setting Up Blog Categories
Organize posts by topic:
- Go to “Categories” in admin
- Create categories for different topics:
- Technology
- Travel
- Personal
- Tutorial
- Assign posts to categories
- Categories appear in navigation and archives
Environment Variable Examples
Basic Configuration
APP_NAME=My BlogAPP_DESCRIPTION=My personal blogAPP_URL=https://blog.yourdomain.comAPP_LANGUAGE=enADMIN_USER=adminADMIN_PASSWORD=secure_passwordADMIN_EMAIL=admin@yourdomain.comComplete Production Configuration
# Application SettingsAPP_NAME=My Professional BlogAPP_DESCRIPTION=A blog about technology and web developmentAPP_URL=https://blog.yourdomain.comAPP_LANGUAGE=enAPP_TIMEZONE=America/New_York
# Admin User ConfigurationADMIN_USER=adminADMIN_PASSWORD=very_secure_password_32_charactersADMIN_EMAIL=admin@yourdomain.com
# Blog SettingsPOSTS_PER_PAGE=5ITEMS_PER_PAGE=15SHOW_HOME_PAGE=truePERMALINK_STRUCTURE=/:category/:slug/
# Content SettingsENABLE_COMMENTS=falseALLOW_ANONYMOUS_COMMENTS=falseMODERATE_COMMENTS=true
# SEO ConfigurationENABLE_SEO=trueHOMEPAGE_TITLE=Welcome to My Technology BlogHOMEPAGE_DESCRIPTION=Insights on web development, programming, and technology trendsGENERATE_SITEMAP=true
# Theme and PluginsDEFAULT_THEME=londiniumENABLE_PLUGINS=trueENABLE_THEME_CUSTOMIZATION=true
# SecurityENABLE_HTTPS_ONLY=trueCOOKIE_SECURE=trueCOOKIE_HTTPONLY=true
# LoggingLOG_LEVEL=infoLOG_TO_FILE=true
# Cache SettingsENABLE_CACHE=trueCACHE_TTL=3600Sample Code and Getting Started
PHP - Bludit Plugin Development
<?php// Example Bludit Plugin - Custom Analytics
class CustomAnalytics {
public static function init() { // Plugin initialization Global $plugins; $plugins['customAnalytics'] = __CLASS__; }
public function beforeSiteLoad() { // Code executed before site loads }
public function afterPageLoad() { // Code executed after page loads $this->trackPageView(); }
private function trackPageView() { // Track page view logic $pageTitle = $GLOBALS['page']->title(); $pageURL = $GLOBALS['page']->permalink();
// Store analytics data $analyticsFile = '/var/www/data/analytics.json';
if (!file_exists($analyticsFile)) { file_put_contents($analyticsFile, json_encode([])); }
$analytics = json_decode(file_get_contents($analyticsFile), true);
if (!isset($analytics[$pageURL])) { $analytics[$pageURL] = [ 'title' => $pageTitle, 'views' => 0, 'first_view' => date('Y-m-d H:i:s') ]; }
$analytics[$pageURL]['views']++; $analytics[$pageURL]['last_view'] = date('Y-m-d H:i:s');
file_put_contents($analyticsFile, json_encode($analytics, JSON_PRETTY_PRINT)); }
public function form() { return ''; }
public function save($values) { return true; }}
// Initialize pluginCustomAnalytics::init();JavaScript - Frontend Interaction
// Bludit Custom Theme - Enhanced Navigation
class BluditNavigation { constructor() { this.menu = document.querySelector('.site-navigation'); this.hamburger = document.querySelector('.hamburger'); this.mobileMenu = document.querySelector('.mobile-menu'); this.init(); }
init() { if (this.hamburger) { this.hamburger.addEventListener('click', () => this.toggleMenu()); }
// Highlight current page this.highlightCurrentPage();
// Add smooth scroll behavior this.addSmoothScroll(); }
toggleMenu() { if (this.mobileMenu) { this.mobileMenu.classList.toggle('active'); this.hamburger.classList.toggle('active'); } }
highlightCurrentPage() { const currentURL = window.location.pathname; const links = this.menu?.querySelectorAll('a');
if (links) { links.forEach(link => { if (link.href === currentURL || currentURL.includes(link.href)) { link.classList.add('active'); link.setAttribute('aria-current', 'page'); } }); } }
addSmoothScroll() { document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', (e) => { e.preventDefault(); const target = document.querySelector(anchor.getAttribute('href'));
if (target) { target.scrollIntoView({ behavior: 'smooth', block: 'start' }); } }); }); }
// Search functionality setupSearch() { const searchForm = document.querySelector('.search-form');
if (searchForm) { searchForm.addEventListener('submit', (e) => { e.preventDefault(); const query = searchForm.querySelector('input[name="query"]').value; this.performSearch(query); }); } }
performSearch(query) { // Implement search logic console.log('Searching for:', query); // Redirect to search results page window.location.href = `/search/?q=${encodeURIComponent(query)}`; }}
// Initialize when DOM is readydocument.addEventListener('DOMContentLoaded', () => { new BluditNavigation();});cURL - API Integration Examples
# Get Bludit site informationcurl -X GET https://blog.yourdomain.com/api/v1/pages \ -H "Content-Type: application/json"
# Get all postscurl -X GET https://blog.yourdomain.com/api/v1/posts \ -H "Content-Type: application/json"
# Get specific postcurl -X GET https://blog.yourdomain.com/api/v1/posts/{slug} \ -H "Content-Type: application/json"
# Get all pagescurl -X GET https://blog.yourdomain.com/api/v1/pages \ -H "Content-Type: application/json"
# Get site configuration (requires authentication)curl -X GET https://blog.yourdomain.com/api/v1/site \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_TOKEN"
# Create new post (requires authentication)curl -X POST https://blog.yourdomain.com/api/v1/posts \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -d '{ "title": "My New Blog Post", "content": "This is the post content in Markdown", "category": "technology", "tags": ["tech", "blog"], "published": true }'
# Update post (requires authentication)curl -X PUT https://blog.yourdomain.com/api/v1/posts/{slug} \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -d '{ "title": "Updated Title", "content": "Updated content" }'
# Delete post (requires authentication)curl -X DELETE https://blog.yourdomain.com/api/v1/posts/{slug} \ -H "Authorization: Bearer YOUR_API_TOKEN"Bash - Content Backup Script
#!/bin/bash
# Bludit Content Backup ScriptBACKUP_DIR="/backups/bludit"TIMESTAMP=$(date +%Y%m%d_%H%M%S)RETENTION_DAYS=30
# Create backup directorymkdir -p $BACKUP_DIR
echo "Starting Bludit backup..."
# Backup blog content (posts and pages)echo "Backing up blog content..."tar -czf $BACKUP_DIR/bludit_content_$TIMESTAMP.tar.gz \ /var/www/html/bl-content/posts \ /var/www/html/bl-content/pages \ /var/www/html/bl-content/databases
# Backup uploaded mediaecho "Backing up media files..."tar -czf $BACKUP_DIR/bludit_media_$TIMESTAMP.tar.gz \ /var/www/html/bl-content/uploads
# Backup theme and plugin configurationecho "Backing up theme and plugin configs..."tar -czf $BACKUP_DIR/bludit_config_$TIMESTAMP.tar.gz \ /var/www/html/bl-content/databases
# Backup logsecho "Backing up logs..."tar -czf $BACKUP_DIR/bludit_logs_$TIMESTAMP.tar.gz \ /var/www/logs
# Cleanup old backupsecho "Cleaning up old backups..."find $BACKUP_DIR -name "bludit_*" -mtime +$RETENTION_DAYS -delete
# Backup summaryecho "Backup completed: $TIMESTAMP"echo "Backup files:"ls -lh $BACKUP_DIR | tail -10
# Optional: Upload to cloud storage (S3 example)# aws s3 cp $BACKUP_DIR/bludit_content_$TIMESTAMP.tar.gz s3://your-bucket/backups/# aws s3 cp $BACKUP_DIR/bludit_media_$TIMESTAMP.tar.gz s3://your-bucket/backups/# aws s3 cp $BACKUP_DIR/bludit_config_$TIMESTAMP.tar.gz s3://your-bucket/backups/Blog Content Management
Writing Blog Posts Effectively
Create engaging content:
- Clear Titles: Use descriptive, SEO-friendly titles
- Introduction: Hook readers with strong opening paragraph
- Structure: Use headings, paragraphs, lists for readability
- Images: Add featured images and inline images
- Links: Link to related posts and external resources
- Categories: Assign to relevant categories
- Tags: Use consistent tags for filtering
- Meta Description: Write engaging meta descriptions
Markdown Formatting Guide
# Main Heading (H1)## Secondary Heading (H2)### Tertiary Heading (H3)
This is a paragraph with **bold text** and *italic text*.
- Bullet point 1- Bullet point 2 - Nested bullet point
1. Numbered item2. Another item
<a href="https://example.com" target="_blank" rel="noopener noreferrer">Link text</a>

> This is a blockquote> It can span multiple lines
\`\`\`Code block\`\`\`
| Column 1 | Column 2 ||----------|----------|| Data 1 | Data 2 |Publishing Schedule
Manage publication timing:
- Write post in draft status
- Set publication date and time
- Bludit automatically publishes at scheduled time
- Schedule multiple posts in advance
- Review scheduled posts in calendar view
Search Engine Optimization
SEO Best Practices
Optimize for search engines:
- Titles: Use keywords in post titles (50-60 characters)
- Meta Descriptions: Write compelling descriptions (150-160 characters)
- Headers: Use H2 and H3 headers for structure
- Keywords: Include target keywords naturally throughout content
- Links: Link to related posts and authoritative sources
- Images: Use descriptive alt text for all images
- URL Slugs: Keep URLs short and keyword-relevant
- Categories: Organize content in logical categories
- Sitemap: Enable automatic sitemap generation
- Robots.txt: Configure crawling rules
Enabling SEO Features
Configure SEO settings:
- Navigate to “Settings” → “SEO”
- Enable SEO features
- Configure:
- Site title and description
- Homepage title and description
- Permalink structure
- Sitemap generation
- Install SEO plugins if available
- Test with SEO tools
Theme Customization
Theme Selection
Choose from available themes:
- Navigate to “Themes” in admin
- Browse theme gallery
- Preview themes
- Activate preferred theme
- Customize theme colors and fonts
Custom Theme Development
Create custom themes:
- Create theme directory in
/bl-themes/ - Create required files:
metadata.json- Theme informationindex.php- Main templatecss/- Stylesheetsjs/- JavaScript files
- Use Bludit template tags for content
- Test in development environment
- Deploy to Bludit instance
Comment Management
Moderating Comments
If comments enabled:
- Navigate to “Comments” in admin
- Review pending comments
- Approve or reject comments
- Edit comments if necessary
- Delete spam or inappropriate comments
- Configure comment notifications
Disabling Comments
To disable comments:
- Go to “Settings”
- Disable “Allow Comments”
- Existing comments remain visible
- No new comments can be posted
- Update post settings to hide comment forms
Backup and Recovery
Regular Backups
Implement backup strategy:
- Backup content files daily
- Backup media files weekly
- Backup theme/plugin configuration
- Store backups in multiple locations
- Test restore procedures regularly
Restoring from Backup
Restore previous content:
- Access backup files
- Extract backup archive
- Replace content directory with backup
- Verify all posts and pages are restored
- Test website functionality
Monitoring and Performance
Website Performance
Monitor blog performance:
- Check page load times
- Monitor database file sizes
- Clean up old uploaded media
- Optimize images for web
- Enable caching if available
- Monitor server resources
Logging and Monitoring
Track activity:
- Review Apache access logs
- Monitor error logs
- Check plugin activity logs
- Review failed login attempts
- Monitor disk usage
Troubleshooting
Common Issues and Solutions
Issue: Cannot access admin panel
Solutions:
- Verify admin credentials
- Check file permissions on directories
- Clear browser cache and cookies
- Check Apache/PHP error logs
- Restart Bludit container
Issue: Images not uploading
Troubleshooting:
- Verify write permissions on uploads directory
- Check file size limits
- Verify supported image formats
- Check disk space availability
- Review upload logs
Issue: Posts not appearing on site
Solutions:
- Verify post is published (not draft)
- Check post publication date/time
- Verify post category is not hidden
- Clear cache if enabled
- Check browser cache
Issue: Theme not displaying correctly
Solutions:
- Clear browser cache
- Disable custom CSS temporarily
- Switch to default theme
- Check theme file permissions
- Review PHP error logs
Updating Bludit
To update Bludit to a newer version:
- Read the release notes and changelog
- Backup all content before updating
- Update your Dockerfile:
RUN git checkout latest-version
- Commit and push to GitHub
- Klutch.sh will automatically rebuild
- Test all features after upgrade
- Verify posts, pages, and media are intact
- Monitor logs for any issues
Use Cases
Personal Blog
- Share thoughts and ideas
- Build personal brand
- Connect with readers
- Document learning journey
Business Blog
- Share company updates
- Publish industry insights
- Drive traffic to website
- Build authority in field
Documentation Site
- Technical documentation
- Knowledge base
- User guides and tutorials
- FAQ and help articles
Portfolio Website
- Showcase work and projects
- Share case studies
- Display portfolio items
- Professional presence
Additional Resources
- Bludit GitHub Repository - Source code and community contributions
- Bludit Official Documentation - Complete guides and tutorials
- Bludit Official Website - Project information and news
- Bludit Plugin Marketplace - Community plugins and extensions
- Bludit Theme Gallery - Available themes for customization
- Bludit Community Forum - Support and community discussions
- Bludit Discord Community - Real-time community chat
- Klutch.sh Getting Started Guide
- Klutch.sh Volumes Documentation
- Klutch.sh Custom Domains Guide
Conclusion
Deploying Bludit on Klutch.sh provides you with a simple, fast, and flexible blogging platform that maintains complete control over your content. With no database requirements, flat-file architecture, beautiful themes, plugin extensibility, SEO-friendly features, and intuitive content management, Bludit enables you to create and manage your blog effortlessly. Klutch.sh’s managed infrastructure ensures your blog is always available, secure, and performant, allowing you to focus on creating great content.
Start hosting your personal blog or business website today by deploying Bludit on Klutch.sh and experience the simplicity and speed of flat-file blogging.