It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
sudo su
sed "s//#HOSTNAME/" /etc/electrum.conf >/etc/electrum.conf.orig
sed "s//#HOSTNAME/" /etc/electrum.banner >/etc/electrum.banner.orig
cat << END >> /etc/hosts
#ELECTRUM_IP #HOSTNAME
END
cat << END > /etc/network.if-up.d/electrum
#!/bin/bash
# update hostname to resolve to local ip
IP=$(ec2metadata --local-ipv4)
ID=$(ec2metadata --instance-id)
# substitite hostname wherever required
read HOST EIP VOL <<< $(ec2metadata --user-data)
if [ "$HOST" == "unavailable" ]; then
HOST=""
fi
sed -e "s/#HOSTNAME/${HOST}/" -e "s/#VOLUME/${VOL}/" /etc/init/electrum.conf.orig >/etc/init/electrum.conf
sed "s/#ELECTRUM_IP/${IP} ${HOST}/" /etc/hosts.orig >/etc/hosts
sed "s/#HOSTNAME/${HOST}/" /etc/electrum.conf.orig >/etc/electrum.conf
sed "s/#HOSTNAME/${HOST}/" /etc/electrum.banner.orig >/etc/electrum.banner
# associate elastic ip to this instance
su -c "ec2aad $EIP -i $ID" ubuntu >/dev/null
END
cat << END > /etc/init/electrum.conf.orig
description "Start Electrum server"
start on runlevel [2345]
stop on runlevel [016]
pre-start script
hostname #HOSTNAME
hostname >/etc/hostname
if [ ! -f /home/ubuntu/.bitcoin/bitcoin.conf ]; then
su -c "ec2attvol #VOLUME -i $(ec2metadata --instance-id) -d /dev/sdf" ubuntu
sleep 15
mount /dev/xvdf /home/ubuntu/.bitcoin
fi
end script
exec su -c /usr/bin/init-electrum ubuntu
END
cat << END > /usr/bin/init-electrum
#!/bin/bash
bitcoind -daemon -logtimestamps
until [ "`nc -z localhost 8332;echo $?`" == "0" ]; do sleep 5; done
start-electrum
END
exit
eg.
super-electrum.com 123.123.123.123 vol-a123b456
cd ~
wget http://github.com/timkay/aws/raw/master/aws
nano .awssecret (put your EC2 access key and secret key here)
chmod 600 .awssecret
sudo perl aws --install (creates links for short names)
rm aws
ec2din --simple (test it works)
ec2addgrp electrum -d "allow electrum ports"
ec2auth electrum -P icmp -s 127.0.0.0/8
ec2auth electrum -P tcp -p 0-65535 -s 127.0.0.0/8
ec2auth electrum -P udp -p 0-65535 -s 127.0.0.0/8
ec2auth electrum -P tcp -p 22 -s 0.0.0.0/0
ec2auth electrum -P tcp -p 8333 -s 0.0.0.0/0
ec2auth electrum -P tcp -p 8081-8082 -s 0.0.0.0/0
ec2auth electrum -P tcp -p 50001-50002 -s 0.0.0.0/0
ec2dgrp |less -S (check your results)
ec2rsi ami-9c78c0f5 -p 0.02 -t c1.medium -g electrum -k MyKey
ec2dsir --simple (check for status of spot request)
ec2din --simple (check if instance is running, takes a few minutes sometimes, and copy the public url output)
Host *.compute-1.amazonaws.com
User ubuntu
IdentityFile ~/.ssh/MyKey.pem
ssh
deb http://archive.ubuntu.com/ubuntu precise-backports main universe
sudo apt-get update
sudo apt-get install git htop build-essential libssl-dev libboost-all-dev libdb5.1++-dev python-leveldb python-setuptools
cd /usr/src
sudo git clone http://github.com/bitcoin/bitcoin
sudo git clone http://github.com/spesmilo/electrum-server
sudo easy_install jsonrpclib
sudo chown -R ubuntu: *
cd bitcoin
patch -p1 <../electrum-server/patch/patch
cd src
make -f makefile.unix USE_UPNP=-
sudo cp bitcoind /usr/bin/
sudo ln -s /usr/src/electrum-server/server.py /usr/bin/electrum
ec2din |less -S (copy the zone id and instance id for your server)
ec2cvol --size 10 --zone(create volume, choose zone to match your instance)
ec2dvol |less -S (check for status, repeat until the new volume is available, copy the volume id given)
ec2attvol-i -d /dev/sdf (attach to your instance as device /dev/sdf)
sudo mkfs -t ext4 /dev/xvdf (for some odd reason /dev/sdf maps to /dev/xvdf)
mkdir /home/ubuntu/.bitcoin
sudo mount /dev/xvdf /home/ubuntu/.bitcoin
mkdir /home/ubuntu/.bitcoin/electrum_db
cd ~
sudo chown ubuntu: .bitcoin
cat << END > /home/ubuntu/.bitcoin/bitcoin.conf
rpcuser=electrum
rpcpassword=
END
bitcoind -daemon
bitcoind getinfo
openssl genrsa -des3 -out server.key 2048 (use any pwd as we will remove it after)
openssl req -new -key server.key -out server.csr (answer as suitable, common name is usually your domain name)
sudo openssl rsa -in server.key -out /etc/ssl/electrum.key (this step removes pwd)
sudo chown ubuntu: /etc/ssl/electrum.key (since electrum runs as ubuntu we need the key readable by ubuntu)
sudo chmod 600 /etc/ssl/electrum.key (make sure only owner can read)
(now create the certificate, good for 1 year)
sudo openssl x509 -req -days 365 -in server.csr -signkey server.key -out /etc/ssl/electrum.crt
rm server.key server.csr
sudo su
cat << END > /etc/electrum.conf
[server]
host =(make sure the hostname resolves or will not bind)
native_port = 50000
stratum_tcp_port:50001
stratum_http_port:8081
ssl_certfile = /etc/ssl/electrum.crt
ssl_keyfile = /etc/ssl/electrum.key
password =
banner = Welcome to Electrum!
irc = no
cache = yes
backend = leveldb
[bitcoind]
host = localhost
port = 8332
user = electrum
password =
[leveldb]
path = /run/shm/electrum_db
END
cat << END >/usr/bin/start-electrum
#!/bin/bash
nohup /usr/bin/python -u /usr/bin/electrum &>> /var/log/electrum.log &
END
chmod +x /usr/bin/start-electrum
touch /var/log/electrum.log
chown ubuntu: /var/log/electrum.log
cat << END >/etc/logrotate.d/electrum
/var/log/electrum.log
/home/ubuntu/.bitcoin/debug.log
{
rotate 5
copytruncate
daily
missingok
notifempty
compress
delaycompress
sharedscripts
}
END
exit
start-electrum
less /var/log/electrum.log
electrum stop
electrum stop
mv /run/shm/electrum_db /home/ubuntu/.bitcoin/
sudo sed -i 's/\/run\/shm/\/home\/ubuntu\/.bitcoin/' /etc/electrum.conf
sudo su
cat << END >/etc/init/electrum.conf
description "Start Electrum server"
start on runlevel [2345]
stop on runlevel [016]
exec su -c /usr/bin/init-electrum ubuntu
END
cat << END >/usr/bin/init-electrum
#!/bin/bash
hostname
hostname >/etc/hostname
bitcoind -daemon
until [ "`nc -z localhost 8332;echo $?`" == "0" ]; do sleep 5; done
start-electrum
END
chmod +x /usr/bin/init-electrum
cat << END >> /etc/fstab
/dev/xvdf /home/ubuntu/.bitcoin ext4 defaults 0 2
END
exit
electrum stop
bitcoind stop
sudo start electrum
htop
sed -i 's/irc = no/irc = yes/' /etc/electrum.conf
ec2rsi-p 0.01 -t m1.small -g electrum -k MyKey
ec2dsir --simple (check for status of spot request)
ec2din --simple (check if instance is running, takes a few minutes sometimes, and copy the public url output)