A Docker container management script for running multiple instances of the linkding bookmark manager. Includes customizable title, logo and color theme.
- Installation
- Features
- Usage
- Environment Variables - Configuration
- Requirements
- Data Management
- Customization
- Support
Current Release: v1.0.0
- Clone this repository:
cd /opt
git clone --branch v1.0.0 https://git.ucommandit.org/uci/uci-linkding-bookmarks.git bookmarks
cd bookmarks
or
cd /opt
git clone --branch v1.0.0 https://github.com/uCOMmandIt/uci-linkding-bookmarks.git bookmarks
cd bookmarks
For latest development version, omit the
--branch v1.0.0
option
Quick Start for CSS Only:
If you just want to generate custom CSS for an existing linkding instance:./bm css anyname # Generates CSS files for copy/paste into linkding settings
see the Customization section below.
- Create a branch for your machine:
git checkout -b my-machine-name
- Edit .gitignore to track your configurations:
# Remove or comment out these lines:
# /assets/custom-logo.*
# /containers/*
- Start a new bookmarks container:
./bm run mybookmarks
On first run, you'll be prompted to:
- Set custom port (or auto-detect available)
- Configure data storage location
- Set admin username/password
- Running ok? Commit your branch:
git add .
git commit -m "feat: add first bookmarks configuration/instance"
[ create a remote repo, set the remote]
git push myremote my-machine-name
Data Storage Note:
By default, bookmark data inbookmarks/
is not committed (recommended).
To version control your bookmarks, either:
- Remove
bookmarks/
from .gitignore (not recommended)- Use
HOST_VOLUME_DIR
to store data in a backed-up location (recommended)
- Customize your theme and title after the site is up and running:
./bm css mybookmarks
see the Customization section below.
- Manage multiple bookmark containers on the same machine
- Automatic port conflict detection and resolution
- Environment variable persistence
- Volume management for persistent data
- Custom logo and theme support
bm <command> [options] <bookmarks-name>
run
Create and start the bookmarks container interactivelystart
Start container in detached mode (same as: run -d)stop
Stop the running bookmarks containerrestart
Restart the bookmarks containerlog
Show logs from the bookmarks containerconfig
Display the Docker Compose configuration-e
EditConfigure environment variables (port, paths, credentials)
admin
Run commands in the container:-s
Open an interactive shell-x
Execute a shell command[args]
Run Django manage.py commands (default)
delete
Delete container, environment file and data (DANGEROUS!)
status
Show status of all instances or specific instance-q
Quiet mode - only output running instance names
upgrade
Upgrade all instances to latest linkding versionhelp
Show this help message
bm run mybookmarks # Create and start container interactively
bm run -d mybookmarks # Create and start container in background
bm start mybookmarks # Start container in background
bm stop mybookmarks # Stop the container
bm status # Show all instances status
bm status -q # List running instances (for scripts)
bm status mybookmarks # Check specific instance status
bm upgrade # Upgrade all instances to latest version
Each instance/container gets a corresponding .env in /containers
./bm config -e
will allow you to run the configurator (recommended) or edit the file directly.
Basic settings configured through bm config -e
:
HOST_PORT
- Container port (default: 9090)HOST_VOLUME_DIR
- Base data directoryHOST_VOLUME_PATH
- Full custom data pathLD_SUPERUSER_NAME
- Admin usernameLD_SUPERUSER_PASSWORD
- Admin password
Additional Linkding options can be added manually to the env file. See example.env
for available settings such as:
- Context path
- Authentication proxy support
- URL validation
- Background tasks
- CSRF trusted origins
For full documentation of options, see Linkding Options
- Linux-compatible shell with bash
- Linux distribution (recommended)
- macOS
- Windows with Linux emulator (WSL2, Cygwin, etc.)
- Docker
- docker-compose
- netcat (for port checking)
- xclip (optional, for clipboard support)
- current user in docker group
- Python 3.6 or higher (no external dependencies)
Bookmark data is stored in:
./bookmarks/<name>/
by default- Configurable via
HOST_VOLUME_DIR
or full custom path (recommended)
The delete command removes:
- Container instance
- Environment configuration
- All bookmark data
Requires two confirmations:
./bm delete mybookmarks
If you just want to generate custom CSS for an existing linkding instance:
./bm css throwawayname
otherwise use the bookmarks instance name and a file will be created at containers/<name>.custom.<scheme>.css
that you can reuse without generating again.
./bm css <name>
Running the css command will walk you through setting
- custom webpage title
- Webpage color theme.
environment variables of these settings will be saved in the bookmarks env file and if the css command is issued again will be used as defaults.
once the css generator is done it will put the content in the clipboard (using xclip) and also show the in the terminal for copy, or you can open your favorite edtior to review and copy.
Then you paste that css into the Custom CSS field in the setting page, general tab followed by save. And bang! your new colors and title.
The theme generator creates a complete CSS variable-based theme from a single base color:
- Base Color Selection: Choose any color in HEX format (#RRGGBB) to define your theme's primary color
- Color Scale Generation: The script calculates a complete set of contrast levels (5%-90%) derived from your base color
- Adaptive Text Colors: Text colors are generated with proper hierarchy and appropriate contrast for readability
- Light/Dark Mode: The theme generator handles both light and dark modes by inverting color relationships
- UI Element Styling: Generates appropriate colors for buttons, inputs, menus, and interactive states
- Logo Integration: Automatically calculates logo hue rotation to match your chosen theme
The theme system uses CSS variables exclusively, allowing for:
- Complete theme transformation without touching HTML
- Proper color relationships throughout the UI
- Consistent contrast levels for accessibility
- Dynamic adjustments of all derived colors when just the base color changes
This generator is based on color theory principles to ensure all generated themes maintain proper contrast ratios and visual hierarchy regardless of the chosen base color.
The actual color calculations are performed in the maketheme.py
script, which contains detailed documentation about the color theory implementation. For those interested in the technical details or adapting the theme generator for other projects, this file provides a comprehensive overview of the approach.
A template SVG file is provided in assets/circle-template.svg
to help create custom logos with the correct base color (#815EE8).
Steps to create a custom logo:
- Start with the provided template:
assets/circle-template.svg
- Edit the SVG in your preferred vector editor (Inkscape, Illustrator, or online SVG editors)
- Alternative: Use an AI assistant to generate SVG code from a simple description (e.g., "Create an SVG logo of a cat with the main color #815EE8 and transparent background")
- Keep the purple color (#815EE8) as your main color for proper theme rotation
- Save your modified SVG as
assets/custom-logo.svg
- Convert to PNG using ImageMagick:
magick assets/custom-logo.svg -background none -resize 100x100 assets/custom-logo.png
IMPORTANT: The image MUST have:
- Transparent background (not white)
- Main logo color should match Linkding's purple base color (#815EE8)
- PNG format
- Square aspect ratio (1:1)
- ~100x100px recommended size
The theme generator automatically rotates the logo's hue based on your selected theme color. This rotation calculation assumes your logo starts with the default Linkding purple color. Using a different base color will result in incorrect color transformations when themes are applied.
For questions, help, or feature suggestions, please use GitHub Discussions. This is the best place to:
- Get help with setup or configuration
- Share ideas for new features
- Show off your custom themes or logos
- Ask general questions about usage
Please reserve the Issue Tracker for actual bugs or issues requiring code changes.