Deploying Otter Wiki
Introduction
Otter Wiki is a simple, beautiful wiki application that stores all content in Markdown files backed by Git. Written in Python with Flask, Otter Wiki provides an intuitive editing experience while leveraging Git’s powerful version control for complete page history, branching, and collaboration.
Unlike database-backed wikis, Otter Wiki stores pages as plain Markdown files in a Git repository. This approach makes content portable, version-controlled, and easily backed up. You can edit pages through the web interface or directly in the Git repository, making it perfect for developers who want to integrate documentation workflows with their existing Git-based processes.
Key highlights of Otter Wiki:
- Git-Backed Storage: All pages stored as Markdown files with full version history
- Beautiful Interface: Clean, responsive design that works on all devices
- Markdown Support: Full Markdown with syntax highlighting and tables
- Full-Text Search: Fast search across all wiki content
- File Attachments: Upload and embed images and other files
- Page History: View diffs and revert to previous versions
- Authentication: Optional user accounts with different permission levels
- No Database Required: Everything stored in files and Git
- Easy Backup: Clone the Git repository to back up everything
- Lightweight: Minimal resource requirements
This guide walks through deploying Otter Wiki on Klutch.sh using Docker, configuring user access, and setting up your wiki for production use.
Why Deploy Otter Wiki on Klutch.sh
Deploying Otter Wiki on Klutch.sh provides several advantages:
Simplified Deployment: Klutch.sh automatically builds and deploys your wiki. Push to GitHub, and your wiki deploys without manual intervention.
Persistent Storage: Attach persistent volumes for your Git repository and uploads. Your wiki content survives container restarts.
HTTPS by Default: Klutch.sh provides automatic SSL certificates for secure wiki access.
GitHub Integration: Store configuration in Git for version-controlled infrastructure.
Always-On Availability: Your wiki runs 24/7, providing constant access to documentation.
Custom Domains: Use your organization’s domain for professional wiki URLs.
Lightweight: Otter Wiki’s minimal requirements mean efficient resource usage.
Prerequisites
Before deploying Otter Wiki on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your Otter Wiki configuration
- Basic familiarity with Docker and containerization concepts
- (Optional) Existing Git repository with Markdown content
Understanding Otter Wiki Architecture
Otter Wiki has a simple architecture:
Flask Application: Python-based web application handling HTTP requests and page rendering.
Git Repository: Stores all wiki pages as Markdown files with full version history.
File Storage: Attachments and uploads stored alongside wiki content.
SQLite Database: Optional, stores user accounts and sessions when authentication is enabled.
Preparing Your Repository
Create a GitHub repository containing your Dockerfile and configuration.
Repository Structure
otter-wiki-deploy/├── Dockerfile├── config.py├── .dockerignore└── README.mdCreating the Dockerfile
Create a Dockerfile for Otter Wiki:
FROM redimp/otterwiki:latest
# Create directories for persistent dataRUN mkdir -p /app-data/repositoryRUN mkdir -p /app-data/uploads
# Environment configurationENV OTTERWIKI_SETTINGS=/app-data/config.py
# Expose the application portEXPOSE 8080
# Use default entrypointConfiguration File
Create a config.py for customization:
# Site configurationSITE_NAME = "My Wiki"SITE_DESCRIPTION = "Documentation and knowledge base"
# Repository pathREPOSITORY = "/app-data/repository"
# Upload directoryUPLOAD_FOLDER = "/app-data/uploads"
# SecuritySECRET_KEY = "change-this-to-a-random-secret-key"
# Authentication (optional)# Set to True to require login for editingREAD_ACCESS = "anonymous"WRITE_ACCESS = "registered"
# Enable user registrationREGISTRATION = TrueEnvironment Variables Reference
| Variable | Default | Description |
|---|---|---|
OTTERWIKI_SETTINGS | - | Path to configuration file |
SECRET_KEY | - | Flask secret key for sessions |
SITE_NAME | Otter Wiki | Display name for the wiki |
READ_ACCESS | anonymous | Who can read (anonymous, registered) |
WRITE_ACCESS | registered | Who can edit (anonymous, registered, admin) |
REGISTRATION | True | Allow new user registration |
Deploying Otter Wiki on Klutch.sh
Follow these steps to deploy your wiki:
- Select HTTP as the traffic type
- Set the internal port to 8080
Generate a Secret Key
Generate a secure secret key:
python -c "import secrets; print(secrets.token_hex(32))"Push Your Repository to GitHub
Initialize and push your repository:
git initgit add Dockerfile config.py .dockerignore README.mdgit commit -m "Initial Otter Wiki configuration"git remote add origin https://github.com/yourusername/otter-wiki-deploy.gitgit push -u origin mainCreate a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project named “otter-wiki” or “wiki”.
Create a New App
Within your project, create a new app. Connect your GitHub account and select the repository containing your Dockerfile.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Configure your wiki instance:
| Variable | Value |
|---|---|
SECRET_KEY | Your generated secret key |
OTTERWIKI_SETTINGS | /app-data/config.py |
Attach Persistent Volumes
Add persistent storage:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/app-data/repository | 10 GB | Git repository with wiki pages |
/app-data/uploads | 10 GB | Uploaded files and images |
Deploy Your Application
Click Deploy to start the build process.
Access Otter Wiki
Once deployment completes, access your wiki at https://your-app-name.klutch.sh. Create your first page to get started.
Initial Setup
Creating the First Page
On first access:
- Navigate to your wiki URL
- Click “Edit” or create a new page
- Write content in Markdown
- Click “Save” to commit to Git
Setting Up Authentication
If you enabled authentication:
- Click “Register” to create an admin account
- The first user typically gets admin privileges
- Configure additional users as needed
Importing Existing Content
If you have existing Markdown files:
- Clone your wiki repository locally
- Add Markdown files to the repository
- Push changes to update the wiki
Writing Wiki Content
Markdown Syntax
Otter Wiki supports standard Markdown:
# Heading 1## Heading 2
**Bold** and *italic* text
- Bullet list- Another item
1. Numbered list2. Second item
[Link text](https://example.com)

`inline code`
```pythondef hello(): print("Hello, World!")```Creating Pages
Create new pages by:
- Clicking “New Page” in the interface
- Entering the page name
- Writing content in Markdown
- Saving the page
Or link to non-existent pages:
Check out the [[NewPage]] for more info.Clicking the link creates the new page.
Organizing Content
Structure your wiki with:
- Subpages: Use paths like
topic/subtopic - Categories: Group related pages together
- Navigation: Create index pages with links
File Attachments
Upload and embed files:
- Click the attachment button while editing
- Upload your file
- Insert the reference in your page
[Download PDF](uploads/document.pdf)Version Control Features
Viewing History
See page history:
- Open any page
- Click “History”
- View list of revisions with dates and authors
- Click any revision to view its content
Comparing Versions
See what changed:
- Open page history
- Select two revisions
- View the diff showing additions and deletions
Reverting Changes
Restore previous versions:
- Open page history
- Find the version to restore
- Click “Revert to this version”
- Confirm the revert
Git Repository Access
Access the underlying Git repository:
# Clone the wiki repositorygit clone https://your-wiki-url/git/repository.git
# Make changes locallycd repositoryecho "# New Page" > new-page.mdgit add new-page.mdgit commit -m "Add new page"git pushUser Management
User Roles
Otter Wiki supports different access levels:
- Anonymous: Public access without login
- Registered: Authenticated users
- Admin: Full administrative access
Access Configuration
Configure in config.py:
# Public read, registered writeREAD_ACCESS = "anonymous"WRITE_ACCESS = "registered"
# Fully private wikiREAD_ACCESS = "registered"WRITE_ACCESS = "registered"
# Public read and writeREAD_ACCESS = "anonymous"WRITE_ACCESS = "anonymous"User Registration
Control registration:
# Allow registrationREGISTRATION = True
# Disable registration (admin creates accounts)REGISTRATION = FalseCustomization
Site Branding
Customize the wiki appearance:
SITE_NAME = "Company Wiki"SITE_DESCRIPTION = "Internal documentation and knowledge base"SITE_ICON = "/static/custom/logo.png"Custom CSS
Add custom styles:
- Create a custom CSS file
- Mount it in the container
- Reference in configuration
Navigation
Create a sidebar or navigation page:
- Create a special navigation page
- Add links to important sections
- Configure as the default sidebar
Backup and Sync
Backing Up
The wiki repository contains everything:
# Clone for backupgit clone https://your-wiki-url/git/repository.git wiki-backup
# Or if you have volume accesscp -r /app-data/repository /backup/Syncing with External Git
Sync wiki content with GitHub:
- Configure remote repository
- Set up push/pull hooks
- Changes sync automatically
Disaster Recovery
To restore from backup:
- Stop the wiki container
- Replace the repository directory with backup
- Restart the container
Troubleshooting Common Issues
Pages Not Saving
Symptoms: Edits fail or are lost.
Solutions:
- Check Git repository permissions
- Verify disk space on volume
- Review application logs for Git errors
- Ensure repository is properly initialized
Search Not Working
Symptoms: Search returns no results.
Solutions:
- Verify search index is built
- Rebuild the search index
- Check content encoding is UTF-8
Authentication Issues
Symptoms: Cannot log in or register.
Solutions:
- Verify SECRET_KEY is set
- Check authentication configuration
- Clear browser cookies
- Review session storage
Images Not Loading
Symptoms: Uploaded images display as broken.
Solutions:
- Check upload directory permissions
- Verify upload volume is mounted
- Check file path references
- Review allowed file types
Additional Resources
- Otter Wiki Official Website
- Otter Wiki GitHub Repository
- Otter Wiki Documentation
- Otter Wiki Docker Image
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
Conclusion
Deploying Otter Wiki on Klutch.sh provides a simple, elegant wiki solution with Git-powered version control. With Markdown editing, full-text search, and complete page history, Otter Wiki delivers documentation capabilities without the complexity of database-backed alternatives.
The combination of persistent storage for your Git repository, reliable uptime, and HTTPS security makes Klutch.sh an excellent platform for hosting Otter Wiki. Whether documenting a project, creating a knowledge base, or sharing notes with a team, your self-hosted wiki provides the simplicity and control you need.
Start documenting today with the confidence that every change is tracked and your content is always under your control.