How to Install Hakatime on Manjaro

In this tutorial, we will show you step-by-step instructions to install Hakatime on Manjaro Linux. Hakatime is a self-hosted productivity tool that helps developers to track the time they spend on coding.

Prerequisites

Before installing Hakatime, you need to make sure that you have the following prerequisites installed on your system:

If you don't have these software packages installed on your Manjaro system, execute the following command in the terminal:

sudo pacman -S docker docker-compose git

Installation

Follow the below steps to install Hakatime on Manjaro:

Step 1: Clone the Hakatime Repository

First, you need to clone the Hakatime repository from GitHub using the following command:

git clone https://github.com/mujx/hakatime.git

Step 2: Create a .env File

Navigate to the hakatime directory and create a .env file using the following command:

cd hakatime
cp .env.example .env

Step 3: Configure Environment Variables

Open the .env file in a text editor and update the following environment variables as per your requirement:

# database credentials
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=hakatime

# mailer credentials
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=your_email@gmail.com
MAIL_PASSWORD=your_email_password
MAIL_ENCRYPTION=tls

# hakatime configuration
APP_URL=http://localhost:8000
APP_NAME=hakatime
APP_ENV=local
APP_KEY=
APP_DEBUG=true

Step 4: Start the Docker Containers

Start the Docker containers by running the following command:

sudo docker-compose up -d

The above command will initialize the database, and start the Hakatime web and worker containers.

Once the Docker containers are up and running, you can access the Hakatime application by navigating to http://localhost:8000 in your favorite web browser.

Conclusion

That's it! You have successfully installed Hakatime on your Manjaro system. You can use the Hakatime tool to track the time you spent on coding and improve your productivity.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!