-->

hobby retro, gaming, console

Retro gaming is quite popular among geeks. Retro gaming consoles allow people who grew up in the 80s and 90s to relive their fond memories. I still remember the endless hours I spent playing my Commodore 64. We didn’t have hi-res graphics back in the day but we surely enjoyed those games. In this post, I will show you how to acquire a retro gaming console and share my experiences with it.

Getting the console

This part is simply ordering an item but I wasn’t aware these things existed so it may be a surprise to some of you too. Just go to eBay and search “retro game console”.

You should get a LOT of results that look identical and look like the ones shown below:

Screenshot of identical retro gaming consoles listed on eBay

Of course, I can only show the UK ones, but since the kits look identical I’m sure they are pretty much the same everywhere for the price of £20 and equivalent.

Once you unpack your box, you get these contents:

Contents of the kit

Contents:

  • 1x Host

  • 2x Gamepad (battery not included)

  • 1x 64G memory card

  • 1x USB receiver

  • 1x HDMI cable

  • 1x USB power cable

  • 1x Manual

Setting Up the Console

Normally I would never plug in a product like this, but it’s completely offline. It connects to your TV via HDMI. It’s a self-contained small Linux box running Retroarch OS. All the games are already installed so no network connection is required. This gave me assurance for security and I plugged in the box and put batteries in the gamepad.

It boots very quickly and you get a list of the games already:

Retro gaming console showing the list of installed games

There are so many games and navigation may be a bit challenging at first because you have to get accustomed to the buttons on the gamepad.

Retro gaming console showing the search results for donkey and showing all versions of Donkey Kong game.

Once you’ve got hold of that, all you have to do is find your childhood’s favourite games:

Donkey Kong game in progress

Conclusion

Ideally, I’d like to build my own retro gaming console, probably based on a new Raspberry Pi 5. That way I can enjoy every step of the experience, not just the result. But it’s also good to know that to get the job done, all you have to do is fork over £20, plug a small computer into your TV and you’re good to go!

hobby fitness, self_hosting, wger, health, nutrition, tracker

If you are into fitness and looking into a fitness tracker that you can self-host, you will like wger. It handles workout, nutrition and weight tracking. In fact, you might still be interested in using it even if you don’t care about the FLOSS aspect of it because it comes with a free web application that you can sign up for free and use all its features.

Feature Review

To try it out yourself, first go to wger.de and click Register.

wger main page showing the Register button on the top right

Choose your username and password. Then click Register.

You can enter an email address too but it’s optional.

Register form showing username, email and password fields.

As soon as you register, you should be redirected to your dashboard.

wger dashboard showing workouts, nutritional plan and weight, without any data, after the registration.

If you entered your email address, you should also receive an email to confirm your address. Click on the link in the email to verify your email address.

Here you can start creating your workouts by clicking the button labeled “No workouts found. Add one now.”

You can create workout days and assign it to several days of the week which eliminates duplicating the same program for different days.

Add workout day page showing the description field and days of the week.

After you give a meaningful name to your workout day, you can add workouts by pressing the + button

Workout page showing the exercises added to the workout day which is currently empty

Just start typing the name of the exercise you want to add and it should search its database of exercises to suggest you the matching ones.

Add exercises page showing a keyword entered and auto-complete suggesting matching exercises.

It also groups the exercises by the muscle group to give you better guidance.

Then you can enter your target reps and weights:

Exercise settings showing reps, weight, unit and RiR for each set

RiR means Reps in Reserve which means how many more reps could you do before failure. For example, if you finish your set and feel like you could do 2 more reps without losing form, then your RiR is 2. This metric helps you to adjust the weight and reps in your training.  

Once you’ve added your workouts, it should look like this:

Exercise day showing all the exercises added to the day

You can add multiple training days. It will automatically remove the days you already selected to avoid creating overlapping training days:

Add workout day page shows the description field and the remaining days of the week.

After you’ve created your workout days, which are essentially your workout templates, you can record the actual exercise logs by clicking the Add new log button on the dashboard.

Dashboard showing the workout days and Add new log button under the table.

First you need to select the exercise day to add the logs to:

Add log to day dialog showing the list of exercise days to choose from.

After choosing the day, you are shown a page with all the sets and reps for your exercises. You can even record start and end times and your personal notes for the session.

Add new logs page showing the details of all the exercises in the day to add logs to.

Over time, after you’ve added multiple logs, you can view your progress per exercise as it displays the weights in a chart:

Training logs showing the exercise details and a chart for lifted weights.

Hopefully, I managed to pique your interest with its features. wger also has features for nutrition planning and weight tracking, which this article will not explore.

You can also add your measurements and pictures of yourself to track your progress visually. I think this is where self-hosting becomes more important. I, personally, wouldn’t upload such personal information to an online website. I would however use it more securely in my own local network. If you are also interested in self-hosting this software, proceed to the next section to see the self-hosting options.

Self-hosting wger

The recommended way to install wger on your system is using Docker.

To achieve this, first clone the wger Docker GitHub repo:

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

Then start all services by running:

docker compose up -d

Then go to http://localhost and you should see the same landing page as the hosted version.

You can change the port by adding an override file and adding your port:

services:
  nginx:
    ports:
      - "8080:80"

You can also download all the images, videos, exercises etc by running the following commands:

docker compose exec web python3 manage.py sync-exercises
docker compose exec web python3 manage.py download-exercise-images
docker compose exec web python3 manage.py download-exercise-videos
docker compose exec web wger load-online-fixtures

Downloading videos takes a long time though, so if you’re not interested in viewing them I’d recommend skipping that bit.

The last important part is to back up your data which is stored in the PostgreSQL database.

Run the following commands to stop all the services to ensure the data is unchanged during the backup process:

docker compose stop web nginx cache
docker compose exec db pg_dumpall --clean --username wger > backup.sql
docker compose start

To restore it, run the following commands:

docker compose down
docker volume remove docker_postgres-data
docker compose up db -d
cat backup.sql | docker compose exec -T db psql --username wger --dbname wger
docker compose up -d

Conclusion

wger is quite a complicated software and it’s completely open-source and free. You can own your data and make sure it’s not sold to anyone. You can add sensitive personal information such as your body measurements and even pictures of yourself.

As it can get quite sensitive based on the data you upload, it’s important to have it installed in the security of your own network. You can decide who can have access to your data. It’s also always fun and educational working with other complex codebases as it’s a good chance to learn a lot of new things that you haven’t even heard before.

For these reasons, I’d encourage everyone to give wger a try and run it in your own environment. Happy workouts!

Resources

hobby self_hosting, raspberry_pi, calibre

Most of the time, there are a lot of options when it comes to open source and self-hosted software. Hosting an eBook library is no exception. I’ve been a Calibre user for many years, so in this post, I’m going to stick to what I know and talk about Calibre. In future posts, I might review other similar software.

What is Calibre?

Let’s start with the basics. Calibre is an open-source, cross-platform ebook management software. It’s been around for more than 15 years. It’s rich in features; it supports almost all formats and can perform converting to other formats. It’s still very actively developed, and I think it’s a one-stop shop at the moment for eBook management.

Notes on Compatability

Installing Calibre on Raspberry Pi, which is an ARM based computer, as opposed to installing it on a standard Intel based Mac/PC, comes with some complications. If you look at Download for Linux page on the official Calibre website, you can see this info:

calibre has a binary install that includes private versions of all its dependencies. It runs on 32-bit and 64-bit Intel compatible machines. 

Then, your best bet to install on Raspberry Pi is either use package manager or Docker.

The same download page also says:

Please do not use your distribution provided calibre package, as those are often buggy/outdated. Instead use the Binary install described below.

So, Docker then? There are lots of Calibre Docker images. The most reliable one I came across, in terms of popularity and maintenance, is linuxserver.io’s image but it only supports arm64 and it didn’t work for me as my Pi is 32-bit. If you’re using a 64-bit Raspberry Pi, this may be good option for you.

Implemented Architecture

You can think of Calibre as comprised of two components:

  • Content server
  • Front end

To keep things simple, you can install Calibre on your computer and run the built-in content server. The downside is that the computer needs to be on all the time if you are going to browse your library via your mobile device.

There are many ways of getting the same results. In my setup, I chose this approach:

Implementation architecture

Calibre-web is the front-end I’m using as it ships as a Docker image and runs on 32-bit Raspberry Pi. The look & feel of the GUI is much better than the built-in one in my opinion.

The problem with Calibre-web is that it only operates on existing Calibre databases. You still need some Calibre running somewhere to create the initial database at least.

Create a Network Share

The first step is to have a shared place to put the library. In Raspberry Pi, this requires installing Samba and updating its configuration.

The following settings may be too broad/open for your network. Make sure to harden the security as you see fit.

Step 1: Update your Raspberry Pi and install Samba:

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install samba samba-common-bin

Step 2: Create a shared folder:

sudo mkdir -m 1777 /share

Step 3: Update Samba configuration

Run

sudo nano /etc/samba/smb.conf

and add the following lines to the end

[calibre]
Comment = Calibre shared folder
Path = /share
Browseable = yes
Writeable = Yes
only guest = no
create mask = 0777
directory mask = 0777
Public = yes
Guest ok = yes

Step 4: Set Samba password

sudo smbpasswd -a pi

Step 5: Reboot

sudo reboot now

Now you can point to that share in your computer where you will install Calibre.

Install Calibre

Installing Calibre is rather straightforward. Go to the download page and pick the installer for your operating system.

Calibre download page

Create Calibre Database

Create an empty folder under the shared folder (magazines/library in this example)

Open Calibre. Click the Calibre icon and select Switch/create new library.

Switch/create library button

Enter the path to the shared library and select the Create an empty library at the new location option.

Choose library dialogue

You should now see an empty library in the application.

Empty Calibre library

Add your books/magazines to your database. You can simply drag&drop on onto the GUI. In this example, I’m going to use Phrack Magazine, which is freely available.

It comes in simple text files, so I combined them into a single text and converted them into PDF using the built-in macOS application Text Editor. You can use any PDF in your case.

Either click Add books and browser your files or simply drag&drop and you should get the same result:

Calibre showing uploaded PDF

Install Calibre-Web

Now it’s time to install the always-on content server that will point to the shared.

Create a folder named config under the shared library (/calibre/magazines).

Then, run the following command to pull the latest calibre-web Docker image and start a container (update the shared volumes and timezone to match your system):

docker run -d --name=calibre-web-demo -e PUID=1000 -e PGID=1000 -e TZ=Europe/London -p 8083:8083 -v /share/magazines/config:/config -v /share/magazines/library:/books --restart unless-stopped linuxserver/calibre-web

Now in your browser, go to http://{Your Raspberry Pi’s IP Address}:8083, and you should see the calibre-web configuration screen:

Calibre-web configuration screen

The only configuration you have to make here is to point to the Calibre database, which is mapped to /books. So all you have to do is enter /books in the Location of Calibre database field.

Click Submit, and you should see a successful update message:

Configuration updated confirmation

Click Login and use the default credentials: admin/admin123.

Calibre-web login page

You should now see the PDF you uploaded earlier:

Calibre-web front page

Now you can use the Calibre application on your computer, upload/convert the books as you please and consume them over standard HTTP on your tablet or phone.

Conclusion

This setup may be overly complicated, and I might want to revise it in the future, but for the time being, it does the job.