Bitcoin Forum
July 03, 2020, 11:08:26 AM *
News: Latest Bitcoin Core release: 0.20.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [ TUTORIAL ] Run BITCOIN Server on VPS - BitcoinCLI and BitcoinD  (Read 216 times)
texgeek
Member
**
Offline Offline

Activity: 199
Merit: 55

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

1593774506
Hero Member
*
Offline Offline

Posts: 1593774506

View Profile Personal Message (Offline)

Ignore
1593774506
Reply with quote  #2

1593774506
Report to moderator
1593774506
Hero Member
*
Offline Offline

Posts: 1593774506

View Profile Personal Message (Offline)

Ignore
1593774506
Reply with quote  #2

1593774506
Report to moderator
AWARD-WINNING
CRYPTO CASINO
ASKGAMBLERS
PLAYERS CHOICE 2019
PROUD
PARTNER OF
1500+
GAMES
2 MIN
CASH-OUTS
24/7
SUPPORT
100s OF
FREE SPINS
PLAY NOW
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1593774506
Hero Member
*
Offline Offline

Posts: 1593774506

View Profile Personal Message (Offline)

Ignore
1593774506
Reply with quote  #2

1593774506
Report to moderator
1593774506
Hero Member
*
Offline Offline

Posts: 1593774506

View Profile Personal Message (Offline)

Ignore
1593774506
Reply with quote  #2

1593774506
Report to moderator
MrCrank
Sr. Member
****
Offline Offline

Activity: 966
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
Legendary
*
Offline Offline

Activity: 1372
Merit: 2553

<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: 197
Merit: 91

Some random software engineer


View Profile
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.

Hi, I'm just some random software engineer.
You can check my projects: Bitcoin & altcoin balances dumps: https://balances.syndevio.com/
texgeek
Member
**
Offline Offline

Activity: 199
Merit: 55

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

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!