Skip to content

Deploying Chyrp Lite

Chyrp Lite is an ultra-lightweight, open-source blogging engine written in PHP that prioritizes simplicity, performance, and web standards. With a minimal codebase and zero bloat, Chyrp Lite makes it possible to host a beautiful, fully-featured blog on your own web server with minimal fuss. Whether you want a traditional blog, a tumbleblog with multimedia content, or a general-purpose web publishing platform with blogging features, Chyrp Lite provides the flexibility and power you need. The platform features responsive HTML5 design, comprehensive ARIA labeling for accessibility, a powerful extension system with Feathers and Modules, Twig template engine support for custom themes, and comprehensive rights management for users and visitors.

This comprehensive guide walks through deploying Chyrp Lite to Klutch.sh using a Dockerfile for reliable, containerized deployment. You’ll learn how to set up Chyrp Lite with a database backend, create a production-ready Dockerfile, configure environment variables, set up persistent storage for uploads and content, customize themes and modules, implement security best practices, optimize performance, configure custom domains, set up monitoring and logging, and troubleshoot common issues. By the end of this guide, you’ll have a production-ready Chyrp Lite blog running on Klutch.sh’s global infrastructure with automatic HTTPS, optimized performance, and reliable hosting.

Prerequisites

  • PHP 8.1+ with required extensions (Session, JSON, Ctype, Filter, libxml, SimpleXML, Multibyte String, PDO, cURL)
  • Database: MySQL 5.7+, PostgreSQL 10+, or SQLite 3+ (MySQL 8.0+ recommended for production)
  • Git installed locally and a GitHub account (Klutch.sh uses GitHub as the only git source)
  • Klutch.sh account with access to the dashboard at klutch.sh/app
  • Docker installed locally for testing Dockerfiles (optional but recommended)
  • Text editor or IDE for code editing (VS Code recommended)
  • Basic knowledge of PHP, databases, and Linux command line

Getting Started: Download and Prepare Chyrp Lite

1. Download Chyrp Lite

Download the latest release of Chyrp Lite from GitHub:

Terminal window
# Download the latest release
curl -L https://github.com/xenocrat/chyrp-lite/releases/latest/download/chyrp-lite.zip -o chyrp-lite.zip
# Extract the archive
unzip chyrp-lite.zip
cd chyrp-lite

Or clone the repository directly:

Terminal window
git clone https://github.com/xenocrat/chyrp-lite.git
cd chyrp-lite

2. Project Structure

A typical Chyrp Lite installation structure looks like:

chyrp-lite/
├── admin/
│ ├── modules.php
│ ├── themes.php
│ ├── users.php
│ └── ...
├── ajax/
│ ├── search.php
│ └── ...
├── feathers/
│ ├── text/
│ ├── photo/
│ ├── quote/
│ ├── link/
│ ├── video/
│ ├── audio/
│ └── uploader/
├── modules/
│ ├── comments/
│ ├── tags/
│ ├── likes/
│ ├── categorize/
│ └── ...
├── themes/
│ ├── blossom/
│ ├── sparrow/
│ ├── topaz/
│ ├── umbra/
│ └── virgula/
├── includes/
│ ├── config.json.php (created during installation)
│ └── ...
├── uploads/
│ └── (persistent storage for media)
├── tools/
├── index.php
├── install.php
├── upgrade.php
├── Dockerfile
├── docker-compose.yaml
└── entrypoint.sh

3. Initialize Git Repository

Initialize a Git repository for version control:

Terminal window
git init
git add .
git commit -m "Initial Chyrp Lite setup"
git branch -M main
git remote add origin git@github.com:YOUR_USERNAME/YOUR_REPO.git
git push -u origin main

4. Create a .dockerignore File

Create a .dockerignore file to exclude unnecessary files from the Docker build context:

.git
.gitignore
.env.local
node_modules
*.log
.DS_Store
.vscode
.idea

5. Create Environment Configuration

Chyrp Lite uses a includes/config.json.php file for configuration. This file is created during installation. For deployment, you’ll configure this through environment variables.

Create a .env.example file to document environment variables:

# Database Configuration
DB_TYPE=mysql
DB_HOST=db.example.com
DB_PORT=3306
DB_NAME=chyrp_lite
DB_USER=chyrp_user
DB_PASS=secure_password
# Site Configuration
SITE_URL=https://example-app.klutch.sh
SITE_NAME=My Blog
# Timezone
TIMEZONE=UTC
# PHP Settings
PHP_MEMORY_LIMIT=256M
PHP_MAX_UPLOAD_SIZE=20M

6. Understand Chyrp Lite Features

Feathers (Content Types):

  • Text: Write textual blog entries
  • Photo: Upload images
  • Quote: Publish quotations
  • Link: Link to external websites
  • Video: Upload video files
  • Audio: Upload audio files
  • Uploader: Upload multiple files simultaneously

Modules (Extensions):

  • Cacher: Cache blog pages for reduced server load
  • Categorize: Organize entries by category
  • Tags: Add searchable tags to entries
  • Mentionable: Register webmentions from other blogs
  • Comments: Comprehensive comments system
  • Likes: Allow visitors to show appreciation
  • Read More: Excerpt long entries on blog index
  • Rights: Set attribution and copyright information
  • Cascade: AJAX-powered infinite scrolling
  • Lightbox: On-page image viewer with protection
  • Sitemap: XML sitemap for search engines
  • Highlighter: Syntax highlighting for code
  • Post Views: Track view counts for entries

Creating a Dockerfile for Chyrp Lite

Create a production-ready Dockerfile in the root of your Chyrp Lite repository:

# === Build Stage (if needed for asset compilation) ===
FROM php:8.2-fpm-alpine AS base
# Install system dependencies
RUN apk add --no-cache \
nginx \
curl \
git \
zip \
unzip \
oniguruma-dev \
libxml2-dev \
sqlite-dev \
postgresql-dev \
mysql-client \
&& rm -rf /var/cache/apk/*
# Install PHP extensions
RUN docker-php-ext-install \
pdo \
pdo_mysql \
pdo_sqlite \
pdo_pgsql \
mbstring \
ctype \
filter \
simplexml \
curl \
session
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# === Production Stage ===
FROM base AS production
WORKDIR /app
# Copy application files
COPY . /app
# Create necessary directories with proper permissions
RUN mkdir -p /app/uploads /app/includes \
&& chown -R nobody:nobody /app \
&& chmod -R 755 /app \
&& chmod -R 775 /app/uploads
# Configure Nginx for PHP
RUN rm /etc/nginx/conf.d/default.conf
COPY <<EOF /etc/nginx/conf.d/default.conf
server {
listen 80 default_server;
server_name _;
root /app;
index index.php index.html index.htm;
# Enable gzip compression
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
gzip_min_length 1000;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
# Cache static files
location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# Handle all URLs through index.php (SPA-like routing for Chyrp)
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# PHP processing
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
}
# Deny access to sensitive files
location ~ /\.env {
deny all;
}
location ~ /includes/config\.json\.php {
deny all;
}
location ~ /install\.php {
deny all;
}
location ~ /upgrade\.php {
deny all;
}
}
EOF
# Configure PHP-FPM
RUN sed -i 's/listen = \/run\/php-fpm.sock/listen = 127.0.0.1:9000/' /usr/local/etc/php-fpm.d/www.conf
# Create a startup script
RUN echo '#!/bin/sh\n\
php-fpm -D\n\
nginx -g "daemon off;"\n\
' > /entrypoint.sh && chmod +x /entrypoint.sh
EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"]

Dockerfile Explanation

  • Base image: Uses PHP 8.2 FPM on Alpine Linux for lightweight production deployment
  • PHP extensions: Installs all required extensions (PDO, MySQL, PostgreSQL, SQLite, mbstring, cURL, etc.)
  • Nginx configuration: Configures Nginx as a reverse proxy with gzip compression, security headers, and proper URL routing for Chyrp Lite
  • File permissions: Sets proper ownership and permissions for the application directory
  • Static file caching: Configures long-term caching for static assets (CSS, JS, images)
  • Security: Denies access to sensitive files and configuration
  • Startup script: Runs both PHP-FPM and Nginx

Building the Dockerfile Locally (Optional)

Test the Dockerfile locally before deploying:

Terminal window
# Build the Docker image
docker build -t chyrp-lite:latest .
# Run the container locally
docker run -p 8080:80 \
-e DB_TYPE=sqlite \
-e SITE_URL=http://localhost:8080 \
-e SITE_NAME="My Blog" \
chyrp-lite:latest

Visit http://localhost:8080/install.php to run the installation wizard.


Database Setup

Chyrp Lite supports MySQL, PostgreSQL, and SQLite. For production deployment, MySQL or PostgreSQL is recommended.

MySQL Database Setup

Create a MySQL database and user:

Terminal window
mysql -u root -p
CREATE DATABASE chyrp_lite CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'chyrp_user'@'%' IDENTIFIED BY 'secure_password';
GRANT ALL PRIVILEGES ON chyrp_lite.* TO 'chyrp_user'@'%';
FLUSH PRIVILEGES;
EXIT;

PostgreSQL Database Setup

Create a PostgreSQL database and user:

Terminal window
psql -U postgres
CREATE DATABASE chyrp_lite;
CREATE USER chyrp_user WITH PASSWORD 'secure_password';
GRANT ALL PRIVILEGES ON DATABASE chyrp_lite TO chyrp_user;
ALTER DATABASE chyrp_lite OWNER TO chyrp_user;
\q

SQLite Database Setup

SQLite creates a file-based database automatically:

Terminal window
# Create uploads directory for SQLite database
mkdir -p uploads
sqlite3 uploads/chyrp.db ".databases"

Deploying with Docker

Klutch.sh automatically detects a Dockerfile in your repository root and uses it for deployment. This provides the most control over your deployment environment.

Prerequisites for Docker Deployment

  • Your Chyrp Lite project pushed to a GitHub repository
  • Valid Dockerfile in the repository root
  • Database credentials and configuration prepared

Steps to Deploy with Docker

  1. Prepare Your Database

    Set up your database (MySQL, PostgreSQL, or SQLite) with appropriate credentials. You’ll configure these in Klutch.sh environment variables.

  2. Push Your Chyrp Lite Repository to GitHub

    Ensure your repository is pushed to GitHub:

    Terminal window
    git add Dockerfile .dockerignore
    git commit -m "Add Docker deployment configuration"
    git push origin main
  3. Log In to Klutch.sh Dashboard

    Go to klutch.sh/app and sign in with your GitHub account.

  4. Create a Project

    Navigate to the Projects section and create a new project for your Chyrp Lite blog.

  5. Create an App

    Click “Create App” and select your GitHub repository containing the Chyrp Lite files.

  6. Select the Branch

    Choose the branch you want to deploy (typically main).

  7. Configure Traffic Type

    Select HTTP as the traffic type for Chyrp Lite (a web application serving HTML and content).

  8. Set the Internal Port

    Set the internal port to 80 – this is the port where Nginx (in the Dockerfile) will serve your Chyrp Lite blog.

  9. Add Environment Variables

    Configure environment variables for database access and site configuration:

    DB_TYPE=mysql
    DB_HOST=your-database-host.example.com
    DB_PORT=3306
    DB_NAME=chyrp_lite
    DB_USER=chyrp_user
    DB_PASS=your_secure_password
    SITE_URL=https://example-app.klutch.sh
    SITE_NAME=My Awesome Blog
    TIMEZONE=UTC
    PHP_MEMORY_LIMIT=256M
    PHP_MAX_UPLOAD_SIZE=20M

    For PostgreSQL, use:

    DB_TYPE=postgresql
    DB_HOST=your-database-host.example.com
    DB_PORT=5432
    DB_NAME=chyrp_lite
    DB_USER=chyrp_user
    DB_PASS=your_secure_password
  10. Configure Persistent Storage

    Chyrp Lite stores uploaded media files in the /uploads directory. You must add a persistent volume to preserve uploaded content:

    1. In the Klutch.sh dashboard, go to your app’s Volumes section after creation
    2. Click Add Volume
    3. Set the mount path to /app/uploads
    4. Set the size to at least 5 GiB (adjust based on expected content)
    5. Save and redeploy

    This ensures your uploaded media files persist across container restarts and updates.

  11. Configure Compute Resources

    Select your region, compute size, and number of instances based on expected blog traffic and complexity.

  12. Deploy

    Click “Create” to start the deployment. Klutch.sh automatically detects the Dockerfile and builds your image. Your Chyrp Lite blog will be available at a URL like https://example-app.klutch.sh.

  13. Run the Installation Wizard

    After deployment completes, visit https://example-app.klutch.sh/install.php to run the installation wizard:

    1. Select your database type and provide credentials
    2. Configure your site name and description
    3. Create an admin user account
    4. Set timezone and language preferences
    5. Complete the installation

    Once installation is complete, you can access your blog at https://example-app.klutch.sh and the admin panel at https://example-app.klutch.sh/admin/.

  14. Remove Installation Files

    After installation completes, secure your installation by removing the installation scripts. In your local repository:

    1. Delete or rename install.php and upgrade.php
    2. Commit and push the changes
    3. Redeploy the app in Klutch.sh

    This prevents unauthorized access to installation interfaces.


Environment Variables

Configure these environment variables in the Klutch.sh dashboard for your Chyrp Lite deployment:

Database Configuration

DB_TYPE=mysql # mysql, postgresql, or sqlite
DB_HOST=your-database-host.example.com
DB_PORT=3306
DB_NAME=chyrp_lite
DB_USER=chyrp_user
DB_PASS=your_secure_database_password

Site Configuration

SITE_URL=https://example-app.klutch.sh
SITE_NAME=My Awesome Blog
SITE_DESCRIPTION=A lightweight, accessible blogging platform
TIMEZONE=UTC

PHP Settings

PHP_MEMORY_LIMIT=256M
PHP_MAX_UPLOAD_SIZE=20M
PHP_MAX_EXECUTION_TIME=30

Accessing Environment Variables in Chyrp Lite

You may need to modify the installation or create a wrapper to read these environment variables and write them to includes/config.json.php. Create a setup script to handle this:

#!/bin/bash
# This script writes environment variables to Chyrp Lite config
cat > /app/includes/config.json.php <<EOF
<?php
return [
'database' => [
'type' => getenv('DB_TYPE') ?: 'sqlite',
'host' => getenv('DB_HOST') ?: 'localhost',
'port' => getenv('DB_PORT') ?: '3306',
'name' => getenv('DB_NAME') ?: 'chyrp_lite',
'user' => getenv('DB_USER') ?: '',
'password' => getenv('DB_PASS') ?: ''
],
'site' => [
'url' => getenv('SITE_URL') ?: 'http://localhost',
'name' => getenv('SITE_NAME') ?: 'My Blog',
'description' => getenv('SITE_DESCRIPTION') ?: '',
'timezone' => getenv('TIMEZONE') ?: 'UTC'
]
];
EOF

Persistent Storage

Chyrp Lite stores user-uploaded media files in the /uploads directory. Persistent storage is critical for production deployments.

Adding Persistent Volumes

  1. In the Klutch.sh dashboard, navigate to your app
  2. Go to the Volumes section
  3. Click Add Volume
  4. Mount path: /app/uploads
  5. Size: 5-50 GiB (depending on expected content volume)
  6. Save and redeploy

Backup and Recovery

Regularly backup your persistent volume:

Terminal window
# Local backup (if you have SSH access)
tar -czf chyrp-uploads-backup.tar.gz /app/uploads/
# Upload to secure storage
scp chyrp-uploads-backup.tar.gz your-backup-server.com:/backups/

Customizing Themes and Modules

Using Built-in Themes

Chyrp Lite includes five beautiful responsive themes:

  1. Blossom: Clean, minimal design with elegant typography
  2. Sparrow: Lightweight, feature-rich blogging interface
  3. Topaz: Modern, grid-based layout for multimedia content
  4. Umbra: Dark-mode friendly, accessibility-focused design
  5. Virgula: Minimalist, typography-forward theme

Switch themes in the admin panel:

  1. Log in to https://example-app.klutch.sh/admin/
  2. Go to Themes
  3. Select your preferred theme
  4. Click Activate

Creating Custom Themes

Create custom themes using the Twig template engine. Themes are located in /themes/:

{# themes/my-theme/index.twig #}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ site.name }}</title>
<link rel="stylesheet" href="{{ theme.url }}/style.css">
</head>
<body>
<header>
<h1><a href="{{ site.url }}">{{ site.name }}</a></h1>
<p>{{ site.description }}</p>
</header>
<main>
{% for post in posts %}
<article>
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
<time>{{ post.created | strtotime | date("Y-m-d") }}</time>
<div class="content">
{{ post.content }}
</div>
</article>
{% endfor %}
</main>
<footer>
<p>&copy; {{ now | date("Y") }} {{ site.name }}</p>
</footer>
</body>
</html>

Enabling and Configuring Modules

Enable modules in the admin panel:

  1. Log in to the admin panel
  2. Go to Modules
  3. Click on a module to enable it
  4. Configure module-specific settings

Popular module configurations:

Comments Module:

  • Enable user comments on posts
  • Moderate comments before publishing
  • Allow anonymous comments or require login

Tags Module:

  • Organize posts with searchable tags
  • Display tag cloud on sidebar
  • Filter posts by tag

Cacher Module:

  • Cache blog pages for improved performance
  • Reduce database queries
  • Automatic cache invalidation on new posts

Security Best Practices

1. HTTPS/SSL Enforcement

Klutch.sh automatically provides HTTPS for all deployed apps. All traffic is encrypted by default.

2. Restrict Access to Admin and Installation Files

The Dockerfile already denies access to sensitive files. Additional security measures:

# Deny access to admin panel without authentication
location /admin/ {
auth_basic "Chyrp Lite Administration";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://backend;
}

3. Secure Database Credentials

Never hardcode database credentials in your codebase:

  • Use environment variables (configured in Klutch.sh dashboard)
  • Rotate credentials regularly
  • Use strong, unique passwords (20+ characters)
  • Enable SSL/TLS for database connections

4. Regular Updates

Keep Chyrp Lite and PHP updated:

  1. Monitor Chyrp Lite releases
  2. Test updates in a staging environment first
  3. Follow the upgrade process in the Chyrp Lite documentation
  4. Rebuild and redeploy your Docker image

5. Input Validation and Sanitization

Chyrp Lite includes built-in protection against common attacks:

  • XSS protection through template escaping
  • CSRF token validation on forms
  • Input validation on all user-submitted data

When creating custom themes or extensions:

{# Escape user-submitted content #}
<p>{{ post.title | escape }}</p>
{# Use filters for safe output #}
<div>{{ post.content | raw }}</div>
{# Validate URLs before linking #}
<a href="{{ post.url | url }}">{{ post.title }}</a>

6. File Upload Security

Chyrp Lite validates uploaded files. Additional security measures:

# Limit upload file size
client_max_body_size 20M;
# Prevent execution of uploaded files
location /uploads/ {
location ~ \.php$ {
deny all;
}
location ~ \.html?$ {
deny all;
}
}

7. Database Backups

Implement automated database backups:

#!/bin/bash
# Daily MySQL backup
BACKUP_DIR="/backups/chyrp-lite"
DB_USER="chyrp_user"
DB_PASS="secure_password"
DB_NAME="chyrp_lite"
DATE=$(date +%Y%m%d_%H%M%S)
mysqldump -u $DB_USER -p$DB_PASS $DB_NAME | gzip > $BACKUP_DIR/backup_$DATE.sql.gz
# Keep only last 30 days of backups
find $BACKUP_DIR -name "backup_*.sql.gz" -mtime +30 -delete

Performance Optimization

1. Enable Cacher Module

The Cacher module significantly improves performance:

  1. Log in to admin panel
  2. Go to ModulesCacher
  3. Enable the module
  4. Set cache expiration time (recommended: 1 hour for active blogs, 24 hours for archives)
  5. Clear cache after publishing new posts

2. Database Optimization

Optimize database performance:

-- MySQL optimization
ANALYZE TABLE posts;
OPTIMIZE TABLE posts;
OPTIMIZE TABLE comments;
-- Add indexes for faster queries
CREATE INDEX idx_created ON posts(created);
CREATE INDEX idx_status ON posts(status);
CREATE INDEX idx_user_id ON posts(user_id);

3. Image Optimization

Optimize uploaded images:

Terminal window
# Install ImageMagick
apt-get install imagemagick
# Compress images in uploads directory
for file in /app/uploads/*.{jpg,png}; do
convert "$file" -quality 85 "$file"
done

4. Gzip Compression

The Dockerfile Nginx configuration already includes gzip compression. Verify it’s working:

Terminal window
curl -I -H "Accept-Encoding: gzip" https://example-app.klutch.sh/
# Should show: Content-Encoding: gzip

5. Browser Caching

Static files are cached for 1 year in the Nginx configuration. Verify:

Terminal window
curl -I https://example-app.klutch.sh/path/to/style.css
# Should show: Cache-Control: public, immutable
# Should show: Expires: [date 1 year in future]

6. Content Delivery Network (CDN)

Consider using a CDN for faster content delivery:


Monitoring and Logging

Application Logs

Access application logs through Klutch.sh dashboard:

  1. Go to your app in Klutch.sh
  2. Click Logs
  3. Filter by time range and log level

PHP Error Logging

Configure PHP error logging in the Dockerfile:

RUN echo 'log_errors = On\n\
error_log = /var/log/php-error.log\n\
display_errors = Off\n\
' >> /usr/local/etc/php/conf.d/error-logging.ini

Nginx Access Logs

Monitor Nginx access logs:

Terminal window
# View recent requests
tail -f /var/log/nginx/access.log
# Count requests by IP
awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head -10
# Check for errors
tail -f /var/log/nginx/error.log

Health Checks

Implement health check endpoint:

<?php
// health.php - Simple health check endpoint
header('Content-Type: application/json');
// Check database connection
try {
// Chyrp Lite database check
$config = require 'includes/config.json.php';
// If config loads, database is accessible
http_response_code(200);
echo json_encode(['status' => 'ok', 'timestamp' => time()]);
} catch (Exception $e) {
http_response_code(500);
echo json_encode(['status' => 'error', 'message' => $e->getMessage()]);
}
?>

Configure Klutch.sh health check to monitor this endpoint.

Monitoring Tools

Integrate with monitoring services:

  • Sentry: Error tracking and reporting

    Terminal window
    composer require sentry/sdk
  • New Relic: Performance monitoring

  • DataDog: Infrastructure and application monitoring


Custom Domains

To use a custom domain with your Klutch.sh-deployed Chyrp Lite blog:

1. Add the Domain in Klutch.sh

In the Klutch.sh dashboard, go to your app’s settings and add your custom domain (e.g., blog.example.com).

2. Update Your DNS Provider

Update your DNS records with the CNAME provided by Klutch.sh:

CNAME: blog.example.com → example-app.klutch.sh

3. Update Site Configuration

Update your site URL in Klutch.sh environment variables:

SITE_URL=https://blog.example.com

Redeploy your app to apply the changes.

4. Update Theme Configuration

If using custom themes, ensure URLs are relative:

{# Use relative URLs #}
<link rel="stylesheet" href="{{ theme.url }}/style.css">
{# Use the configured SITE_URL for absolute links #}
<meta property="og:url" content="{{ site.url }}/{{ post.url }}">

5. Wait for DNS Propagation

DNS changes can take up to 48 hours to propagate. Verify with:

Terminal window
nslookup blog.example.com
# or
dig blog.example.com CNAME

Once propagated, your Chyrp Lite blog will be accessible at your custom domain with automatic HTTPS.


Troubleshooting

Issue 1: “500 Internal Server Error” After Deployment

Error: Blank page or generic error message

Solutions:

  • Check PHP error logs in Klutch.sh dashboard
  • Verify database credentials in environment variables
  • Ensure database is accessible from your container
  • Check file permissions: chmod -R 755 /app && chmod -R 775 /app/uploads
  • Verify Dockerfile builds locally: docker build -t chyrp-lite:test .

Issue 2: Database Connection Fails

Error: “Unable to connect to database” or blank configuration

Solutions:

  • Verify DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASS are correct
  • Test database connection locally: mysql -h DB_HOST -u DB_USER -p
  • Check that database user has proper permissions: GRANT ALL PRIVILEGES ON chyrp_lite.* TO chyrp_user@'%';
  • For remote databases, ensure firewall rules allow container to access the database
  • Verify database is running and accessible

Issue 3: Installation Wizard Not Accessible

Error: 404 on /install.php

Solutions:

  • Verify install.php exists in your repository
  • Check Dockerfile copied files correctly
  • Ensure Nginx configuration routes to PHP correctly
  • Test locally: curl http://localhost/install.php
  • If already installed, remove or secure install.php after completion

Issue 4: Uploaded Files Not Persisting

Error: Files disappear after container restart

Solutions:

  • Ensure persistent volume is added to /app/uploads
  • Verify volume mount path is correct in Klutch.sh dashboard
  • Check file permissions: chmod 775 /app/uploads
  • Verify volume has sufficient space: df -h /app/uploads

Issue 5: Slow Page Loads

Error: Blog takes 5+ seconds to load

Solutions:

  • Enable Cacher module in admin panel
  • Optimize database indexes for common queries
  • Reduce image file sizes (aim for <100KB per image)
  • Check database performance: SHOW PROCESSLIST;
  • Monitor PHP memory usage: PHP_MEMORY_LIMIT=512M
  • Use a CDN for static assets
  • Check network latency: ping example-app.klutch.sh

Issue 6: Admin Panel Access Issues

Error: Cannot log in or access admin panel

Solutions:

  • Clear browser cookies and cache
  • Verify user account exists in database
  • Check user permissions in database: SELECT * FROM users;
  • Reset admin password (may require database access)
  • Verify session configuration in Chyrp Lite config
  • Check PHP session settings: session.use_cookies = On

Issue 7: Theme Not Displaying Correctly

Error: Broken layout or missing styles

Solutions:

  • Verify theme files are present: ls /app/themes/
  • Check theme permissions: chmod -R 755 /app/themes/
  • Clear browser cache (Ctrl+Shift+Delete)
  • Verify CSS file paths are relative, not absolute
  • Check Nginx error logs for 404s on CSS/JS files
  • Rebuild theme assets if custom theme uses build tools

Issue 8: Comment Spam or Abuse

Error: Receiving spam comments

Solutions:

  • Enable MAPTCHA module for simple math CAPTCHA
  • Enable Comments module moderation: require approval before publishing
  • Implement rate limiting in Nginx:
    limit_req_zone $binary_remote_addr zone=comment_limit:10m rate=5r/m;
    location /ajax/post_comment.php {
    limit_req zone=comment_limit burst=10 nodelay;
    }
  • Block IPs with known spam patterns
  • Use Klutch.sh’s built-in DDoS protection

Best Practices

1. Version Control and Deployments

  • Use semantic versioning for your blog configuration
  • Tag releases in Git: git tag -a v1.2.0 -m "Version 1.2.0"
  • Test updates in a staging environment before production
  • Keep your Dockerfile in version control
  • Document any custom modifications to core files

2. Regular Backups

Implement automated backup strategy:

# Daily backup script
#!/bin/bash
BACKUP_DATE=$(date +%Y%m%d)
# Backup database
mysqldump -u $DB_USER -p$DB_PASS $DB_NAME | gzip > /backups/db_$BACKUP_DATE.sql.gz
# Backup uploads
tar -czf /backups/uploads_$BACKUP_DATE.tar.gz /app/uploads/
# Upload to remote storage
aws s3 sync /backups s3://my-backup-bucket/chyrp-lite/

3. Content Organization

Structure your blog for SEO:

  • Use descriptive post titles
  • Add proper meta descriptions
  • Organize content with categories and tags
  • Enable the Sitemap module for search engines
  • Use semantic HTML in themes

4. User Management

Implement proper access control:

  • Create separate user accounts for contributors
  • Assign appropriate roles (Admin, Author, Editor, Contributor)
  • Regularly audit user permissions
  • Disable unused accounts
  • Require strong passwords (minimum 12 characters)

5. Performance Monitoring

Monitor blog performance:

6. SEO Optimization

Optimize your blog for search engines:

{# Include in theme head #}
<meta name="description" content="{{ site.description }}">
<meta property="og:title" content="{{ post.title }}">
<meta property="og:description" content="{{ post.excerpt }}">
<meta property="og:image" content="{{ post.featured_image }}">
<meta property="og:url" content="{{ site.url }}/{{ post.url }}">
<link rel="canonical" href="{{ site.url }}/{{ post.url }}">

7. Accessibility

Ensure your blog is accessible to all visitors:

  • Use semantic HTML elements
  • Include alt text for all images
  • Maintain proper heading hierarchy (H1, H2, H3)
  • Test with screen readers
  • Ensure color contrast meets WCAG standards
  • Provide keyboard navigation

8. Documentation

Document your setup:

  • Keep README with installation instructions
  • Document custom themes and modules
  • Create a runbook for common maintenance tasks
  • Document database schema and custom fields
  • Record troubleshooting solutions

9. Security Updates

Stay informed about security updates:

10. Scalability Planning

Plan for growth:

  • Start with appropriate compute resources
  • Monitor CPU and memory usage
  • Consider database scaling (read replicas for large blogs)
  • Implement caching at multiple levels
  • Plan for content migration if needed
  • Document scaling procedures

Verifying Your Deployment

After deployment completes:

  1. Check the App URL: Visit your app at https://example-app.klutch.sh or your custom domain.
  2. Run Installation: If first deploy, visit /install.php and complete the setup wizard.
  3. Check Admin Panel: Log in to /admin/ and verify settings.
  4. Test Publishing: Create a test post and verify it displays correctly.
  5. Check Uploads: Upload a test image to verify persistent storage works.
  6. Test Performance: Use Google PageSpeed Insights to verify performance.
  7. Check Security: Verify SSL certificate is valid and no mixed content warnings.
  8. Monitor Logs: Check Klutch.sh logs for any errors or warnings.
  9. Test Responsiveness: Verify blog displays correctly on mobile and tablet devices.
  10. Enable Modules: Activate desired modules (Comments, Tags, Cacher, etc.) for full functionality.

If your blog doesn’t work as expected, review the troubleshooting section and check the Klutch.sh dashboard logs for detailed error messages.


External Resources


Deploying Chyrp Lite to Klutch.sh using Docker provides a reliable, containerized blogging platform with automatic HTTPS, optimized performance, and scalable infrastructure. By following this guide, you’ve learned how to create a production-ready Dockerfile, configure your database, set up persistent storage for uploads, customize themes and modules, implement security best practices, optimize performance, configure custom domains, monitor your blog, and troubleshoot common issues. Your Chyrp Lite blog is now running on Klutch.sh’s global infrastructure with professional-grade hosting and support. For additional help or questions, consult the official Chyrp Lite documentation or contact Klutch.sh support.