📚 Complete Documentation - For detailed setup, configuration, API reference, and deployment guides.
A modern, self-hosted multi-user link shortener and file hosting platform built with Flask. Transform long URLs into memorable short codes, host files with secure UUID4 naming, and create beautiful markdown documents with live rendering.
- 👥 Multi-User Support - Individual user accounts with complete data isolation
- 🔗 Smart Link Shortening - Convert URLs into clean, memorable short codes
- 📁 Secure File Hosting - Upload and share files with comprehensive metadata tracking
- 📝 Live Markdown Rendering - Create and share markdown documents with real-time preview
- 🌐 Raw HTML Hosting - Host custom HTML pages with full CSS, JavaScript, and interactive elements
- 🎨 25+ Themes - Customizable Bootswatch themes for both UI and markdown rendering
- 🔐 Advanced Authentication - Multi-user login with admin privileges and user switching
- ⚡ Live Configuration - TOML-based config with automatic reloading
- 🐳 Docker Ready - One-command deployment
- ⏱️ Link Expiration - Set expiration dates with automatic cleanup
# Quick start with Docker
docker run -p 5001:5001 \
-e TRUNK8_ADMIN_PASSWORD=your_secure_password \
-e TRUNK8_SECRET_KEY=your_secret_key \
ghcr.io/lancereinsmith/trunk8:latestVisit http://localhost:5001 and log in with:
- Username: (leave blank for admin mode)
- Password:
your_secure_password
# Clone and setup
git clone https://github.com/lancereinsmith/trunk8.git
cd trunk8
# Install with uv (recommended)
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync
# Or install with pip
pip install -e .
# Run the application
python run.pyVisit http://localhost:5001 and log in with the default password: admin
Multi-User Data Isolation:
users/
├── users.toml # User management
├── admin/
│ ├── links.toml # Admin's links
│ └── assets/ # Admin's files
└── {username}/
├── config.toml # User preferences
├── links.toml # User's links
└── assets/ # User's files
Link Types:
- File Links - Secure file hosting with UUID4 naming
- URL Redirects - Clean short links to external URLs
- Markdown Content - Live-rendered documents with theme support
- HTML Content - Custom HTML pages with full CSS, JavaScript, and interactive features
For comprehensive information, please visit our full documentation:
- Quick Start Guide - Detailed setup instructions
- Docker Deployment - Container deployment guide
- Configuration - TOML configuration options
- User Guide - Using the application
- API Reference - Developer documentation
- Deployment - Production deployment
| Variable | Description | Default |
|---|---|---|
TRUNK8_ADMIN_PASSWORD |
Admin login password | admin |
TRUNK8_SECRET_KEY |
Session encryption key | (generated) |
TRUNK8_PORT |
Server port | 5001 |
TRUNK8_LOG_LEVEL |
Logging level | INFO |
- Set strong
TRUNK8_ADMIN_PASSWORDandTRUNK8_SECRET_KEYin production - Each user's data is completely isolated
- Secure file handling with random filenames
- Automatic cleanup of expired content
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a Pull Request
See our Contributing Guide for detailed instructions.
MIT License - see the LICENSE file for details.
📖 Read the Quick Start Guide
