wger is a free, open-source web application to manage your personal fitness, nutrition, and health data.
If you want to use wger on your OpenBSD system, you can follow these steps:
Open the terminal on your OpenBSD system.
Update the system's package manager:
$ doas pkg_add -u
Install the required packages:
$ doas pkg_add -i gmake py3-pip postgresql-server postgresql-contrib
Add PostgreSQL to the system's rc.conf file:
$ doas rcctl enable postgresql
$ doas rcctl start postgresql
Create a PostgreSQL user and database for wger:
$ doas su - postgres
$ psql
postgres=# CREATE USER wger WITH PASSWORD 'password';
postgres=# CREATE DATABASE wger OWNER wger;
postgres=# \q
Install wger using pip:
$ doas pip-3.8 install wger
Run the database migrations:
$ doas su - _wger
$ wger migrate
$ exit
Create a configuration file named wger.ini
in the _wger
user's home directory:
$ doas su - _wger
$ cp /usr/local/lib/python3.8/site-packages/wger/wsgi.ini wger.ini
$ exit
Edit the configuration file using your preferred text editor:
$ doas nano /home/_wger/wger.ini
Change the following lines in the configuration file:
[server:main]
use = egg:waitress#main
host = 0.0.0.0 # Change to '127.0.0.1' if running locally only
port = 8000
[app:main]
sqlalchemy.url = postgresql://wger:password@localhost:5432/wger
Save and exit the configuration file.
Start the wger server:
$ doas su - _wger
$ wger serve --reload
Open a web browser and go to http://localhost:8000/
(or the IP address of your server) to access the wger application.
Congratulations! You have successfully installed and configured wger on your OpenBSD system.
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!