How to Install wger on Linux Mint

wger is a web-based workout, nutrition, and weight management tool. It is open source and provides a vast library of exercises, recipes, and foods.

In this tutorial, we will learn how to install wger on Linux Mint, step-by-step.

Prerequisites

Step 1: Install Required Packages

First, you need to install some packages to make sure that wger runs correctly. Open the terminal and run the following command:

sudo apt-get install build-essential libssl-dev libffi-dev python3-dev python3-pip git

This command will install the required packages. It includes build-essential, which is a package containing several essential tools like compilers and make. These packages will help you to install any other packages or software that require a C compiler or makefile.

Step 2: Clone the wger Repository

Next, we need to clone the wger repository into your system. Run the following command in the terminal:

git clone https://github.com/wger-project/wger.git

This command will download the latest code of wger in a new directory named wger.

Step 3: Create and activate a Virtual Environment

It is a good practice to create a virtual environment for each Python project. It will ensure that all dependencies are isolated from your global Python installation. To create a virtual environment, run this command in the terminal:

python3 -m venv wgerenv

This command will create a virtual environment with the name wgerenv. Next, you need to switch to the virtual environment by running the following command:

source wgerenv/bin/activate

This command will activate the virtual environment. Once you are in the virtual envrionment your terminal prompt will show the env name.

Step 4: Install wger Dependencies

Now we need to install some additional packages that wger requires to run. We can use pip to install these packages. Run the following command in your terminal:

pip install -r wger/requirements.txt

This command will install the required packages from the requirements.txt file.

Step 5: Configure wger

Once you have installed the required packages, you need to configure wger. Copy the default configuration file:

cp wger/wger/settings/local-dist.py wger/wger/settings/local.py

Now edit the local.py file:

nano wger/wger/settings/local.py

Set SECRET_KEY to a strong and complex key:

SECRET_KEY = '<some_complex_secret_key>'

Step 6: Create and populate your Database.

Run the following terminal command to Initialize your database - this will create the necessary tables to run wger:

python wger/manage.py migrate

Run the following terminal command to populate your database - this will load up wger with demo data:

python wger/manage.py setup_test_data

By default, setup_test_data loads demo users, exercises, foods, recipes and everything else that you might need to test wger.

Step 7: Run wger

Our installation is now complete, and we can start wger with the following command:

python wger/manage.py runserver

This command will spin up the wger development server at http://127.0.0.1:8000.

If everything is working as planned, you will be able to sign up and log in to wger at http://127.0.0.1:8000.

Conclusion

Using the steps outlined above, you can install wger on Linux Mint in just a few minutes. Once you have the software up and running, you can explore the vast library of exercises, foods, and nutrition data available and start tracking your workouts and meals.

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!