Frequently Asked Questions¶
General Questions¶
What is Trunk8?¶
Trunk8 is a self-hosted link shortener and file hosting platform built with Flask. It allows you to create short, memorable URLs that redirect to longer URLs, host files for download, or render markdown content.
Why should I use Trunk8 instead of a commercial service?¶
- Privacy: Your data stays on your servers
- Control: No usage limits or restrictions
- Customization: Modify to fit your needs
- Cost: No monthly fees or subscriptions
- Reliability: Not dependent on third-party services
What are the system requirements?¶
- Python 3.12 or higher
- 512MB RAM minimum (1GB recommended)
- 1GB disk space (plus space for uploaded files)
- Any OS that supports Python (Linux, macOS, Windows)
Installation¶
How do I install Trunk8?¶
See the Installation Guide for detailed instructions. The quickest method:
git clone https://github.com/lancereinsmith/trunk8.git
cd trunk8
uv sync # or uv sync --extra dev for development
python run.py
Can I use pip instead of uv?¶
Yes! While we recommend uv for faster dependency installation, pip works fine:
How do I run Trunk8 with Docker?¶
See the Docker Guide for more details.
Configuration¶
Where are the configuration files?¶
Configuration files are in the application root:
config/config.toml
- Application settingsusers/{username}/links.toml
- Per-user link data storageusers/users.toml
- User management dataconfig/themes.toml
- Available themes
How do I change the admin password?¶
Set the TRUNK8_ADMIN_PASSWORD
environment variable:
Or create a .env
file:
Can I change the port for the development server?¶
Yes, use the TRUNK8_PORT
environment variable:
Or in a .env
file:
You can also modify run.py
directly:
For production with Gunicorn:
How do I enable HTTPS?¶
Use a reverse proxy like Nginx with SSL certificates. See the Production Deployment guide.
Usage¶
What link types are supported?¶
- Redirect - Forward to another URL
- File - Serve uploaded files
- Markdown - Render markdown as HTML
Can I use special characters in short codes?¶
Short codes support:
- Letters (a-z, A-Z)
- Numbers (0-9)
- Hyphens (-)
- Underscores (_)
Avoid spaces and special characters.
How do I set link expiration?¶
When creating or editing a link, set the "Expiration Date" field. Expired links are automatically deleted.
What file types can I upload?¶
Trunk8 accepts all file types by default. The MIME type is automatically detected for proper browser handling.
Is there a file size limit?¶
Yes, the file size limit is configurable in config/config.toml
:
Also consider:
- Available disk space
- Web server limits (Nginx default: 1MB, adjust with
client_max_body_size
) - Browser timeouts for large files
To change the limit, edit config/config.toml
and restart the application.
Themes¶
How many themes are available?¶
25+ themes from Bootswatch are included. See the full list in Themes Guide.
Can I use different themes for UI and markdown?¶
Yes! Set them separately in Settings or config/config.toml
:
Can I add custom themes?¶
Currently, custom themes require modifying the source code. Future versions may support custom CSS uploads.
Troubleshooting¶
"Link not found" error¶
Possible causes:
- Typo in the short code (they're case-sensitive)
- Link has expired
- Link was deleted
Can't upload files¶
Check:
- Disk space availability
- Write permissions on
assets/
directory - Web server upload limits
Theme changes don't appear¶
- Clear browser cache
- Try incognito/private mode
- Check for JavaScript errors in console
Port 5001 already in use¶
Either:
- Stop the other process:
lsof -i :5001
thenkill <PID>
- Use a different port (see above)
Configuration changes not taking effect¶
- Check TOML syntax for errors
- Verify file permissions
- Look for error messages in terminal
Security¶
Is Trunk8 secure?¶
Trunk8 includes basic security features:
- Password-protected admin interface
- Session-based authentication
- Secure file naming
- Input validation
For production, also implement:
- HTTPS encryption
- Firewall rules
- Regular updates
- Strong passwords
How are passwords stored?¶
The admin password is compared directly from the environment variable. Future versions may add password hashing.
Are uploaded files public?¶
Files are accessible to anyone with the link. For sensitive files:
- Use expiration dates
- Monitor access logs (in web server)
Maintenance¶
How do I backup Trunk8?¶
Backup these files:
config/config.toml
links.toml
assets/
directory
How do I update Trunk8?¶
git pull
uv sync # or uv sync --extra dev for development dependencies
# or pip install -e . --upgrade (pip install -e .[dev] --upgrade for dev dependencies)
Always backup before updating!
How do I monitor Trunk8?¶
- Application logs: Check terminal output
- Access logs: Configure in web server
- System monitoring: Use tools like Prometheus
- Health checks: Monitor the home page
Can I migrate from another link shortener?¶
Manual migration is possible:
- Export links from old system
- Convert to TOML format
- Add to
links.toml
- Copy files to
assets/
Advanced¶
Can I use a database instead of TOML?¶
Not currently. TOML files work well for most use cases. Database support may be added in future versions.
Is there an API?¶
No REST API yet, but you can:
- Modify TOML files programmatically
- Access links directly via URLs
- Extend the code with custom routes
Can I customize the UI?¶
Yes, by modifying:
- Templates in
app/templates/
- CSS in
app/static/css/
- JavaScript in
app/static/js/
How can I contribute?¶
See the Contributing Guide:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Getting Help¶
Where can I get support?¶
- GitHub Issues - Bug reports
- GitHub Discussions - Questions
- Documentation - You're reading it!
How do I report a bug?¶
Create a GitHub issue with:
- Trunk8 version
- Python version
- Operating system
- Steps to reproduce
- Error messages