Deploying GoBookmarks
Introduction
GoBookmarks is a lightweight, self-hosted bookmark manager written in Go. It provides a simple way to save, organize, and access your bookmarks from any device with a web browser, without relying on browser sync services or third-party cloud providers.
Designed for speed and simplicity, GoBookmarks offers essential bookmark management features with minimal resource usage. Its clean interface makes it easy to add, categorize, and search bookmarks quickly.
Key highlights of GoBookmarks:
- Simple Interface: Clean, intuitive web UI for bookmark management
- Fast Performance: Written in Go for speed and efficiency
- Tagging System: Organize bookmarks with tags
- Search: Quick search across all bookmarks
- Import/Export: Backup and restore your bookmarks
- No Dependencies: Single binary with embedded database
- Responsive Design: Works on desktop and mobile
- Private Hosting: Your bookmarks stay on your server
- Lightweight: Minimal memory and CPU usage
- Open Source: Free to use and modify
This guide walks through deploying GoBookmarks on Klutch.sh using Docker.
Why Deploy GoBookmarks on Klutch.sh
Deploying GoBookmarks on Klutch.sh provides several advantages:
Cross-Device Access: Access your bookmarks from any device with internet.
Privacy: Keep your browsing habits private, unlike browser sync services.
HTTPS Security: Secure access without manual certificate setup.
Always Available: Your bookmarks are accessible 24/7.
Persistent Storage: Bookmarks survive container updates and restarts.
Prerequisites
Before deploying GoBookmarks on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your configuration
- Basic familiarity with Docker
- (Optional) Existing bookmarks to import
Understanding GoBookmarks Architecture
GoBookmarks has a simple architecture:
Go Backend: Handles HTTP requests and bookmark operations.
Embedded Database: SQLite for storing bookmarks and tags.
Static Frontend: HTML/CSS/JS served by the Go binary.
File Storage: Optional storage for bookmark metadata.
Preparing Your Repository
Create a GitHub repository with your GoBookmarks configuration.
Repository Structure
gobookmarks-deploy/├── Dockerfile└── .dockerignoreCreating the Dockerfile
FROM golang:alpine AS builder
RUN apk add --no-cache git gcc musl-dev
WORKDIR /buildRUN git clone https://github.com/golinks/gobookmarks.git . && \ go build -o gobookmarks .
FROM alpine:latest
RUN apk add --no-cache ca-certificates
COPY --from=builder /build/gobookmarks /usr/local/bin/gobookmarks
# Create data directoryRUN mkdir -p /data
# Set environment variablesENV GOBOOKMARKS_DB=/data/bookmarks.dbENV GOBOOKMARKS_PORT=8080
# Expose portEXPOSE 8080
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \ CMD wget --no-verbose --tries=1 --spider http://localhost:8080 || exit 1
# Run applicationCMD ["gobookmarks"]Environment Variables Reference
| Variable | Required | Description |
|---|---|---|
GOBOOKMARKS_DB | No | Database file path |
GOBOOKMARKS_PORT | No | HTTP port (default: 8080) |
GOBOOKMARKS_USERNAME | No | Authentication username |
GOBOOKMARKS_PASSWORD | No | Authentication password |
Deploying GoBookmarks on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 8080
Push Your Repository to GitHub
Commit your Dockerfile to GitHub.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project named “gobookmarks” or “bookmarks”.
Create a New App
Create a new app and connect your GitHub repository.
Configure HTTP Traffic
Set up HTTP traffic:
Set Environment Variables
Configure authentication:
| Variable | Value |
|---|---|
GOBOOKMARKS_USERNAME | your-username |
GOBOOKMARKS_PASSWORD | your-secure-password |
Attach Persistent Volumes
| Mount Path | Size | Purpose |
|---|---|---|
/data | 1 GB | SQLite database |
Deploy Your Application
Click Deploy to build and launch GoBookmarks.
Access Your Instance
Navigate to your app URL to start managing bookmarks.
Using GoBookmarks
Adding Bookmarks
- Click “Add Bookmark”
- Enter URL
- Add title (auto-fetched if left blank)
- Add tags for organization
- Save bookmark
Organizing with Tags
Tags help categorize bookmarks:
- Create tags like “work”, “personal”, “reference”
- Filter bookmarks by clicking tags
- Add multiple tags per bookmark
Searching Bookmarks
Use the search bar to find bookmarks by:
- Title
- URL
- Tags
- Description
Editing Bookmarks
- Click on a bookmark
- Click “Edit”
- Modify details
- Save changes
Deleting Bookmarks
- Click on a bookmark
- Click “Delete”
- Confirm deletion
Import and Export
Importing Bookmarks
Import bookmarks from browsers:
- Export bookmarks from your browser as HTML
- Go to Settings > Import
- Upload the HTML file
- Review imported bookmarks
Exporting Bookmarks
Backup your bookmarks:
- Go to Settings > Export
- Choose format (HTML, JSON)
- Download the export file
Browser Integration
Bookmarklet
Create a bookmarklet for quick saving:
- Go to Settings > Bookmarklet
- Drag the bookmarklet to your browser’s bookmark bar
- Click it on any page to save
Browser Extension
If available, install the browser extension for:
- One-click bookmark saving
- Tag suggestions
- Quick access to recent bookmarks
Authentication
Basic Authentication
Protect your bookmarks with credentials:
GOBOOKMARKS_USERNAME=adminGOBOOKMARKS_PASSWORD=secure-passwordSession Management
GoBookmarks maintains login sessions:
- Persistent cookies
- Configurable session timeout
- Secure session handling
API Access
GoBookmarks may provide an API:
Endpoints
# List bookmarksGET /api/bookmarks
# Add bookmarkPOST /api/bookmarks{ "url": "https://example.com", "title": "Example", "tags": ["example", "demo"]}
# Delete bookmarkDELETE /api/bookmarks/:idAuthentication
Use API key or basic auth for API requests.
Backup Strategy
Database Backup
Regularly backup the database file:
/data/bookmarks.dbExport Backup
Schedule periodic exports:
- Export bookmarks to HTML
- Store in secure location
- Verify backup integrity
Customization
Appearance
Configure visual settings:
- Theme (light/dark)
- Layout options
- Display preferences
Default Settings
Set defaults for new bookmarks:
- Default tags
- Visibility settings
- Sort order
Troubleshooting
Cannot Save Bookmarks
- Check database file permissions
- Verify disk space availability
- Review application logs
Import Failures
- Validate import file format
- Check for encoding issues
- Review import size limits
Performance Issues
- Review database size
- Consider archiving old bookmarks
- Check server resources
Additional Resources
Conclusion
Deploying GoBookmarks on Klutch.sh provides a private, fast bookmark manager accessible from anywhere. Unlike browser sync services that may share your data, self-hosting ensures complete privacy over your browsing habits.
The combination of GoBookmarks’ simplicity and Klutch.sh’s reliable hosting creates an ideal solution for personal bookmark management.