Quick Start¶
Get up and running with Trunk8 in just a few minutes! This guide assumes you've already installed Trunk8.
Step 1: Start the Server¶
Start the Trunk8 development server:
The server will start on http://localhost:5001
. To use a different port, set the TRUNK8_PORT
environment variable:
Step 2: Log In¶
- Navigate to
http://localhost:5001
in your web browser - You'll be redirected to the login page
- Enter the admin password (default:
admin
)
Change Default Password
Always set a secure password in production using the TRUNK8_ADMIN_PASSWORD
environment variable:
Step 3: Create Your First Link¶
URL Shortening¶
- Click "Add Link" in the navigation
- Enter a Short Code (e.g.,
docs
) - Select "Redirect" as the link type
- Enter the Target URL (e.g.,
https://github.com/lancereinsmith/trunk8
) - Click "Create Link"
Your shortened link is now available at http://localhost:5001/docs
!
File Hosting¶
- Click "Add Link"
- Enter a Short Code (e.g.,
report
) - Select "File" as the link type
- Click "Choose File" and select a file to upload
- Click "Create Link"
Files are automatically secured with UUID4 naming and stored with comprehensive metadata including file size, MIME type, and upload timestamp. When users download files, they see the original filename while the actual storage uses secure UUIDs to prevent enumeration attacks.
Access your file at http://localhost:5001/report
.
File Security
Uploaded files are stored with UUID4 names (e.g., f47ac10b-58cc-4372-a567-0e02b2c3d479.pdf
) for maximum security while preserving the original filename for user downloads.
Markdown Rendering¶
- Click "Add Link"
- Enter a Short Code (e.g.,
readme
) - Select "Markdown" as the link type
- Either:
- Upload a
.md
file, or - Type/paste markdown content directly
- Upload a
- Click "Create Link"
View your rendered markdown at http://localhost:5001/readme
.
HTML Hosting¶
- Click "Add Link"
- Enter a Short Code (e.g.,
webpage
) - Select "Raw HTML" as the link type
- Either:
- Upload an
.html
file, or - Type/paste HTML content directly
- Upload an
- Click "Create Link"
View your custom HTML page at http://localhost:5001/webpage
.
Auto-Detection
HTML files (.html
or .htm
) uploaded to the markdown section are automatically detected and rendered as HTML instead of markdown!
Step 4: Manage Your Links¶
View All Links¶
Click "List Links" to see all your created links. From here you can:
- View link details
- Edit existing links
- Delete links you no longer need
- See expiration dates
Edit a Link¶
- Click the "Edit" button next to any link
- Modify the link properties:
- Change the target URL for redirects
- Upload a new file for file links
- Update markdown content
- Set or change expiration dates
- Click "Update Link"
Set Link Expiration¶
- When creating or editing a link, set an Expiration Date
- The link will automatically be deleted after this date
- Expired links return a "Link not found" page
Step 5: Customize Themes¶
- Click "Settings" in the navigation
- Choose a UI Theme from 25+ options
- Select a Markdown Theme (can be different from UI theme)
- Click "Save Settings"
Themes are applied immediately without restarting the server.
Example Workflows¶
Personal Bookmarks¶
Create easy-to-remember shortcuts for frequently accessed sites:
/gh
→ Your GitHub profile/mail
→ Your email provider/cal
→ Your calendar application
File Sharing¶
Share files with colleagues using memorable links:
/q4-report
→ Quarterly report PDF/presentation
→ Latest presentation slides/logo
→ Company logo files
Documentation Hub¶
Host markdown documentation with custom themes:
/api-docs
→ API documentation/user-guide
→ User manual/changelog
→ Release notes
Custom Web Pages¶
Host interactive HTML content with full styling:
/portfolio
→ Personal portfolio page/calculator
→ Interactive calculator tool/dashboard
→ Custom analytics dashboard/landing
→ Marketing landing page
Configuration Files¶
Trunk8 uses TOML files for configuration, which are automatically created on first run:
config/config.toml¶
Multi-User Data Files¶
users/users.toml - User management:
users/admin/links.toml - Admin's links:
[links.example]
type = "redirect"
url = "https://example.com"
[links.myfile]
type = "file"
path = "f47ac10b-58cc-4372-a567-0e02b2c3d479.pdf"
original_filename = "document.pdf"
file_size = 1048576
mime_type = "application/pdf"
upload_date = "2024-01-15T10:30:00"
expiration_date = "2024-12-31T23:59:59"
Tips and Tricks¶
Memorable Short Codes¶
- Use descriptive names:
docs
,api
,download
- Create categories:
proj-alpha
,proj-beta
- Use dates for temporary links:
meeting-2024-01
Bulk Operations¶
While Trunk8 doesn't have a built-in bulk import, you can:
- Edit the appropriate
users/{username}/links.toml
file directly - Use the TOML format to copy/paste link configurations
- Changes are automatically reloaded (no restart required)
Note: Only edit your own user's links file, or the admin can edit any user's file.
Security Best Practices¶
- Always change the default password
- Use HTTPS in production (configure via reverse proxy)
- Set secure session keys with
TRUNK8_SECRET_KEY
- Regularly review and clean up old links
- Monitor file uploads for unusual activity
Next Steps¶
- Explore Link Types in detail
- Learn about Configuration Options
- Set up Docker Deployment for production
- Read about Security Considerations
Need Help?¶
- Check the User Guide for detailed features
- See the FAQ for common questions
- Report issues on GitHub