Bitcoin Forum
October 17, 2018, 09:05:45 AM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: [ TUTORIAL ] Run BITCOIN Server on VPS - BitcoinCLI and BitcoinD  (Read 120 times)
texgeek
Member
**
Offline Offline

Activity: 127
Merit: 33

No meio da dificuldade encontra-se a oportunidade.


View Profile
July 25, 2018, 12:47:21 PM
Merited by LeGaulois (1)
 #1

Hello guys, just sharing with you , how setup a bitcoind and bitcoin-cli on a simple ubuntu VPS on a cloud.

Tip: not use windows...,you can use ubuntu on amazon aws, digital ocean, interserver.net, and others cloud VPS.


Ubuntu is better to run, but xubuntu and others debians based you can run also.


*** BTC update and OS and install bitcoind together cli . BTC ***


Open The terminal and execute :


sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install libtool autotools-dev autoconf
sudo apt-get install libssl-dev
sudo apt-get install libboost-all-dev
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install bitcoind
mkdir ~/.bitcoin/ && cd ~/.bitcoin/

******* BTC Adding conf using vim BTC *****


vim bitcoind.conf

with vim open, you will using text terminal, follow next steps:

give a space
copy  TEXT* of next lines
execute  SHIFT + I or  SHIFIT + INSERT ( this will paste yor text on vim)
go to first line on vim and remove the extra space, inserted before (normal backspace)
press ESC ,you will see ":" , then yoou press wq after enter
this will save the file


******* BTC Config  btcd TEXT* BTC*******



rpcuser=username
rpcpassword=password
testnet=1
rpcport=8332
rpcallowip=127.0.0.1
rpcallowip=EXTERNAL IP*
server=1



The EXTERNAL IP is your ip address external of your vps, you can found it on yoour control panel of your vps


**** BTC Starting service Bitcoind BTC*****


bitcoind &  

(this comand will run bitcoind )


if you close the terminal (the & unlock execution), you can typing more comands using this letter


bitcoind --daemon

(this command above will run on background, you need choose the first with & or the second with --daemon )


---------

Tip, if you want to know if the process is running ?

run this :
 
ps -e | grep bitcoind

( with one line with PID text show , that is running )

----------

BTC Running bitcoin-cli using your bitcoind BTC


bitcoin-cli getblockchaininfo


if everything is fine you will see something like that :



Remenber the command  getinfo is deprecated.

now you can use these comands , if you have success here, just need run a command to see/use blockchain:

- getblockchaininfo: blocks, difficulty, chain
- getnetworkinfo: version, protocolversion, timeoffset, connections, proxy, relayfee, warnings
- getwalletinfo: balance, keypoololdest, keypoolsize, paytxfee, unlocked_until, walletversion



Anything need just ask
Im am a "normal" developer , and can help with configuration if you need


Running on ubuntu July 2018

█               B i t c o i n  A i r   ★    Secure Payment as Light as Air  ★                 █
► ►  Lightweight    ► ►  Transparent    ► ►  Lightning Fast

               ●   Telegram   Twitter   Discord   Medium   Github   Reddit   ●               
1539767145
Hero Member
*
Offline Offline

Posts: 1539767145

View Profile Personal Message (Offline)

Ignore
1539767145
Reply with quote  #2

1539767145
Report to moderator
1539767145
Hero Member
*
Offline Offline

Posts: 1539767145

View Profile Personal Message (Offline)

Ignore
1539767145
Reply with quote  #2

1539767145
Report to moderator
1539767145
Hero Member
*
Offline Offline

Posts: 1539767145

View Profile Personal Message (Offline)

Ignore
1539767145
Reply with quote  #2

1539767145
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
MrCrank
Sr. Member
****
Offline Offline

Activity: 686
Merit: 253



View Profile
July 28, 2018, 05:43:35 AM
 #2

Useful information.
It's called Bitcoin full node.
Could you make script for autorun bitcoin daemon after start VPS?
HCP
Hero Member
*****
Offline Offline

Activity: 756
Merit: 932

<insert witty quote here>


View Profile
July 29, 2018, 12:22:17 AM
 #3

Could you make script for autorun bitcoin daemon after start VPS?
You can probably just use cron for this... it has settings that allow you to run commands after startup.

Also, given that a lot of VPS services charge based on the storage/bandwidth being used... running a Bitcoin Node on a VPS could get quite expensive given the current size of the blockchain Tongue

boulderchain
Jr. Member
*
Offline Offline

Activity: 59
Merit: 5


View Profile
July 29, 2018, 01:36:24 PM
 #4

Many people will not be happy about the vim section ;-)
 
 Nevertheless, good tutorial. I would not allow rpc for external ips, instead just connect via ssh and send your commands on the server. In addition it is recommended to allow incoming traffic (for rpc or ssh) only from your ip (if you have a static ip).

★ PRiVCY ➢ Own Your Privacy! ➢ Best privacy crypto-market! ★
✈✈✈[PoW/PoS]✅[Tor]✅[Airdrop]✈✈✈ (https://privcy.io/)
starmyc
Member
**
Offline Offline

Activity: 193
Merit: 85

Software engineer


View Profile WWW
July 29, 2018, 01:43:27 PM
Merited by HCP (5)
 #5

Could you make script for autorun bitcoin daemon after start VPS?
You can probably just use cron for this... it has settings that allow you to run commands after startup.

The best is still to make use of the provided bitcoind.service file for systemd.

Most likely it is already bundled in the ubuntu's bitcoind package.

As root, the following should work:

Code:
# cp bitcoind.service /lib/systemd/system/bitcoind.service
# systemctl enable bitcoind
# systemctl start bitcoind
# systemctl status bitcoind

It will register it in systemd & making it as a service to start at boot. There is no need of a third party script.

Software engineer.
Tip me if you find my help useful: 3QBRMM2CLUTd7hqL4T9Ja2wy6B1VkbXyZ3
texgeek
Member
**
Offline Offline

Activity: 127
Merit: 33

No meio da dificuldade encontra-se a oportunidade.


View Profile
July 31, 2018, 03:11:08 AM
 #6

Useful information.
It's called Bitcoin full node.
Could you make script for autorun bitcoin daemon after start VPS?


I will create a docker image and a shell script to start all node.

Thanks for idea. Smiley

█               B i t c o i n  A i r   ★    Secure Payment as Light as Air  ★                 █
► ►  Lightweight    ► ►  Transparent    ► ►  Lightning Fast

               ●   Telegram   Twitter   Discord   Medium   Github   Reddit   ●               
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!