Installation¶
This guide will walk you through installing Trunk8 on your system. Choose the installation method that best suits your needs.
Prerequisites¶
Before installing Trunk8, ensure you have:
- Python 3.12 or higher - Trunk8 requires Python 3.12+
- Git - For cloning the repository
- A web server - For production deployments (optional for development)
Installation Methods¶
Option 1: Using uv (Recommended)¶
uv is a fast Python package installer and resolver, written in Rust. It's the recommended way to install Trunk8.
1. Install uv¶
2. Clone the Repository¶
3. Install Dependencies¶
# For production (runtime dependencies only)
uv sync
# For development (includes test and documentation dependencies)
uv sync --extra dev
This command will:
- Create a virtual environment in
.venv
- Install dependencies from
pyproject.toml
- Lock dependencies in
uv.lock
for reproducible builds
Dependency Groups:
test
: Testing tools (pytest, pytest-flask, pytest-cov, pytest-mock)docs
: Documentation tools (mkdocs, mkdocs-material, mkdocstrings)dev
: Convenience group that includes both test and docs dependencies
4. Activate Virtual Environment¶
Option 2: Using pip¶
If you prefer using pip, follow these steps:
1. Clone the Repository¶
2. Create Virtual Environment¶
3. Activate Virtual Environment¶
4. Install Dependencies¶
# For production (runtime dependencies only)
pip install -e .
# For development (includes test and documentation dependencies)
pip install -e .[dev]
The -e
flag installs the package in "editable" mode, which is useful for development.
Available dependency groups:
pip install -e .[test]
- Install with testing dependenciespip install -e .[docs]
- Install with documentation dependenciespip install -e .[dev]
- Install with all development dependencies
Option 3: Docker Installation¶
For the easiest deployment, use Docker:
Or build from source:
See the Docker Deployment guide for detailed Docker instructions.
Verify Installation¶
After installation, verify everything is working:
1. Check Python Version¶
Should show Python 3.12 or higher.
2. Run Development Server¶
You should see output like:
3. Access the Application¶
Open your web browser and navigate to http://localhost:5001
. You should see the Trunk8 login page.
Next Steps¶
Now that Trunk8 is installed, you can:
- Follow the Quick Start guide to create your first link
- Learn about Docker Deployment for production use
- Configure Trunk8 using the Configuration Guide
- Set up authentication with Environment Variables
Troubleshooting¶
Common Issues¶
Permission Denied¶
If you get permission errors during installation:
Port Already in Use¶
If port 5001 is already in use:
-
Set a different port using the
TRUNK8_PORT
environment variable: -
Or stop the process using port 5001:
Missing Dependencies¶
If you encounter missing dependency errors:
# With uv (runtime dependencies)
uv sync --refresh
# With uv (development dependencies)
uv sync --extra dev --refresh
# With pip (runtime dependencies)
pip install -e . --upgrade
# With pip (development dependencies)
pip install -e .[dev] --upgrade
Getting Help¶
If you encounter issues:
- Check the FAQ
- Search GitHub Issues
- Create a new issue with:
- Your Python version
- Your operating system
- Complete error messages
- Steps to reproduce