Skip to content

Installing the Muttlee server

Peter Kwan edited this page May 28, 2025 · 1 revision

#Installing the Muttlee Server

The server works using node.js. It works equally well on Windows or Mac. Just download the package and install it. It can also be installed on Linux. This is how to set Node up on a Raspberry Pi.

It requires a Pi2 or better. A Pi1 can also but these instructions will not work.

This is an outline of the steps required to make a server. You'll have to look up exactly how to do these steps.

  • Set the system hostname in Preferences->Raspberry Pi. I called mine Muttlee. You can also enable SSH if you like. Then log into your internet router and give Muttlee a static IP address. It is recommended to use DHCP and let the router manage static IPs.

  • Install node (see below) This worked for me https://www.instructables.com/id/Install-Nodejs-and-Npm-on-Raspberry-Pi/

or

$ sudo apt update
$ sudo apt upgrade
$ sudo apt-get install nodejs -y
  • Install packages
    sudo apt install npm
cd ~
  • Clone Muttlee into your home folder.
  • cd ~
  • git clone https://github.com/peterkvt80/muttlee
  • Add 8080 to your router's application list. This allows clients from outside your network to connect.
  • Create the working directories
sudo mkdir /var/www
sudo mkdir /var/www/private
sudo mkdir /var/www/private/onair
sudo mkdir /var/www/teletext-services
# copy private web resources

cd ~/muttlee/private sudo cp . /var/www/private

and in the private folder create folders for all the services you will run and make them writable

cd /var/www/private/onair

and repeat this for all the services you are going to support

sudo mkdir artfax sudo chmod 777 artfax

* Add website key and certificate. (see config.js for details)
* (more stuff)
* The private folder needs to be accessible to the server. If it is wrong then the remote control won't appear. You can change the config file to point it to the right place. Or you can add a symbolic link from where the config thinks it should be to the actual folder. Here is my symbolic link: 

    ln -s /var/www/onair /var/www/private/onair

* Update the packages

npm init npm install

* To see if it runs, you can start the system manually. You can see the console output and check for any errors or crashes.

cd ~/muttlee node teletextserver

* Install pm2:

     sudo npm install pm2@latest -g
* To start the server go to ~/muttlee and type

    pm2 start teletextserver.js
You might also need to do

    pm2 save
  to ensure that the system starts up automatically
# More about node
You can install using apt install but chances are your Pi won't match. The problem is that the Arm processor has changed three times and the wrong version of node just won't work on the wrong arm. If you type node -v and nothing happens then you got it wrong.

First find the arm version (4,5 or 7) 
`uname -m`
This might return armv7l in which case you need the Arm7 version. So go to [Node JS downloads](https://nodejs.org/en/download/) and select ARMv7.

At the time of writing the archive was type xz although gz was used in the past.

Unpack these using

`tar xf node-v8.11.4-linux-armv7l.tar.xz`

Then copy it to a suitable place

`cd node-v8.11.4-linux-armv7l`

`sudo cp -R * /usr/local/bin`

Finally you'll need to add it to the path permanently

`sudo nano ~/.bashrc`

and add this line

`PATH=$PATH:/usr/local/bin`

# Enable page download
Pages can be downloaded by clicking Grab and Download tti. However, this is not enabled until you add a soft symbolic link

The pages are in /var/www and the web server root folder is /home/pi/teefax/muttlee/public

The logical link is 
`ln -s /var/www /home/pi/teefax/muttlee/public/`

When the link is correctly set then for example you could download page 100 from the wtf service using this command

`http://www.xenoxxx.com/www/wtf/p100.tti`






Clone this wiki locally