{"id":3885,"date":"2023-07-27T09:58:53","date_gmt":"2023-07-27T09:58:53","guid":{"rendered":"https:\/\/arzhost.com\/blogs\/?p=3885"},"modified":"2023-10-04T14:37:05","modified_gmt":"2023-10-04T14:37:05","slug":"how-to-set-up-a-bitcoin-server","status":"publish","type":"post","link":"https:\/\/arzhost.com\/blogs\/how-to-set-up-a-bitcoin-server\/","title":{"rendered":"Step by Step Guide, How to Set Up a Bitcoin Server?"},"content":{"rendered":"<p>How to Set Up a Bitcoin Server? The <a href=\"https:\/\/en.wikipedia.org\/wiki\/Bitcoin\">Bitcoin<\/a> Unlimited project is currently generating a lot of attention, and people have been asking how they can become involved.<\/p>\n<p>Operating a full Server for Bitcoin Unlimited is a fantastic way to assist with the project. You can learn <span style=\"color: #000000;\"><strong>How to Set Up a Bitcoin Server?<\/strong> <\/span>On an inexpensive virtual server from this post.<\/p>\n<h2><strong>1: Sign in to your chosen VPS provider<\/strong><\/h2>\n<p>Since I&#8217;m using Digital Ocean, some of the details may apply to them. However, other <span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/www.arzhost.com\/vps\/\">VPS server providers<\/a><\/span> will offer comparable functionality.<\/p>\n<p>Pick a service provider that fits your needs and price range. Since saving money is the main focus of this post. You should be able to get a tiny VPS for less than $10 per month.<\/p>\n<h2><strong>2: Establish a little &#8220;droplet&#8221; or VPS<\/strong><\/h2>\n<p>I advise using a &#8220;droplet&#8221; bitcoin server with 1GB RAM and 20GB of storage. If money is truly tight. You could use only 512 MB of RAM, although that would cause a lot of swapping.<\/p>\n<p>It will be simpler later on if you chose Ubuntu 16.04 as the operating system for your VPS because bitcoin unlimited is simple to install on Ubuntu.<\/p>\n<h2><strong>3: Keep your new server secure<\/strong><\/h2>\n<p>Log in as root to your new virtual server and you can learn How to Set Up a Bitcoin Server? Your VPS provider will have a different method for doing this. Typically, ssh or a remote console window can be used to log in.<\/p>\n<p><iframe title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/lAW5fqkL-Fo\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p><u>The first thing you should do when you arrive at the command line is secure it. Setting up some firewall rules will be our first step.<\/u><\/p>\n<ol>\n<li><code># ufw allow ssh<\/code><\/li>\n<li><code># ufw allow 8333<\/code><\/li>\n<li><code># ufw default deny incoming<\/code><\/li>\n<li><code># ufw default allows outgoing<\/code><\/li>\n<li><code># ufw enable<\/code><\/li>\n<\/ol>\n<p>With the exception of bitcoin and remote logins, these rules instruct your system to ignore all incoming network traffic.<\/p>\n<h2><strong>4: Install the software for Bitcoin Unlimited<\/strong><\/h2>\n<p><u>It&#8217;s simple if you&#8217;re using Ubuntu:<\/u><\/p>\n<ol>\n<li><code># apt-get install software-properties-common<\/code><\/li>\n<li><code># add-apt-repository PPA: bitcoin-unlimited\/bu-PPA<\/code><\/li>\n<li><code># apt-get update<\/code><\/li>\n<li><code># apt-get install bitcoin<\/code><\/li>\n<\/ol>\n<p>Instead, check the installation instructions on this page if you&#8217;re not using Ubuntu.<\/p>\n<h2><strong>5: Make a user for bitcoin<\/strong><\/h2>\n<p><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;how to build a bitcoin server&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:18947,&quot;3&quot;:{&quot;1&quot;:0},&quot;4&quot;:{&quot;1&quot;:2,&quot;2&quot;:16573901},&quot;12&quot;:0,&quot;14&quot;:{&quot;1&quot;:2,&quot;2&quot;:16711680},&quot;17&quot;:1}\"><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/arzhost.com\/blogs\/how-to-build-a-bitcoin-server\/\">How to build a bitcoin server<\/a><\/span>, <\/span>We&#8217;ll create a bitcoin user account and grant it access to &#8220;sudo&#8221; so that, if you like, you can perform some system administration tasks from the bitcoin user.<\/p>\n<ol>\n<li><code># adduser bitcoin<\/code><\/li>\n<li><code># usermod -a -G sudo bitcoin<\/code><\/li>\n<\/ol>\n<h2><strong>6: Configure your bitcoin logs to rotate logs<\/strong><\/h2>\n<p>By doing this How to Set Up a Bitcoin Server? you can prevent your logs from becoming too large and taking up all of your disc space.<\/p>\n<p><strong><u>New log rotation file creation:<\/u><\/strong><\/p>\n<ul>\n<li><code># nano \/etc\/logrotate. d\/bitcoin-debug<\/code><\/li>\n<\/ul>\n<p><strong><u>Take part in it:<\/u><\/strong><\/p>\n<ul>\n<li><code>\/home\/bitcoin\/.bitcoin\/debug.log<\/code><\/li>\n<\/ul>\n<p>{<\/p>\n<p>rotate 5<\/p>\n<p>copytruncate<\/p>\n<p>daily<\/p>\n<p>missingok<\/p>\n<p>notifempty<\/p>\n<p>compress<\/p>\n<p>delay compress<\/p>\n<p>shared scripts<\/p>\n<p>}<\/p>\n<p><strong>7: Set up bitcoin.<\/strong><\/p>\n<p>Your Server will be configured to function as a &#8220;pruning&#8221; Server. It will simply maintain the most current portions of the blockchain. So it doesn&#8217;t need to have the entire 100GB blockchain.<\/p>\n<ul>\n<li><code># su - bitcoin<\/code><\/li>\n<li><code>$ mkdir. bitcoin<\/code><\/li>\n<li><code>$ cd. bitcoin<\/code><\/li>\n<li><code>$ nano bitcoin. Conf<\/code><\/li>\n<\/ul>\n<p><strong><u>To the file, add:<\/u><\/strong><\/p>\n<ul>\n<li><code>prune=15000<\/code><\/li>\n<\/ul>\n<p>In order to log out of the bitcoin user and reclaim root privileges, save the file and press Control-D.<\/p>\n<h2><strong>8: Set up the swap space.<\/strong><\/h2>\n<p>A little bit more than 1GB of memory is required to run a complete bitcoin Server. Since the Server we built only has 1GB, we&#8217;ll use swap space to build some more &#8220;virtual memory.&#8221;<\/p>\n<ul>\n<li><code># fallocate -l 1g \/swap1.swap<\/code><\/li>\n<li><code># chmod 0600 \/swap1.swap<\/code><\/li>\n<li><code># mkswap \/swap1.swap<\/code><\/li>\n<li><code># swapon \/swap1.swap<\/code><\/li>\n<li><code># nano \/etc\/fstab<\/code><\/li>\n<\/ul>\n<p><u>Add the following line at the file&#8217;s end:<\/u><\/p>\n<ul>\n<li><code>\/swap1.swap none swap sw 0 0<\/code><\/li>\n<\/ul>\n<h2><strong>9: Set up the bitcoin daemon to auto-run.<\/strong><\/h2>\n<p>Create a startup file:<\/p>\n<ul>\n<li><code># nano \/etc\/systemd\/system\/multi-user.target.wants\/bitcoin.service<\/code><\/li>\n<\/ul>\n<p><strong>Enter into it:<\/strong><\/p>\n<p>[Unit]<\/p>\n<p>Description=Bitcoin Server<\/p>\n<p>After=network. Target<\/p>\n<p>After=syslog. Target<\/p>\n<p>[Install]<\/p>\n<p>Wanted by=multi-user. Target<\/p>\n<p>Alias=bitcoind.service<\/p>\n<p>[Service]<\/p>\n<p>User=bitcoin<\/p>\n<p>Group=bitcoin<\/p>\n<p># Start the main service<\/p>\n<p>Exec Start=\/usr\/bin\/bitcoins<\/p>\n<p>ExecStop=\/usr\/bin\/bitcoin-cli stop<\/p>\n<p>Restart=always<\/p>\n<p>PrivateTmp=false<\/p>\n<p><strong><u>Reload the system and start bitcoin:<\/u><\/strong><\/p>\n<p><code># systemctl daemon-reload<\/code><\/p>\n<p><code># systemctl restart bitcoins<\/code><\/p>\n<p><code># systemctl status bitcoins<\/code><\/p>\n<h2><strong>10:(Optional) Configure ssh user logins.<\/strong><\/h2>\n<p>Set up ssh public key authentication if you wish to use ssh to log in directly to your new server. It&#8217;s a good guide from Digital Ocean.<\/p>\n<p><strong>Related Article\u00a0<\/strong><\/p>\n<ul>\n<li><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/arzhost.com\/blogs\/how-to-make-a-bitcoin-mining-server\/\">how to make a bitcoin mining server<\/a><\/span><\/li>\n<li><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/arzhost.com\/blogs\/how-to-use-a-server-as-a-bitcoin-miner\/\">how to use a server as a bitcoin miner<\/a><\/span><\/li>\n<li><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/arzhost.com\/blogs\/which-bitcoin-server-should-i-use\/\">which bitcoin server should I use<\/a><\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>How to Set Up a Bitcoin Server? The Bitcoin Unlimited project is currently generating a lot of attention, and people have been asking how they can become involved. Operating a full Server for Bitcoin Unlimited is a fantastic way to assist with the project. You can learn How to Set Up a Bitcoin Server? On [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6426,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[68],"tags":[],"class_list":["post-3885","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bitcoin"],"_links":{"self":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/3885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/comments?post=3885"}],"version-history":[{"count":5,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/3885\/revisions"}],"predecessor-version":[{"id":6427,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/3885\/revisions\/6427"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media\/6426"}],"wp:attachment":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media?parent=3885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/categories?post=3885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/tags?post=3885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}