Deploying Zipline
Introduction
Zipline is a modern, self-hosted image and file hosting solution designed to work seamlessly with ShareX and other screenshot/upload tools. It provides a fast, feature-rich platform for uploading, organizing, and sharing images, files, and text pastes.
Built with Next.js and designed for performance, Zipline offers a beautiful dashboard interface, powerful organization features, and extensive customization options. It’s the perfect solution for individuals and teams who want control over their file hosting without relying on third-party services.
Key highlights of Zipline:
- ShareX Compatible: Full integration with ShareX for screenshot and file uploads
- Multiple Upload Types: Support for images, videos, files, text pastes, and URLs
- Modern Dashboard: Beautiful, responsive interface for managing uploads
- User Management: Multi-user support with roles and permissions
- Folder Organization: Organize uploads into folders and collections
- Custom Domains: Vanity URLs for your uploads
- Embed Configuration: Customizable OpenGraph embeds for Discord and social media
- Statistics: Detailed upload and view statistics
- URL Shortening: Built-in URL shortener functionality
- OAuth Integration: Support for Discord, GitHub, and other OAuth providers
- Invites System: Control user registration with invite codes
- Themes: Light and dark mode with customizable themes
This guide walks through deploying Zipline on Klutch.sh using Docker, providing you with a powerful self-hosted file hosting platform.
Why Deploy Zipline on Klutch.sh
Deploying Zipline on Klutch.sh provides several advantages for file hosting:
Full Control: Host your own files without storage limits or terms of service restrictions.
HTTPS by Default: Automatic SSL certificates for secure file uploads and access.
Persistent Storage: Reliable storage for all your uploaded files and database.
GitHub Integration: Deploy updates automatically when you push configuration changes.
Custom Domains: Use your own domain for a branded file hosting experience.
Scalable Resources: Allocate storage and compute based on your needs.
Prerequisites
Before deploying Zipline on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your configuration
- Basic understanding of Docker and containerization
- ShareX or another compatible upload tool (optional)
- (Optional) A custom domain for your Zipline instance
Understanding Zipline Architecture
Zipline consists of several components:
Next.js Application: The main application handling the web interface and API.
PostgreSQL Database: Stores user data, file metadata, and configuration.
File Storage: Local or S3-compatible storage for uploaded files.
Background Jobs: Handle image processing and cleanup tasks.
Preparing Your Repository
Create a GitHub repository for your Zipline deployment.
Repository Structure
zipline-deploy/├── Dockerfile└── .dockerignoreCreating the Dockerfile
Create a Dockerfile for Zipline:
FROM ghcr.io/diced/zipline:latest
# Environment variablesENV CORE_SECRET=${CORE_SECRET}ENV CORE_DATABASE_URL=${DATABASE_URL}ENV CORE_HOSTNAME=0.0.0.0ENV CORE_PORT=3000
# Optional: Configure upload settingsENV UPLOADER_DEFAULT_FORMAT=DATEENV UPLOADER_ROUTE=/uENV UPLOADER_LENGTH=6ENV UPLOADER_DEFAULT_EXPIRATION=never
# Optional: Configure featuresENV FEATURES_INVITES=trueENV FEATURES_USER_REGISTRATION=falseENV FEATURES_OAUTH_REGISTRATION=false
# Optional: Configure URLsENV URLS_ROUTE=/goENV URLS_LENGTH=6
# Expose portEXPOSE 3000
# The base image includes the default entrypointEnvironment Variables Reference
| Variable | Required | Default | Description |
|---|---|---|---|
CORE_SECRET | Yes | - | Secret key for encryption (generate with openssl rand -hex 32) |
CORE_DATABASE_URL | Yes | - | PostgreSQL connection string |
CORE_HOSTNAME | No | 0.0.0.0 | Hostname to bind |
CORE_PORT | No | 3000 | Port for the web server |
UPLOADER_DEFAULT_FORMAT | No | DATE | Default filename format |
UPLOADER_ROUTE | No | /u | Route for file uploads |
UPLOADER_LENGTH | No | 6 | Length of generated URLs |
FEATURES_INVITES | No | true | Enable invite system |
FEATURES_USER_REGISTRATION | No | false | Allow public registration |
Deploying Zipline on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 3000
Generate Your Secret Key
Create a secure secret for Zipline:
openssl rand -hex 32Save this key for the environment variables configuration.
Push Your Repository to GitHub
Initialize and push your configuration to GitHub.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project named “zipline” or “file-host”.
Create a New App
Within your project, create a new app and connect your GitHub repository.
Configure HTTP Traffic
Set up HTTP for the web interface:
Set Environment Variables
Configure the following:
| Variable | Value |
|---|---|
CORE_SECRET | Your generated secret key |
CORE_DATABASE_URL | PostgreSQL connection string |
FEATURES_USER_REGISTRATION | false (enable after initial setup) |
Attach Persistent Volumes
Add storage for uploads and database:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/zipline/uploads | 50+ GB | Uploaded files |
/zipline/public | 1 GB | Public assets |
Deploy Your Application
Click Deploy to build and start Zipline.
Access Zipline
Once deployment completes, access your instance at https://your-app-name.klutch.sh.
Initial Setup
First-Time Configuration
- Navigate to your Zipline instance
- The first user to register becomes the administrator
- Go to Settings to configure your preferences
Creating Admin Account
On first launch:
- Click “Register” to create your admin account
- Choose a secure username and password
- After registration, disable public registration in settings
Configuring Upload Settings
Customize upload behavior:
- Navigate to Dashboard > Settings > Uploader
- Configure filename format (DATE, RANDOM, UUID)
- Set maximum file size and allowed types
- Configure expiration defaults
ShareX Integration
Generating ShareX Configuration
- Log in to Zipline
- Navigate to Dashboard > Settings > ShareX
- Click “Generate Config”
- Download the .sxcu file
- Import into ShareX
ShareX Setup
- Open ShareX
- Go to Destinations > Custom Uploader Settings
- Import the Zipline configuration
- Set Zipline as your default image uploader
Testing Upload
- Take a screenshot with ShareX
- Verify it uploads to your Zipline instance
- Check that the URL is copied to clipboard
Managing Files
Dashboard Features
The Zipline dashboard provides:
- Grid and list views for uploads
- Search and filter functionality
- Bulk operations (delete, move, export)
- Preview for images and videos
- Statistics and analytics
Organizing with Folders
Create folders to organize uploads:
- Navigate to Dashboard > Folders
- Create new folders for categories
- Move uploads between folders
- Share folders with other users
URL Shortening
Use the built-in URL shortener:
- Navigate to Dashboard > URLs
- Enter the long URL
- Optionally customize the short code
- Share the shortened URL
Customization
Themes
Customize the appearance:
- Go to Dashboard > Settings > Appearance
- Choose light or dark mode
- Select accent colors
- Configure embed colors for social media
Embed Configuration
Customize OpenGraph embeds for Discord and social media:
- Navigate to Settings > Embed
- Set embed title, description, and color
- Configure site name and author
- Preview embeds before saving
Troubleshooting Common Issues
Uploads Failing
Solutions:
- Check file size limits in configuration
- Verify storage volume has sufficient space
- Review logs for specific error messages
- Confirm ShareX token is correct
Images Not Displaying
Solutions:
- Verify the upload route configuration
- Check that the uploads volume is correctly mounted
- Review nginx/proxy configuration
ShareX Connection Issues
Solutions:
- Regenerate the ShareX configuration
- Verify the API token is current
- Check that HTTPS is working correctly
Additional Resources
Conclusion
Deploying Zipline on Klutch.sh gives you a powerful, self-hosted file hosting platform with seamless ShareX integration. With its modern dashboard, extensive customization options, and multi-user support, Zipline provides everything you need for hosting and sharing images, files, and URLs on infrastructure you control.