Skip to content

Deploying Mikochi

Introduction

Mikochi is a minimalist, self-hosted remote file browser that provides a clean and fast interface for managing files on your server. Built with Go for the backend and a modern JavaScript frontend, Mikochi focuses on simplicity and speed.

Unlike feature-heavy file managers, Mikochi does the essentials well: browse directories, upload files, download files, and stream media. Its lightweight nature makes it perfect for deployment alongside other services that need file management.

Key highlights of Mikochi:

  • Minimalist Design: Clean, distraction-free interface
  • Fast Performance: Written in Go for speed and efficiency
  • File Upload: Drag-and-drop file uploads
  • Media Streaming: Stream video and audio files directly
  • Image Preview: View images without downloading
  • Search: Find files quickly across directories
  • Mobile Friendly: Responsive design works on any device
  • Single Binary: Easy deployment with no dependencies
  • Authentication: Basic authentication for security
  • 100% Open Source: MIT licensed

This guide walks through deploying Mikochi on Klutch.sh using Docker, configuring access, and managing your files remotely.

Why Deploy Mikochi on Klutch.sh

Deploying Mikochi on Klutch.sh provides several advantages:

Remote File Access: Access your files from anywhere with a web browser.

Simplified Deployment: Klutch.sh handles container deployment automatically.

Persistent Storage: Files survive restarts and redeployments.

HTTPS by Default: Secure file access with automatic SSL.

Lightweight: Minimal resource usage means lower costs.

Custom Domains: Access files from your own domain.

Prerequisites

Before deploying Mikochi on Klutch.sh, ensure you have:

Understanding Mikochi Architecture

Mikochi has a simple architecture:

Go Backend: Serves files and handles API requests.

JavaScript Frontend: Single-page application for the file browser.

File System: Direct access to the mounted directory.

Authentication: Basic HTTP authentication layer.

Preparing Your Repository

Create a GitHub repository for your Mikochi deployment.

Repository Structure

mikochi-deploy/
├── Dockerfile
├── README.md
└── .dockerignore

Creating the Dockerfile

Create a Dockerfile in the root of your repository:

FROM ghcr.io/zer0tonin/mikochi:latest
# Set environment variables
ENV DATA_DIR=/data
ENV USERNAME=${MIKOCHI_USERNAME:-admin}
ENV PASSWORD=${MIKOCHI_PASSWORD}
# Expose the web interface
EXPOSE 8080
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:8080/ || exit 1

Advanced Dockerfile

For additional configuration:

FROM ghcr.io/zer0tonin/mikochi:latest
# Environment variables
ENV DATA_DIR=/data
ENV USERNAME=${MIKOCHI_USERNAME:-admin}
ENV PASSWORD=${MIKOCHI_PASSWORD}
# Hostname for the application
ENV HOST=0.0.0.0
ENV PORT=8080
# JWT secret for session tokens
ENV JWT_SECRET=${MIKOCHI_JWT_SECRET}
# Expose port
EXPOSE 8080
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:8080/ || exit 1

Environment Variables Reference

VariableRequiredDefaultDescription
DATA_DIRNo/dataRoot directory for file browsing
USERNAMENoadminAuthentication username
PASSWORDYes-Authentication password
HOSTNo0.0.0.0Server bind address
PORTNo8080Server port
JWT_SECRETNorandomSecret for JWT tokens

Deploying Mikochi on Klutch.sh

    Generate a Secure Password

    Create a strong password for authentication:

    Terminal window
    openssl rand -base64 24

    Push Your Repository to GitHub

    Initialize and push your repository:

    Terminal window
    git init
    git add Dockerfile .dockerignore README.md
    git commit -m "Initial Mikochi deployment configuration"
    git remote add origin https://github.com/yourusername/mikochi-deploy.git
    git push -u origin main

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project named “mikochi” or “file-browser”.

    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:

    • Select HTTP as the traffic type
    • Set the internal port to 8080

    Set Environment Variables

    Add the following environment variables:

    VariableValue
    MIKOCHI_USERNAMEYour username
    MIKOCHI_PASSWORDYour secure password
    MIKOCHI_JWT_SECRETRandom string for JWT

    Attach Persistent Volumes

    Add storage for your files:

    Mount PathRecommended SizePurpose
    /dataVariesYour file storage

    Deploy Your Application

    Click Deploy to start the build process.

    Access Mikochi

    Once deployed, access your file browser at https://your-app-name.klutch.sh.

Using Mikochi

Browsing Files

Navigate your file structure:

  1. Log in with your credentials
  2. Click folders to navigate
  3. Use breadcrumbs to go back
  4. Click the home icon to return to root

Uploading Files

Add files to your storage:

  1. Navigate to the target directory
  2. Drag files onto the browser window
  3. Or click the upload button
  4. Monitor upload progress

Downloading Files

Retrieve files from storage:

  1. Navigate to the file
  2. Click the download icon
  3. File downloads to your device

Streaming Media

View and play media directly:

  • Click video files to stream
  • Click audio files to play
  • Click images to preview

Searching

Find files quickly:

  1. Use the search bar
  2. Enter filename or partial match
  3. Results update as you type

File Organization

Directory Structure

Organize files logically:

/data/
├── Documents/
│ ├── Work/
│ └── Personal/
├── Media/
│ ├── Photos/
│ ├── Videos/
│ └── Music/
└── Backups/

Best Practices

  • Use consistent naming conventions
  • Create logical folder hierarchies
  • Clean up unused files regularly
  • Monitor storage usage

Security Considerations

Strong Credentials

Protect your file access:

  • Use a strong, unique password
  • Consider changing credentials periodically
  • Don’t share credentials unnecessarily

Access Control

Mikochi provides single-user authentication:

  • All authenticated users have full access
  • Consider network-level restrictions for sensitive files
  • Use HTTPS (provided by Klutch.sh)

Integration Ideas

File Sharing

Use Mikochi alongside other services:

  • Share files between applications
  • Provide file storage for web apps
  • Manage media library files

Backup Access

Access backup files remotely:

  • Browse backup archives
  • Retrieve specific files
  • Verify backup contents

Troubleshooting

Cannot Login

  • Verify username and password are correct
  • Check environment variables are set
  • Review container logs

Upload Fails

  • Check available storage space
  • Verify write permissions
  • Check file size limits

Slow Performance

  • Allocate more resources
  • Reduce concurrent operations
  • Check network connectivity

Additional Resources

Conclusion

Deploying Mikochi on Klutch.sh gives you a fast, minimalist file browser for remote file management. With its clean interface, media streaming, and simple authentication, Mikochi provides essential file access without unnecessary complexity.

Access your files from anywhere with Mikochi on Klutch.sh.