Install RuTorrent with Docker on Rapsberry Pi

1. Flash Raspbian Lite

2. Run the following commands (through serial, SSH, or directly)

#install docker
curl -fsSL -o

#don't need sudo to run future docker commands
#make sure to log out and back in after this!
sudo usermod -aG docker pi

#make directories
mkdir -p ~/rutorrent/conf
mkdir -p ~/rutorrent/downloads

#make a container:
docker create --name=rutorrent \
-v ~/rutorrent/conf:/config \
-v ~/rutorrent/downloads:/downloads \
-e PGID=`id -g` -e PUID=`id -u` \
-e TZ=America/Vancouver \
-p 80:80 -p 5000:5000 \
-p 51413:51413 -p 6881:6881/udp \
--restart unless-stopped \

#run the container
docker start rutorrent

Install Syncthing on Raspberry Pi Tutorial

1. Flash Raspbian Lite

2. Run the following commands (through serial, SSH, or directly)

# Add the release PGP keys:
curl -s | sudo apt-key add -

# Add the "stable" channel to your APT sources:
echo "deb syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list

# Update and install syncthing:
sudo apt-get update
sudo apt-get install syncthing

sudo systemctl enable syncthing@pi.service
sudo systemctl start syncthing@pi.service

#make accessible over the network by replacing to
sudo sed -i "s/127\.0\.0\.1/" ~/.config/syncthing/config.xml

Install mitmproxy on Ubuntu 16.04 and Linux Mint 18

A simple tutorial to help install mitmproxy for debugging web applications on Linux Mint 18 / Ubuntu 16.04).

Install python 2.7 dev first (needed to avoid the error below):
$ sudo apt-get install python-dev

Now install mitmproxy
$ sudo pip install mitmproxy

Example usage with Ruby on Rails
Assuming we ran “rails server” on the default port of 3000, we can run mitmproxy on port 3001.
$ mitmproxy -p 3001 -R http://localhost:3000/



Error that would appear without installing python-dev:
creating build/temp.linux-x86_64-2.7/ext
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c ext/_yaml.c -o build/temp.linux-x86_64-2.7/ext/_yaml.o
ext/_yaml.c:4:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-t2Ejye/PyYAML/';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-b7aU7h-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-t2Ejye/PyYAML/

Change Critical Battery Level and Action in Linux Mint 18 Cinnamon

A simple tutorial to help you find the options to change the battery critical value percentage and action options in Linux Mint 18 Cinnamon (based on Ubuntu 16.04).

Install dconf-editor:
$ sudo apt-get install dconf-editor

Go to org -> cinnamon -> settings-daemon -> plugins -> power

dconf-editor power settings

Default settings are (in %):
Critical battery action: hibernate
Critical: 2
Action: 2
Low: 10

Exercise caution and tweak to your heart’s content 🙂

Your Own $130 High Powered Unlimited Device Linux Hotspot Router

What is this?

This is a guide on how to build your own $130 LTE router that connects as many devices as you like.

Why use this setup?

2 reasons, control, and flexibility. Want to just take the LTE stick for some portable travels? you can do that, plug your stick into your laptop and away you go. Need emergency internet when the whole house loses connection? Problem solved! Don’t want LTE and just want to use your residential internet? Unplug the LTE stick, and plug your modem in! OpenWRT gives your power from their vast array of available packages to download.

Equipment Used:


Test your modem in Windows or Mac, make sure it works, and write down your provider’s APN

Update the Firmware

Download latest firmware (Currently version 141113 (11/13/2014) and flash it on the WDR4300 using the web interface.

No need to do this if you’re already running V141113.
Router IP:
Default User: admin
Default Pass: admin

Go to System Tools -> Firmware Upgrade and browse to the firmware file extracted from Wait for it to reboot, then continue on.
Firmware Update

Flash Rooter MultiWeb firmware

Download the latest version of Multiweb.
The WDR4300 Rooter firmware can be downloaded here.
Extract is and flash it by using the TP-Link router’s web interface like before*

*Note that versions of Multiweb older than 2015-01-04 have trouble detecting the Sierra Aircard stick

Configure Rooter

Go to and login with the defaults (root as username, blank password).
Rooter Login

Now go to System -> Administration and set your password
Rooter Set Password

Set Your APN

Go to Modem -> Connection Info
Enter in your APN settings in Modem 1 Information:
For Rogers: set “APN” to lteinternet.apn
Rooter Set APN

Scroll down and hit Save

Set Your Wifi

Go to Network -> Wifi
Click the Edit button under Generic MAC80211 802.11bgn(radio0)
Rooter Wireless Overview

Set your channel (I prefer auto), and your ESSID (this will be what your network shows up as)
Rooter Set Wifi 1

Next, click on Wireless Security, set Encryption to WPA2-PSK, and your Key to whatever you’d like the password to be.
Rooter Set Wifi 2
Now click Save and apply changes

Note: If you have a Broadcomm wireless adapter, uncheck “WMM Mode” as it interferes with connections

Finishing Up

Power off your router, then plug in your LTE stick into the “USB1” port on the back of the router.
Wait 1 minute, then check the overview page to make sure the device is detected. The status indicator is near the bottom of the page.
Rooter Check Overview

You can see more details under Modem -> Network Status to verify it has been connected.
Rooter Network Status LTE


Sometimes LTE can be faster than cable internet.
LTE (Good signal):
Rooter Good Signal Speedtest
Cable (Shaw 25Mbps down, 2.5Mbps up):
Rooter Wired Speedtest
LTE (Poor signal):
Rooter Poor Signal Speedtest

Want console access to your router?

Download a telnet client (or use the Windows built-in one). Download the portable version of KiTTY (a souped up PuTTY fork) from here. Choose the kitty_portable option. Choose SSH and enter as the host. Username is root, and the password will be the one you set up above.


Hats off to the Rooter Firmware team and the OpenWRT. If you’d like to donate, please send some money their way as a thank you to their hard work.

Dynamic DNS with Cloudflare and Tomato Firmware

How to set up Dynamic DNS with free Cloudflare DNS service using Tomato Firmware

  1. Login to Cloudflare:
  2. Go to DNS Settings under your domain and add an “A” DNS entry for Dynamic DNS (ddns used in this example)
  3. Get your API key from
  4. Example Curl code to test if its working (Optional)

    curl \
    -d 'a=rec_edit' \
    -d 'tkn=YOUR_API_KEY_HERE' \
    -d 'id=YOUR_DNS_ENTRY_ID' \
    -d 'email=YOUR_CLOUDFLARE_EMAIL' \
    -d 'type=A' \
    -d 'content=' \
    -d 'service_mode=0' \
    -d 'ttl=1'
  5. Get DNS entry ID – requires your API key, domain, and email address. Make sure you replace the parameters with your own.

    (Note – Open URL in a different browser, otherwise you’ll get errors):
  6. Search the page for “ddns”, or whatever you named your dns entry. Make sure your copy the {“rec_id”: that is at the top of the block.
  7. Test updating the IP in your browser. Look for success at the bottom.
  8. Refresh your domain’s DNS entries page to see if the IP became
  9. Copy and paste your modified URL from step 6 into Tomato
    Make sure to replace with @IP in the URL
  10. Refresh your domain’s DNS entries page again to verify that the IP has been set.
  11. That’s it 🙂
  12. Additional Info: