29 ноя 2023

Setting up TimeTagger on Raspberry Pi

TimeTagger is a lightweight web-based time management tool, offering a simple interface to track tasks efficiently. With the ability to start timers and mark them with task details using hashtags, TimeTagger facilitates easy grouping of related tasks. This is particularly useful when working on various projects or tasks for different clients. Additionally, the software allows exporting reports to analyze time spent on different activities.

The lightweight nature of TimeTagger makes it an ideal choice for running on a Raspberry Pi without significantly impacting system resources. Installation is straightforward, as outlined in the following steps. Note that TimeTagger provides container images for ARM64, requiring the 64-bit variant of the Raspberry Pi operating system.

Step 1: Prepare Your Raspberry Pi for TimeTagger


Ensure your operating system is up to date:

bash

sudo apt update
sudo apt upgrade -y

Install required packages:

bash

sudo apt install sed apache2-utils

Follow the guide to install Docker on your Raspberry Pi.

Create a directory for TimeTagger's Compose file:

bash

sudo mkdir -p /opt/stacks/timetagger

Change to the new directory:

bash

cd /opt/stacks/timetagger

Step 2: Generate Your TimeTagger Credentials


Generate the password string for TimeTagger using the following command, replacing <PASSWORD> with your desired password:

bash

htpasswd -bnBC 8 "" <PASSWORD> | tr -d ':\n' | sed 's/$2y/$2a/; s/\$/$$/g'; echo

Save the generated string; it will be used in the next section.

Step 3: Write the Compose File for TimeTagger on Raspberry Pi


Start writing the Compose file:

bash

sudo nano compose.yaml

Add the following lines to the file, replacing <CREDENTIAL> with the generated credentials line:

yaml

version: "3"
services:
timetag:
image:
ghcr.io/almarklein/timetagger
ports:
- "8989:80"
volumes:
- /opt/stacks/timetagger/data:/root/_timetagger
environment:
- TIMETAGGER_BIND=0.0.0.0:80
- TIMETAGGER_DATADIR=/root/_timetagger
- TIMETAGGER_LOG_LEVEL=info
- TIMETAGGER_CREDENTIALS=<CREDENTIALS>

Save and exit by pressing CTRL+X, Y, then ENTER.

Step 4: Launch TimeTagger on Raspberry Pi


Start TimeTagger using the following command:

bash

docker compose up -d

The -d option detaches Docker from the current terminal session after launching TimeTagger.

This guide enables you to seamlessly run TimeTagger on your Raspberry Pi, providing an efficient time management solution with minimal resource usage.

More blog posts about the Raspberry Pi:

How to Connect a Raspberry Pi to a Mobile Phone

Комментарии

Комментариев нет.