How to setup a Dogecoin node

Note: Setting up Dogecoin, Litecoin and Bitcoin nodes is very similar, you can check my previous post on how to setup a Bitcoin node and how to setup a Litecoin node This tutorial describes how to setup a new Dogecoin relay node on Linux server – this node will be used as relay node in the Dogecoin network and it’s not recommended to store anything in it’s wallet.
  1. Download Dogecoin from official website: http://dogecoin.com/
  2. At the moment the most recent version can be downloaded using this direct link:https://github.com/dogecoin/dogecoin/releases/download/v1.7.0/dogecoin-core-1.7.0-linux64.zip the version we are interested in is “Dogecoin Core”
  3. Extract archive:
mkdir ~/dogecoin
mv dogecoin-core-1.7.0-linux64.zip ~/dogecoin
unzip dogecoin-core-1.7.0-linux64.zip
  1. Create dogecoin configuration file:
mkdir ~/.dogecoin
  1. Create new file in ~/.dogecoin called dogecoin.conf with following contents (you should setup different password):
server=1
rpcuser=dogecoinrpc
rpcpassword=3389fejf893cjde93jg0dJd3Md673NDSioEmdsldsjFoiqwe
rpcconnect=127.0.0.1

  1. Start dogecoin daemon
~/doge/dogecoind -daemon
From this moment initial node bootstrapping begins – you’ll see a lot of server resources being used, especially disk and CPU
  1. After few moments you can check if your node is downloading blocks from the network (bootstrapping), use this command:
~/doge/dogecoin-cli getinfo
You should see similar output:
{
    "version" : 1070000,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 11426,
    "timeoffset" : 5,
    "connections" : 8,
    "proxy" : "",   
    "difficulty" : 22.48322498,
    "testnet" : false,
    "keypoololdest" : 1401119564,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "errors" : ""   
}
This is how fully synchronized node looks at the moment:
{
    "version" : 1070000,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 22719,
    "timeoffset" : 5,
    "connections" : 13,
    "proxy" : "",
    "difficulty" : 367.69001490,
    "testnet" : false,
    "keypoololdest" : 1401119564,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "errors" : ""
}
Additional step: Depending on your firewall configuration you might need to add following exceptions to the iptables – dogecoin uses port 22556:
iptables -A INPUT -p tcp --dport 22556 -j ACCEPT
iptables -A INPUT -p udp --dport 22556 -j ACCEPT

How to run Transmission torrent server on Linux server

This post is a quick tutorial on how to install and configure Transmission torrent client on Linux (Debian, Ubuntu) server in headless mode.
  1. Create directory to store downloads:
mkdir ~/Downloads
  1. Install transmission (run as root or with sudo):
apt-get install transmission-daemon
  1. Add your user to debian-transmission group (run as root or with sudo):
usermod -a -G debian-transmission user
  1. Setup correct permissions to Downloads folder, for starters I suggest setting 777:
chmod 777 ~/Downloads
  1. As your user start transmission – this will generate basic configuration file (run this as your user):
transmission-daemon
  1. Right after it starts, you can stop it (also run this as your user):
/etc/init.d/transmission-daemon stop
  1. Substitute this file: ~/.config/transmission-daemon/settings.json with following content:
{   
    "alt-speed-down": 50,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 50,
    "bind-address-ipv4": "0.0.0.0",
    "bind-address-ipv6": "::",
    "blocklist-enabled": false,
    "blocklist-url": "http://www.example.com/blocklist",
    "cache-size-mb": 4,
    "dht-enabled": true,
    "download-dir": "/home/user/Downloads",
    "download-queue-enabled": true,
    "download-queue-size": 5,
    "encryption": 0,
    "idle-seeding-limit": 30,
    "idle-seeding-limit-enabled": false,
    "incomplete-dir": "/home/user/Downloads",
    "incomplete-dir-enabled": false,
    "lpd-enabled": true,
    "message-level": 2,
    "peer-congestion-algorithm": "",
    "peer-id-ttl-hours": 6,
    "peer-limit-global": 200,
    "peer-limit-per-torrent": 200,
    "peer-port": 51413,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": "default",
    "pex-enabled": true,
    "port-forwarding-enabled": true,
    "preallocation": 1,
    "prefetch-enabled": 1,
    "queue-stalled-enabled": true,
    "queue-stalled-minutes": 30,
    "ratio-limit": 2,
    "ratio-limit-enabled": false,
    "rename-partial-files": true,
    "rpc-authentication-required": false,
    "rpc-bind-address": "0.0.0.0",
    "rpc-enabled": true,
    "rpc-password": "{4b0b9b0633878s8d9sd89h37892fdxG}",
    "rpc-port": 9091,
    "rpc-url": "/transmission/",
    "rpc-username": "",
    "rpc-whitelist": "127.0.0.1",
    "rpc-whitelist-enabled": true,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": false,
    "script-torrent-done-filename": "",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 100,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": false,
    "start-added-torrents": true,
    "trash-original-torrent-files": false,
    "umask": 2,
    "upload-slots-per-torrent": 14,
    "utp-enabled": true
}
You should substitue following properties to match your own setup:
"incomplete-dir": "/home/user/Downloads",
"download-dir": "/home/user/Downloads",
"rpc-whitelist": "127.0.0.1",
"rpc-password": "{4b0b9b0633878s8d9sd89h37892fdxG}",
Both incomplete-dir and download-dir should point to the newly created directory. rpc-password should be set to long random value.
rpc-whitelist is a list of hosts that are allowed to view administrator interface over the browser, it should include the IP address of your local environment.
Alternatively if you don’t have a static IP address, then you should set rpc-username which will be used to authorize user on the WWW interface.
  1. Start transmission-daemon (as your user), this time new configuration will be used.
transmission-daemon
  1. Configure firewall, I have added following rules:
iptables -A INPUT -p tcp --dport 51413 -j ACCEPT
iptables -A INPUT -p udp --dport 51413 -j ACCEPT
iptables -A INPUT -i eth0 --source MY_LOCAL_IP -j ACCEPT
  1. Visit web UI where you can add torrents for download: http://yourserver.com:9091/ – transmission should be ready to serve there.

How to setup a Bitcoin node

This tutorial describes how to setup a new Bitcoin node on Linux server – this node will be used as relay node in the Bitcoin network and it’s not recommended to store anything in it’s wallet.
  1. Download bitcoin from official website: https://bitcoin.org/en/download
  2. At the moment the most recent version can be downloaded using this direct link: https://bitcoin.org/bin/0.9.1/bitcoin-0.9.1-linux.tar.gz
  3. Extract archive:
tar xf bitcoin-0.9.1-linux.tar.gz
  1. Create bitcoin configuration file:
mkdir ~/.bitcoin
  1. Create new file in ~/.bitcoin called bitcoin.conf with following contents (you should setup different password):
server=1
rpcuser=bitcoinrpc
rpcpassword=FeMaf9V83mxp2906JHdnwed3ys056dFBqkwJ8bffGe4JsvrN
rpcconnect=127.0.0.1
  1. Start bitcoin daemon
~/bitcoin-0.9.1-linux/bin/64/bitcoind -daemon
From this moment initial node bootstrapping begins – you’ll see a lot of server resources being used, especially disk and CPU
  1. After few moments you can check if your node is downloading blocks from the network (bootstrapping), use this command:
~/bitcoin-0.9.1-linux/bin/64/bitcoin-cli getinfo
You should see similar output:
{   
    "version" : 90100,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 129435,
    "timeoffset" : 3,
    "connections" : 12,
    "proxy" : "",
    "difficulty" : 567269.53016242,
    "testnet" : false,
    "keypoololdest" : 1400613368,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "errors" : ""
}
This is how fully synchronized node looks at the moment:
{   
    "version" : 90100,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 302393,
    "timeoffset" : 3,
    "connections" : 57,
    "proxy" : "",
    "difficulty" : 8853416309.12779999,
    "testnet" : false,
    "keypoololdest" : 1400613368,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "errors" : ""
}
You should also see a lot of resources being used on the server while initial synchronization is happening. Depending on your hardware, especially CPU and disk, initial synchronization might take even up to 24 hours.
After the node finishes bootstrapping, it’s not using as much resources.
Additional step: Depending on your firewall configuration you might need to add following exceptions to the iptables:
iptables -A INPUT -p tcp --dport 8333 -j ACCEPT
iptables -A INPUT -p udp --dport 8333 -j ACCEPT