Skip to content

Deploying Documize

Introduction

Documize Community is a powerful open-source knowledge management and documentation platform designed to help teams organize, share, and collaborate on documentation. Built with Go and modern web technologies, Documize provides an intuitive interface for creating structured documentation, wikis, and knowledge bases that can scale with your organization’s needs.

Documize stands out for its:

  • Structured Documentation: Organize content with folders, sections, and templates for consistency
  • Rich Editor: Powerful WYSIWYG editor with markdown support and code syntax highlighting
  • Permissions & Access Control: Fine-grained access controls for teams and external collaborators
  • Search & Discovery: Full-text search across all your documentation
  • Version Control: Track changes and maintain document history
  • Integrations: Connect with popular tools like Slack, Google Drive, and more
  • Self-Hosted: Complete control over your data and documentation
  • Modern Interface: Clean, responsive design that works on any device

This comprehensive guide walks you through deploying Documize Community on Klutch.sh using Docker, including detailed installation steps, sample Dockerfile configurations, persistent storage setup, environment variables, and production-ready best practices.


Prerequisites

Before you begin, ensure you have the following:


Installation and Setup

Step 1: Create Your Project Directory

First, create a new directory for your Documize deployment project:

Terminal window
mkdir documize-klutch
cd documize-klutch
git init

Step 2: Create the Dockerfile

Create a Dockerfile in your project root directory. This will define your Documize container configuration:

FROM documize/community:latest
# Set working directory
WORKDIR /go/bin
# Expose the default Documize port
EXPOSE 5001
# Set default environment variables
ENV DOCUMIZEPORT=5001
ENV DOCUMIZEDBTYPE=postgresql
# Database configuration should be set via environment variables in Klutch.sh dashboard
# ENV DOCUMIZEDB will be set in deployment (see Environment Variables section)
# Start Documize
CMD ["./documize"]

Note: This Dockerfile uses the official Documize Community image. Database credentials must be configured via environment variables in the Klutch.sh dashboard - never hardcode them in the Dockerfile.

Step 3: Advanced Dockerfile with SQLite (All-in-One)

For a simpler setup with an embedded SQLite database (suitable for smaller teams):

FROM documize/community:latest
# Set working directory
WORKDIR /go/bin
# Create data directory for SQLite
RUN mkdir -p /data
# Expose Documize port
EXPOSE 5001
# Set environment variables for SQLite
ENV DOCUMIZEPORT=5001
ENV DOCUMIZEDBTYPE=sqlite
ENV DOCUMIZEDB=/data/documize.db
# DOCUMIZESALT should be set via environment variables in Klutch.sh dashboard
# Use a strong random string (minimum 32 characters) for production
# Start Documize
CMD ["./documize"]

Security Note: The DOCUMIZESALT value must be set as an environment variable in Klutch.sh dashboard. Use a password manager or cryptographic random generator to create a strong salt value (minimum 32 characters) for password hashing. Never commit this value to your repository.

Step 4: Dockerfile with PostgreSQL Database

For production deployments with PostgreSQL (recommended for larger teams):

FROM documize/community:latest
# Set working directory
WORKDIR /go/bin
# Expose Documize port
EXPOSE 5001
# Environment variables will be set in Klutch.sh dashboard
ENV DOCUMIZEPORT=5001
ENV DOCUMIZEDBTYPE=postgresql
# Start Documize
CMD ["./documize"]

Step 5: Create Environment Configuration

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

Terminal window
# Documize Configuration
DOCUMIZEPORT=5001
DOCUMIZEDBTYPE=postgresql
# PostgreSQL Configuration
# For production, use sslmode=require for encrypted database connections
DOCUMIZEDB=host=your-db-host.klutch.sh port=8000 dbname=documize user=documize password=your-secure-password sslmode=require
# Documize Security
# Generate a strong random salt (minimum 32 characters) using: openssl rand -base64 32
DOCUMIZESALT=REPLACE_WITH_RANDOM_SALT_MINIMUM_32_CHARS
DOCUMIZELOCATION=https://example-app.klutch.sh
# Optional: SMTP Configuration for Email
DOCUMIZESMTP={"provider":"smtp","host":"smtp.example.com","port":587,"sender":"noreply@example.com","user":"your-smtp-user","password":"your-smtp-password"}

Security Note: Never commit actual passwords or sensitive data to your repository. Use environment variables in the Klutch.sh dashboard.

Step 6: Test Locally (Optional)

Before deploying to Klutch.sh, you can test your Documize setup locally with SQLite:

Terminal window
# Build the Docker image
docker build -t my-documize .
# Run the container with SQLite
docker run -d \
--name documize-test \
-p 5001:5001 \
-v $(pwd)/data:/data \
-e DOCUMIZEPORT=5001 \
-e DOCUMIZEDBTYPE=sqlite \
-e DOCUMIZEDB=/data/documize.db \
-e DOCUMIZESALT=$(openssl rand -base64 32) \
-e DOCUMIZELOCATION=http://localhost:5001 \
my-documize
# View logs
docker logs -f documize-test
# Access Documize at http://localhost:5001
# Stop and remove the test container when done
docker stop documize-test
docker rm documize-test

Step 7: Create Setup Documentation

Create a README.md file with setup instructions:

# Documize Community Deployment
## Initial Setup
After deploying Documize, you'll need to complete the initial setup:
1. Navigate to your Documize URL (e.g., https://example-app.klutch.sh)
2. Complete the first-run wizard:
- Create your admin account
- Set up your organization
- Configure authentication settings
- Invite team members
## Database Connection
This deployment uses PostgreSQL for data storage. Ensure your database is properly configured with:
- Database name: `documize`
- User with full privileges
- Proper connection string in environment variables
## Backup and Restore
Regular backups are essential:
- Database: Use your PostgreSQL backup tools
- File attachments: Backup the persistent volume at `/data`

Step 8: Push to GitHub

Commit your Dockerfile and configuration files to your GitHub repository:

Terminal window
git add Dockerfile .env.example README.md
git commit -m "Add Documize Dockerfile and configuration"
git remote add origin https://github.com/yourusername/documize-klutch.git
git push -u origin main

Deploying to Klutch.sh

Now that your Documize project is ready and pushed to GitHub, follow these steps to deploy it on Klutch.sh with persistent storage.

Deployment Steps

    1. Log in to Klutch.sh

      Navigate to klutch.sh/app and sign in to your account.

    2. Create a New Project

      Go to Create Project and give your project a meaningful name (e.g., “Documize Documentation”).

    3. Create a New App

      Navigate to Create App and configure the following settings:

    4. Select Your Repository

      • Choose GitHub as your Git source
      • Select the repository containing your Dockerfile
      • Choose the branch you want to deploy (usually main or master)
    5. Configure Traffic Type

      • Traffic Type: Select HTTP (Documize serves a web interface via HTTP)
      • Internal Port: Set to 5001 (the default port that Documize listens on)
    6. Set Environment Variables

      Add the following environment variables for your Documize configuration:

      For SQLite (Simple Setup):

      • DOCUMIZEPORT: 5001
      • DOCUMIZEDBTYPE: sqlite
      • DOCUMIZEDB: /data/documize.db
      • DOCUMIZESALT: A randomly generated string (use a password generator)
      • DOCUMIZELOCATION: https://example-app.klutch.sh (replace with your actual URL)

      For PostgreSQL (Production Setup):

      • DOCUMIZEPORT: 5001
      • DOCUMIZEDBTYPE: postgresql
      • DOCUMIZEDB: host=your-postgres.klutch.sh port=8000 dbname=documize user=documize password=your-password sslmode=require
      • DOCUMIZESALT: A randomly generated string (minimum 32 characters - use openssl rand -base64 32)
      • DOCUMIZELOCATION: https://example-app.klutch.sh (replace with your actual URL)

      Optional SMTP Configuration:

      • DOCUMIZESMTP: JSON string with SMTP settings (see configuration example above)

      Security Note: Always use strong, unique passwords and salt values for production deployments.

    7. Attach a Persistent Volume

      This is critical for ensuring your Documize data persists across deployments and restarts:

      • In the Volumes section, click “Add Volume”
      • Mount Path: Enter /data (this is where Documize stores file attachments and SQLite database if used)
      • Size: Choose an appropriate size based on your expected usage (e.g., 10GB for small teams, 50GB+ for larger organizations with many documents)

      Important: Documize requires persistent storage to maintain file attachments and data between container restarts.

    8. Configure Additional Settings

      • Region: Select the region closest to your users for optimal latency
      • Compute Resources: Choose CPU and memory based on your team size (minimum 1GB RAM recommended)
      • Instances: Start with 1 instance (you can scale horizontally later for high availability)
    9. Deploy Your Application

      Click “Create” to start the deployment. Klutch.sh will:

      • Automatically detect your Dockerfile in the repository root
      • Build the Docker image
      • Attach the persistent volume
      • Start your Documize container
      • Assign a URL for external access
    10. Complete Initial Setup

      Once deployment is complete, you’ll receive a URL like example-app.klutch.sh. Navigate to this URL in your browser to complete the Documize setup wizard:

      https://example-app.klutch.sh

      Follow the on-screen instructions to:

      • Create your admin account
      • Set up your organization name
      • Configure authentication settings
      • Invite team members

For production deployments, using PostgreSQL instead of SQLite is strongly recommended for better performance and reliability.

Option 1: Deploy PostgreSQL on Klutch.sh

  1. Follow the PostgreSQL deployment guide to create a PostgreSQL instance on Klutch.sh

  2. Create a database and user for Documize:

    CREATE DATABASE documize;
    CREATE USER documize WITH PASSWORD 'your-secure-password';
    GRANT ALL PRIVILEGES ON DATABASE documize TO documize;
  3. Note the connection details:

    • Host: Your PostgreSQL app URL (e.g., postgres-app.klutch.sh)
    • Port: 8000 (Klutch.sh routes TCP traffic to this port)
    • Database: documize
    • User: documize
    • Password: Your chosen password
  4. Set the DOCUMIZEDB environment variable in your Documize app:

    DOCUMIZEDB=host=postgres-app.klutch.sh port=8000 dbname=documize user=documize password=your-password sslmode=require

    Security Note: Use sslmode=require or sslmode=verify-full for production to ensure encrypted database connections. Only use sslmode=disable for local development or if your database doesn’t support SSL.

Option 2: Use External PostgreSQL Service

You can also use external PostgreSQL services like:

Simply use the connection string provided by your database service in the DOCUMIZEDB environment variable.


Environment Variables Reference

Complete list of Documize environment variables you can configure in Klutch.sh:

VariableDescriptionRequiredDefaultExample
DOCUMIZEPORTPort for Documize serverYes50015001
DOCUMIZEDBTYPEDatabase typeYesNonepostgresql or sqlite
DOCUMIZEDBDatabase connection stringYesNonehost=db port=5432 dbname=documize user=documize password=pass sslmode=disable
DOCUMIZESALTSalt for password hashingYesNoneRandom string (generate with password manager)
DOCUMIZELOCATIONPublic URL of your instanceYesNonehttps://example-app.klutch.sh
DOCUMIZESMTPSMTP configuration (JSON)NoNoneSee configuration example above
DOCUMIZECERTSSL certificate pathNoNone/certs/cert.pem (not needed on Klutch.sh)
DOCUMIZEKEYSSL key pathNoNone/certs/key.pem (not needed on Klutch.sh)

Configuring Authentication and Security

Documize supports multiple authentication methods that you can configure after deployment:

Built-in Authentication

By default, Documize uses its built-in authentication system. Users can sign up and log in with email and password.

LDAP/Active Directory Integration

To integrate with LDAP or Active Directory:

  1. Log in as an admin
  2. Navigate to Settings → Authentication
  3. Configure LDAP settings:
    • Server URL
    • Bind DN
    • User search base
    • Group search base

SSO Integration

Documize supports SSO through:

  • SAML 2.0: For enterprise identity providers
  • OAuth 2.0: For social login providers

Configure SSO settings in the Documize admin panel under Settings → Authentication.

Security Best Practices

  • Strong Passwords: Enforce password complexity requirements
  • Two-Factor Authentication: Enable 2FA for admin accounts
  • Regular Updates: Keep Documize updated to the latest version
  • Access Controls: Use groups and permissions to control document access
  • Audit Logs: Enable audit logging to track changes and access
  • HTTPS Only: Klutch.sh provides HTTPS by default; ensure all access is via HTTPS
  • Backup Strategy: Implement regular backups of both database and file storage

Production Best Practices

Performance Optimization

  • Database Indexing: Ensure proper database indexes are in place (PostgreSQL recommended)
  • Connection Pooling: Configure appropriate database connection pool size
  • Caching: Documize has built-in caching; ensure it’s properly configured
  • Resource Allocation: Monitor CPU and memory usage; scale resources as needed
  • CDN: Consider using a CDN for static assets if serving a global audience

Monitoring and Maintenance

Monitor your Documize deployment for:

  • Response Times: Ensure pages load quickly and search is responsive
  • Database Performance: Watch for slow queries and optimize as needed
  • Storage Usage: Monitor persistent volume usage and expand as needed
  • Error Logs: Check application logs regularly for errors
  • Uptime: Use external monitoring services to track availability
  • Security Updates: Subscribe to Documize security announcements

Backup Strategy

Implement a comprehensive backup strategy:

  1. Database Backups:

    • Schedule automated daily backups of your PostgreSQL database
    • Test restore procedures regularly
    • Store backups in a separate location
  2. File Storage Backups:

    • Backup the /data volume regularly (contains file attachments)
    • Consider using snapshot functionality if available
  3. Configuration Backups:

    • Document all environment variables and settings
    • Keep a copy of your Dockerfile and deployment configuration

Scaling Considerations

As your documentation grows:

  • Vertical Scaling: Increase CPU and memory resources for better performance
  • Horizontal Scaling: Deploy multiple instances behind a load balancer for high availability
  • Database Scaling: Use read replicas for PostgreSQL to distribute query load
  • Storage Scaling: Expand persistent volume size as needed for file attachments
  • Search Performance: Monitor search query performance and optimize database indexes

Migrating from Other Documentation Platforms

Importing from Confluence

Documize supports importing from Confluence:

  1. Export your Confluence space as XML
  2. In Documize, go to Settings → Import
  3. Select “Confluence” as the import type
  4. Upload your XML export file
  5. Review and confirm the import

Importing from Markdown Files

To import existing markdown documentation:

  1. Use the Documize API or web interface
  2. Create spaces and folders matching your structure
  3. Upload markdown files as new documents
  4. Documize will preserve formatting and structure

Importing from Google Docs

Use Documize’s Google Drive integration:

  1. Connect your Google Drive account in Settings
  2. Select documents to import
  3. Documize will convert and import your documents

Customization and Extensions

Custom Templates

Create custom document templates for consistency:

  1. Go to Settings → Templates
  2. Create a new template
  3. Define structure with sections and content blocks
  4. Apply templates when creating new documents

Custom Branding

Customize Documize to match your brand:

  1. Navigate to Settings → Branding
  2. Upload your logo
  3. Configure color scheme
  4. Set custom favicon

API Integration

Documize provides a REST API for programmatic access:

Terminal window
# Example: Get list of spaces
curl -X GET https://example-app.klutch.sh/api/public/space \
-H "Authorization: Bearer YOUR_API_TOKEN"
# Example: Create a new document
curl -X POST https://example-app.klutch.sh/api/public/document \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"New Document","body":"Content here"}'

API documentation is available at: https://example-app.klutch.sh/api/docs


Troubleshooting

Cannot Access Documize Dashboard

  • Verify your app is running in the Klutch.sh dashboard
  • Check that the internal port is set to 5001
  • Ensure HTTP traffic type is selected
  • Review application logs for startup errors
  • Verify the DOCUMIZELOCATION environment variable is set correctly

Database Connection Errors

  • Verify the DOCUMIZEDB connection string format is correct
  • For PostgreSQL, ensure the database exists and user has proper privileges
  • Check that the database server is accessible (test connectivity)
  • Verify credentials are correct
  • For Klutch.sh PostgreSQL deployments, ensure port is set to 8000

Data Not Persisting

  • Confirm the persistent volume is attached at /data
  • Check the volume has sufficient space
  • Verify file permissions allow Documize to write to the mount point
  • For SQLite, ensure the database file path is within the mounted volume

SMTP Email Not Working

  • Verify SMTP configuration in the DOCUMIZESMTP environment variable
  • Check SMTP server is accessible from Klutch.sh
  • Test SMTP credentials independently
  • Review application logs for SMTP errors
  • Ensure sender email is authorized with your SMTP provider

Slow Performance

  • Check CPU and memory usage in Klutch.sh dashboard
  • Monitor database query performance
  • Consider upgrading to PostgreSQL if using SQLite
  • Increase compute resources if needed
  • Review and optimize database indexes
  • Check for slow queries in database logs

Search Not Working Properly

  • Verify database indexes are created properly
  • Re-index documents from Settings → Maintenance
  • Check database connection is stable
  • Ensure sufficient database resources

Upgrading Documize

To upgrade Documize to a new version:

  1. Check Release Notes: Review the Documize release notes for breaking changes

  2. Backup First: Always backup your database and persistent volume before upgrading

  3. Update Dockerfile:

    FROM documize/community:v5.10.0 # Specify version
  4. Commit and Push:

    Terminal window
    git add Dockerfile
    git commit -m "Upgrade Documize to version 5.10.0"
    git push
  5. Monitor Deployment: Klutch.sh will automatically rebuild and redeploy

  6. Verify Migration: Check application logs to ensure database migrations complete successfully

  7. Test Functionality: Verify all features work correctly after upgrade

Important: Your data will be preserved because it’s stored in the persistent volume.


Additional Resources


Conclusion

Deploying Documize Community to Klutch.sh with Docker provides a powerful, self-hosted documentation and knowledge management solution with persistent storage, easy scalability, and full control over your data. By following this guide, you’ve set up a production-ready Documize instance with proper data persistence, security configurations, and best practices for team collaboration. Your documentation platform is now ready to help your team organize, share, and collaborate on knowledge effectively while maintaining complete ownership of your content and data.