Deploying Typemill
Introduction
Typemill is a lightweight, flat-file CMS designed specifically for creating professional documentation and content-focused websites. Built with PHP and using Markdown files for content storage, Typemill eliminates database complexity while providing a polished editing experience with both visual and raw markdown editors.
Unlike database-driven CMS platforms, Typemill stores all content in markdown files, making it easy to backup, version control, and migrate. Its focus on documentation and structured content makes it ideal for technical documentation, user manuals, knowledge bases, and content-heavy websites.
Key highlights of Typemill:
- Flat-File Architecture: No database required, content stored in markdown files
- Visual Editor: WYSIWYG block editor for non-technical users
- Markdown Support: Full markdown support with syntax highlighting
- Navigation Builder: Drag-and-drop navigation structure
- Theme System: Professional themes with customization options
- Plugin Architecture: Extend functionality with plugins
- Multi-User: Multiple authors with role-based permissions
- Media Manager: Upload and manage images and files
- SEO Friendly: Built-in meta tag management and clean URLs
- Version History: Track content changes over time
- Open Source: Licensed under MIT
This guide walks through deploying Typemill on Klutch.sh using Docker, setting up your documentation site, and configuring the CMS for content creation.
Why Deploy Typemill on Klutch.sh
Deploying Typemill on Klutch.sh provides several advantages for documentation sites:
Simplified Deployment: Klutch.sh automatically detects your Dockerfile and builds Typemill without complex configuration. Push to GitHub, and your documentation site deploys automatically.
Persistent Storage: Attach persistent volumes for your content files and media uploads. Your documentation survives container restarts and redeployments.
HTTPS by Default: Klutch.sh provides automatic SSL certificates, ensuring secure access to your documentation.
GitHub Integration: Connect your content repository directly from GitHub. Updates trigger automatic redeployments.
Low Resource Usage: Typemill’s flat-file architecture means minimal server resources for excellent performance.
Prerequisites
Before deploying Typemill on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your Typemill configuration
- Basic familiarity with Docker and CMS concepts
- Content ready to publish (or plans to create it)
- (Optional) A custom domain for your Typemill site
Understanding Typemill Architecture
Typemill is built on a simple, efficient architecture:
PHP Application: The core CMS built with PHP and the Slim framework.
Markdown Content: All content is stored as markdown files in a structured directory.
YAML Configuration: Settings and metadata stored in YAML files.
File-Based Media: Images and files stored directly on the filesystem.
Theme System: Twig-based templating for complete design control.
Preparing Your Repository
To deploy Typemill on Klutch.sh, create a GitHub repository containing your Dockerfile and configuration.
Repository Structure
typemill-deploy/├── Dockerfile├── content/│ └── .gitkeep└── .dockerignoreCreating the Dockerfile
Create a Dockerfile in the root of your repository:
FROM php:8.2-apache
# Install required extensionsRUN apt-get update && apt-get install -y \ libzip-dev \ unzip \ && docker-php-ext-install zip \ && a2enmod rewrite
# Download and extract TypemillWORKDIR /var/www/htmlRUN curl -L https://github.com/typemill/typemill/archive/refs/heads/master.zip -o typemill.zip \ && unzip typemill.zip \ && mv typemill-master/* . \ && rm -rf typemill-master typemill.zip
# Set permissionsRUN chown -R www-data:www-data /var/www/html \ && chmod -R 755 /var/www/html
# Configure ApacheRUN echo '<Directory /var/www/html>\n\ AllowOverride All\n\ Require all granted\n\</Directory>' > /etc/apache2/conf-available/typemill.conf \ && a2enconf typemill
# Expose portEXPOSE 80
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \ CMD curl -f http://localhost/ || exit 1Environment Variables Reference
| Variable | Required | Default | Description |
|---|---|---|---|
TYPEMILL_SETTINGS_HEADLINEANCHORS | No | true | Enable headline anchors |
TYPEMILL_SETTINGS_MARKDOWN | No | true | Enable markdown editor |
Deploying Typemill on Klutch.sh
Once your repository is prepared, follow these steps to deploy Typemill:
- Select HTTP as the traffic type
- Set the internal port to 80 (Apache default port)
- Detect your Dockerfile automatically
- Build the container image
- Attach the persistent volumes
- Start the Typemill container
- Provision an HTTPS certificate
Push Your Repository to GitHub
Initialize your repository and push to GitHub:
git initgit add Dockerfile .dockerignoregit commit -m "Initial Typemill deployment configuration"git remote add origin https://github.com/yourusername/typemill-deploy.gitgit push -u origin mainCreate a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project. Give it a descriptive name like “typemill” or “docs”.
Create a New App
Within your project, create a new app. Connect your GitHub account if you haven’t already, then select the repository containing your Typemill Dockerfile.
Configure HTTP Traffic
In the deployment settings:
Attach Persistent Volumes
Persistent storage is essential for Typemill. Add the following volumes:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/var/www/html/content | 1 GB | Markdown content files |
/var/www/html/media | 5 GB | Uploaded images and files |
/var/www/html/settings | 100 MB | CMS configuration |
/var/www/html/cache | 500 MB | Generated cache files |
Deploy Your Application
Click Deploy to start the build process. Klutch.sh will:
Access Typemill
Once deployment completes, access your Typemill instance at https://your-app-name.klutch.sh. The first-time setup wizard will guide you through configuration.
Initial Setup and Configuration
First-Time Setup
When you first access Typemill:
- The setup wizard checks system requirements
- Create your admin account
- Configure basic site settings
- Choose a theme
- Complete setup
Site Settings
Configure your site in the admin panel:
- Log in to
/tm/login - Go to Settings
- Configure:
- Site title and description
- Author information
- Theme selection
- Navigation settings
Theme Configuration
Customize your theme:
- Navigate to Themes section
- Activate your preferred theme
- Configure theme options:
- Colors and branding
- Navigation style
- Footer content
- Custom CSS
Content Creation
Creating Pages
Add new content pages:
- Go to the Content section
- Click ”+” to add a new page
- Enter the page title
- Use the visual editor or markdown editor
- Save and publish
Content Structure
Organize content hierarchically:
content/├── 01-getting-started/│ ├── index.md│ ├── 01-installation.md│ └── 02-configuration.md├── 02-user-guide/│ ├── index.md│ └── 01-basics.md└── 03-reference/ └── index.mdVisual Editor
The block editor supports:
- Headings and paragraphs
- Lists (ordered and unordered)
- Code blocks with syntax highlighting
- Images and media
- Tables
- Quotes and callouts
- Custom blocks via plugins
Markdown Editor
Switch to raw markdown for:
- Complex formatting
- Code-heavy content
- Batch imports
- Git-based workflows
Navigation Management
Drag-and-Drop Navigation
Organize your site structure:
- Go to the Navigation section
- Drag pages to reorder
- Create nested hierarchies
- Hide pages from navigation
- Save changes
Custom Navigation
Add external links or custom items to navigation through the admin panel.
Media Management
Uploading Images
Add images to your content:
- Click the image button in the editor
- Upload or select existing images
- Set alt text and captions
- Resize if needed
File Management
Manage all media files:
- Go to Media section
- View all uploaded files
- Organize into folders
- Delete unused files
User Management
Creating Users
Add authors and editors:
- Navigate to Users section
- Click “Add User”
- Set username, email, password
- Assign role
User Roles
Available roles include:
- Admin: Full access to all settings and content
- Editor: Can edit and publish content
- Author: Can create and edit own content
- Guest: View-only access
Plugins
Installing Plugins
Extend Typemill with plugins:
- Download plugins from the Typemill site
- Upload to
/pluginsdirectory - Activate in the Plugins section
- Configure plugin settings
Popular Plugins
Useful plugins include:
- Math: LaTeX equation support
- Highlight: Syntax highlighting
- Search: Full-text search
- Comments: Discussion on pages
Production Best Practices
Content Backup
Protect your content:
- Back up the
/contentdirectory regularly - Version control your markdown files with Git
- Export media files periodically
- Document your configuration
Performance Optimization
- Enable caching in settings
- Optimize images before upload
- Use a CDN for static assets
- Minimize plugins
Security
- Use strong admin passwords
- Keep Typemill updated
- HTTPS is provided by Klutch.sh
- Limit user accounts
Troubleshooting Common Issues
Permission Errors
Symptoms: Cannot save content or upload files.
Solutions:
- Check volume permissions
- Verify www-data ownership
- Review directory permissions
Content Not Displaying
Symptoms: Pages show errors or blank.
Solutions:
- Verify markdown syntax
- Check file encoding (UTF-8)
- Clear the cache
- Review error logs
Theme Issues
Symptoms: Theme not applying correctly.
Solutions:
- Check theme compatibility
- Clear browser cache
- Verify theme files are complete
Additional Resources
- Typemill Official Website
- Typemill Documentation
- Typemill GitHub Repository
- Typemill Themes
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
Conclusion
Deploying Typemill on Klutch.sh gives you a lightweight, powerful documentation CMS accessible from anywhere. The combination of Typemill’s flat-file simplicity and Klutch.sh’s deployment automation means you can focus on creating great content rather than managing infrastructure.
With visual editing, markdown support, and a flexible theme system, Typemill provides everything you need for professional documentation sites. Your content remains portable, version-controllable, and backed by reliable infrastructure.