So hard. Okay. Several things. This is if you wish to run it not via Docker. As of today (2021-01-14), their docker images were not working very well for single board computers or for servers. So it had to go via the local.
Install wger
Go to wger’s website, and follow their instructions for installing wger. As of today (2021-01-14), their instructions for running it as a Django app are the following:
sudo apt-get install python3-dev nodejs npm git
sudo npm install -g yarn sass
python3 -m venv wger
source wger/bin/activate
git clone https://github.com/wger-project/wger.git
cd wger
pip install -r requirements.txt
python3 setup.py develop
wger create-settings
wger bootstrap
wger load-online-fixtures
python3 manage.py runserver
Then login as admin
and password is adminadmin
. This will be launched on its port 8000. But because they are set on http://localhost:8000
, you can’t reach it from another computer. So let’s expose some ports…
Open the Ports
Follow this guy’s explanation on (https://www.journaldev.com/34113/opening-a-port-on-linux)
Now, we’re going to forward the 8000 port to 8001, and expose 8001. Basically, you need to open the firewall port via
sudo ufw allow 8001
Note: You might need to use if you use firewalld
systems (e.g. CentOS)
firewall-cmd --add-port=8001/tcp --permanent
On your single board comptuer, you can install a GUI to check the firewall (ufw
) with
sudo apt install gufw
Forward Ports
Omg. I need to make another post about this some other time. This is such a useful tool. The iisexpress-proxy
allows you to forward ports from XXXX
to YYYY
wish such ease. Install it with:
npm install -g iisexpress-proxy
Then simply run
iisexpress-proxy 8000 to 8001
And now your port http://localhost.8000 can be seen at http://192.168.1.X:8001
Starting the Server’s wger
I haven’t thought out much about how to launch it yet. I haven’t gotten screen -d -m <command>
to work properly. So as of now, do the following:
1) SSH into the Board
2) Run the App
Create a screen and run the app
screen -S wger
Activate the virtual environment
source ~/envs/wger/bin/activate
Run the app and detach
python manage.py runserver
# Ctrl + A + D
3) Forward the Port
Create a screen to forward the port
screen -S portforward
Forward the port and detach
iisexpress-proxy 8000 to 8001
# Ctrl + A + D
Now you can access it at the board’s IP and port 8001: http://192.168.1.X:8001