Install Mylar Ubuntu 18.04

Install dependencies for Mylar

sudo apt-get install python python-cherrypy git -y

Git clone Mylar into opt

sudo git clone https://github.com/evilhero/mylar -b development /opt/Mylar

Change ownership of the Mylar directory

sudo chown username:username -R /opt/Mylar

Try running Mylar

python /opt/Mylar/Mylar.py -d

You can access Mylar at http://ip.address:8090/

ssl

Install pyOpenSSL

pip install pyopenssl

Apache virtualhost

<VirtualHost *:80> ServerAdmin admin@example.com ServerName comics.thawk.nl ProxyPreserveHost On ProxyPass / http://0.0.0.0:8090/ ProxyPassReverse / http://0.0.0.0:8090/ #Header edit Location ^http: https: ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>

Above code will redirect an url to the correct port #and change it to ssl#.

Autostart Mylar

The init.d script is preferable but if you have problems with it you can use the Mylar Upstart script

Mylar init.d Script

Create the default Mylar configuration file which the init.d script reads

sudo nano /etc/default/mylar

Adjust these values as you see fit

MYLAR_USER=pi MYLAR_HOME=/opt/Mylar MYLAR_DATA=/opt/Mylar MYLAR_PORT=8090

Ctrl+X, Y and Enter

Mylar has an init.d script included so let’s copy that

sudo cp /opt/Mylar/init-scripts/ubuntu.init.d /etc/init.d/mylar

Make the Mylar init.d script executable

sudo chmod +x /etc/init.d/mylar

Tell the system to use Mylar’s init.d defaults

sudo update-rc.d mylar defaults

Now you can start Mylar

sudo service mylar start

Leave a Reply

Your email address will not be published. Required fields are marked *