<!DOCTYPE html><htmllang="en"><head><metacharSet="utf-8"/><metahttp-equiv="X-UA-Compatible"content="IE=edge"/><title>Getting Bitcoin-S installed on your machine · bitcoin-s</title><metaname="viewport"content="width=device-width"/><metaname="generator"content="Docusaurus"/><metaname="description"content="## Getting Setup With Bitcoin-S"/><metaname="docsearch:version"content="next"/><metaname="docsearch:language"content="en"/><metaproperty="og:title"content="Getting Bitcoin-S installed on your machine · bitcoin-s"/><metaproperty="og:type"content="website"/><metaproperty="og:url"content="https://bitcoin-s.org/"/><metaproperty="og:description"content="## Getting Setup With Bitcoin-S"/><metaproperty="og:image"content="https://bitcoin-s.org/img/undraw_online.svg"/><metaname="twitter:card"content="summary"/><metaname="twitter:image"content="https://bitcoin-s.org/img/undraw_tweetstorm.svg"/><linkrel="shortcut icon"href="/img/favicon.ico"/><linkrel="stylesheet"href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><linkrel="stylesheet"href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><linkrel="stylesheet"href="/css/code-block-buttons.css"/><scripttype="text/javascript"src="https://buttons.github.io/buttons.js"></script><scripttype="text/javascript"src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><scripttype="text/javascript"src="https://fonts.googleapis.com/css?family=Montserrat:500"></script><scripttype="text/javascript"src="https://www.googletagmanager.com/gtag/js?id=UA-61958686-2"></script><scripttype="text/javascript"src="/js/code-block-buttons.js"></script><scriptsrc="/js/scrollSpy.js"></script><linkrel="stylesheet"href="/css/main.css"/><scriptsrc="/js/codetabs.js"></script></head><bodyclass="sideNavVisible separateOnPageNav"><divclass="fixedHeaderContainer"><divclass="headerWrapper wrapper"><header><ahref="/"><imgclass="logo"src="/img/favicon.ico"alt="bitcoin-s"/><h2class="headerTitleWithLogo">bitcoin-s</h2></a><ahref="/versions"><h3>next</h3></a><divclass="navigationWrapper navigationSlider"><navclass="slidingNav"><ulclass="nav-site nav-site-internal"><liclass="siteNavGroupActive"><ahref="/docs/next/core/core-intro"target="_self">Docs</a></li><liclass=""><ahref="/api/org/bitcoins"target="_self">API</a></li><liclass=""><ahref="/help"target="_self">Help</a></li><liclass="navSearchWrapper reactNavSearchWrapper"><inputtype="text"id="search_input_react"placeholder="Search"title="Search"/></li></ul></nav></div></header></div></div><divclass="navPusher"><divclass="docMainWrapper wrapper"><divclass="docsNavContainer"id="docsNav"><navclass="toc"><divclass="toggleNav"><sectionclass="navWrapper wrapper"><divclass="navBreadcrumb wrapper"><divclass="navToggle"id="navToggler"><divclass="hamburger-menu"><divclass="line1"></div><divclass="line2"></div><divclass="line3"></div></div></div><h2><i>›</i><span>Getting Setup</span></h2><divclass="tocToggler"id="tocToggler"><iclass="icon-toc"></i></div></div><divclass="navGroups"><divclass="navGroup"><h3class="navGroupCategoryTitle">Getting Started</h3><ulclass=""><liclass="navListItem"><aclass="navItem"href="/docs/next/getting-started">Add Bitcoin-S to your project</a></li></ul></div><divclass="navGroup"><h3class="navGroupCategoryTitle">Getting Setup</h3><ulclass=""><liclass="navListItem navListItemActive"><aclass="navItem"href="/docs/next/getting-setup">Getting Bitcoin-S installed on your machine</a></li></ul></div><divclass="navGroup"><h3class="navGroupCategoryTitle">Applications</h3><ulclass=""><liclass="navListItem"><aclass="navItem"href="/docs/next/applications/cli">CLI</a></li><liclass="navListItem"><aclass="navItem"href="/docs/next/applications/server">Application Server</a></li></ul></div><divclass="navGroup"><h3class="navGroupCategoryTitle">Chain</h3><ulclass=""><liclass="navListItem"><aclass="navItem"href="/docs/next/chain/chain">Blockchain Verification</a></li><liclass="navLi
<p>The first step in getting setup will be getting the <ahref="https://www.oracle.com/java/technologies/javase-downloads.html">Java Development Kit</a> (JDK) installed on your machine. Bitcoin-S works best with Java 8 but <em>should</em> also work with Java 11 and Java 13.</p>
<p>Once java is setup on your machine (try running <code>javac -version</code>), you are ready to download and install the <ahref="https://www.scala-sbt.org/download.html">Scala Build Tool</a> (sbt). Note that running <code>sbt</code> for the first time will take a while.</p>
<spanclass="hljs-type">SLF4J</span>: <spanclass="hljs-type">Failed</span> to load <spanclass="hljs-class"><spanclass="hljs-keyword">class</span> "<spanclass="hljs-title">org</span>.<spanclass="hljs-title">slf4j</span>.<spanclass="hljs-title">impl</span>.<spanclass="hljs-title">StaticLoggerBinder</span>".</span>
<spanclass="hljs-type">SLF4J</span>: <spanclass="hljs-type">Defaulting</span> to no-operation (<spanclass="hljs-type">NOP</span>) logger implementation
<spanclass="hljs-type">SLF4J</span>: <spanclass="hljs-type">See</span> http:<spanclass="hljs-comment">//www.slf4j.org/codes.html#StaticLoggerBinder for further details.</span>
<p>Now that we have the bitcoin-s repo setup, we want to create our application configurations. This is done by creating a <code>bitcoin-s.conf</code> file at <code>$HOME/.bitcoin-s</code>. <ahref="applications/configuration#example-configuration-file">Here is an example configuration file</a>. The only thing that you will <em>need</em> to change is the <code>peers</code> list to which you will want to add <code>"localhost:18444"</code> if you want to run in regtest.</p>
<p>Once the bitcoin-s configuration is all done, I recommend creating a directory someplace in which to run your <code>bitcoind</code> node. Once you have this directory created, add the following <code>bitcoin.conf</code> file to it</p>
<p>We are finally ready to start running some programs! Follow the <ahref="applications/server#building-the-server">instructions here</a> to build the server. Then, follow <ahref="applications/cli">these instructions</a> to setup the CLI (note that this will require you install some graalvm things as detailed in the instructions).</p>
<p>Now, you want to run your <code>bitcoind</code> in regtest by doing the following command:</p>
<p>There is currently a bug on regtest where the server is unable to handle too many blocks at once, so when generating more than a couple blocks (like above), it is recommended you shut down your server and restart it after the blocks have been created.</p>
<p>To run your Bitcoin-S Server on testnet, simply change <code>network = testnet3</code> and change your <code>peers = ["neutrino.testnet3.suredbits.com:18333"]</code> in your <code>.bitcoin-s/bitcoin-s.conf</code> file. This will allow you to connect to Suredbits' neutrino-enabled <code>bitcoind</code> node. Keep in mind then when you restart your server, it will begin initial sink which will take many hours as all block filters for all testnet blocks will be downloaded. If you wish to speed this process up, download <ahref="https://s3-us-west-2.amazonaws.com/www.suredbits.com/testnet-chaindump-2-25-2020.zip">this snapshot</a>, unzip it and put the file in your <code>$HOME/.bitcoin-s/testnet3</code> directory and then from there, run</p>