mirror of
https://github.com/mempool/mempool.git
synced 2025-03-28 18:52:32 +01:00
Move manual install docs away from main readme
Replace with links to docker/, frontend/, and /backend.
This commit is contained in:
parent
b91654886a
commit
f55590269e
176
README.md
176
README.md
@ -10,14 +10,7 @@ It is an open-source project developed and operated for the benefit of the Bitco
|
|||||||
|
|
||||||
Mempool can be self-hosted on a wide variety of your own hardware, ranging from a simple one-click installation on a Raspberry Pi full-node distro all the way to a robust production instance on a powerful FreeBSD server.
|
Mempool can be self-hosted on a wide variety of your own hardware, ranging from a simple one-click installation on a Raspberry Pi full-node distro all the way to a robust production instance on a powerful FreeBSD server.
|
||||||
|
|
||||||
We support the following installation methods, ranked in order from simple to advanced:
|
**Most people should use a one-click install method.** Other install methods are meant for developers and others with experience managing servers.
|
||||||
|
|
||||||
1) [One-click installation on full-node distros](#one-click-installation)
|
|
||||||
2) [Docker installation on Linux using docker-compose](./docker)
|
|
||||||
3) [Manual installation on Linux or FreeBSD](#manual-installation)
|
|
||||||
4) [Production installation on a powerful FreeBSD server](./production)
|
|
||||||
|
|
||||||
This doc offers install notes on the one-click method and manual install method. Follow the links above for install notes on Docker and production installations.
|
|
||||||
|
|
||||||
<a id="one-click-installation"></a>
|
<a id="one-click-installation"></a>
|
||||||
## One-Click Installation
|
## One-Click Installation
|
||||||
@ -29,167 +22,12 @@ Mempool can be conveniently installed on the following full-node distros:
|
|||||||
- [myNode](https://github.com/mynodebtc/mynode)
|
- [myNode](https://github.com/mynodebtc/mynode)
|
||||||
- [Start9](https://github.com/Start9Labs/embassy-os)
|
- [Start9](https://github.com/Start9Labs/embassy-os)
|
||||||
|
|
||||||
<a id="manual-installation"></a>
|
**We highly recommend you deploy your own Mempool instance this way.** No matter which option you pick, you'll be able to get your own fully-sovereign instance of Mempool up quickly without needing to fiddle with any settings.
|
||||||
## Manual Installation
|
|
||||||
|
|
||||||
The following instructions are for a manual installation on Linux or FreeBSD. You may need to change file and directory paths to match your OS.
|
## Advanced Installation Methods
|
||||||
|
|
||||||
You will need [Bitcoin Core](https://github.com/bitcoin/bitcoin), [Electrum Server](https://github.com/romanz/electrs), [Node.js](https://github.com/nodejs/node), [MariaDB](https://github.com/mariadb/server), and [Nginx](https://github.com/nginx/nginx). Below, we walk through how to configure each of these.
|
Mempool can be installed in other ways too, but we only recommend doing so if you're a developer, have experience managing servers, or otherwise know what you're doing.
|
||||||
|
|
||||||
### 1. Get Latest Mempool Release
|
- See the [`docker/`](./docker/) directory for instructions on deploying Mempool with Docker.
|
||||||
|
- See the [`backend/`](./backend/) and [`frontend/`](./frontend/) directories for manual install instructions oriented for developers and small-scale deployments.
|
||||||
Clone the Mempool repo, and checkout the latest release tag:
|
- See the [`production/`](./production/) directory for guidance on setting up a more serious Mempool instance designed for high performance at scale.
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/mempool/mempool
|
|
||||||
cd mempool
|
|
||||||
latestrelease=$(curl -s https://api.github.com/repos/mempool/mempool/releases/latest|grep tag_name|head -1|cut -d '"' -f4)
|
|
||||||
git checkout $latestrelease
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. Configure Bitcoin Core
|
|
||||||
|
|
||||||
Enable RPC and txindex in `bitcoin.conf`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
rpcuser=mempool
|
|
||||||
rpcpassword=mempool
|
|
||||||
txindex=1
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. Get & Configure MySQL
|
|
||||||
|
|
||||||
Install MariaDB from your OS package manager:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Debian, Ubuntu, etc.
|
|
||||||
apt-get install mariadb-server mariadb-client
|
|
||||||
|
|
||||||
# macOS
|
|
||||||
brew install mariadb
|
|
||||||
mysql.server start
|
|
||||||
```
|
|
||||||
|
|
||||||
Create a database and grant privileges:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
MariaDB [(none)]> drop database mempool;
|
|
||||||
Query OK, 0 rows affected (0.00 sec)
|
|
||||||
|
|
||||||
MariaDB [(none)]> create database mempool;
|
|
||||||
Query OK, 1 row affected (0.00 sec)
|
|
||||||
|
|
||||||
MariaDB [(none)]> grant all privileges on mempool.* to 'mempool'@'%' identified by 'mempool';
|
|
||||||
Query OK, 0 rows affected (0.00 sec)
|
|
||||||
```
|
|
||||||
|
|
||||||
### 4. Build Mempool Backend
|
|
||||||
|
|
||||||
Install Mempool dependencies with npm and build the backend:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd backend
|
|
||||||
npm install --prod
|
|
||||||
npm run build
|
|
||||||
```
|
|
||||||
|
|
||||||
In the `backend` folder, make a copy of the sample config:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cp mempool-config.sample.json mempool-config.json
|
|
||||||
```
|
|
||||||
|
|
||||||
Edit `mempool-config.json` with your Bitcoin Core node RPC credentials:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
{
|
|
||||||
"MEMPOOL": {
|
|
||||||
"NETWORK": "mainnet",
|
|
||||||
"BACKEND": "electrum",
|
|
||||||
"HTTP_PORT": 8999
|
|
||||||
},
|
|
||||||
"CORE_RPC": {
|
|
||||||
"HOST": "127.0.0.1",
|
|
||||||
"PORT": 8332,
|
|
||||||
"USERNAME": "mempool",
|
|
||||||
"PASSWORD": "mempool"
|
|
||||||
},
|
|
||||||
"ELECTRUM": {
|
|
||||||
"HOST": "127.0.0.1",
|
|
||||||
"PORT": 50002,
|
|
||||||
"TLS_ENABLED": true
|
|
||||||
},
|
|
||||||
"DATABASE": {
|
|
||||||
"ENABLED": true,
|
|
||||||
"HOST": "127.0.0.1",
|
|
||||||
"PORT": 3306,
|
|
||||||
"USERNAME": "mempool",
|
|
||||||
"PASSWORD": "mempool",
|
|
||||||
"DATABASE": "mempool"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Start the backend:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run start
|
|
||||||
```
|
|
||||||
|
|
||||||
When it's running, you should see output like this:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
Mempool updated in 0.189 seconds
|
|
||||||
Updating mempool
|
|
||||||
Mempool updated in 0.096 seconds
|
|
||||||
Updating mempool
|
|
||||||
Mempool updated in 0.099 seconds
|
|
||||||
Updating mempool
|
|
||||||
Calculated fee for transaction 1 / 10
|
|
||||||
Calculated fee for transaction 2 / 10
|
|
||||||
Calculated fee for transaction 3 / 10
|
|
||||||
Calculated fee for transaction 4 / 10
|
|
||||||
Calculated fee for transaction 5 / 10
|
|
||||||
Calculated fee for transaction 6 / 10
|
|
||||||
Calculated fee for transaction 7 / 10
|
|
||||||
Calculated fee for transaction 8 / 10
|
|
||||||
Calculated fee for transaction 9 / 10
|
|
||||||
Calculated fee for transaction 10 / 10
|
|
||||||
Mempool updated in 0.243 seconds
|
|
||||||
Updating mempool
|
|
||||||
```
|
|
||||||
|
|
||||||
### 5. Build Mempool Frontend
|
|
||||||
|
|
||||||
Install the Mempool dependencies with npm and build the frontend:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd frontend
|
|
||||||
npm install --prod
|
|
||||||
npm run build
|
|
||||||
```
|
|
||||||
|
|
||||||
Install the output into the nginx webroot folder:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo rsync -av --delete dist/ /var/www/
|
|
||||||
```
|
|
||||||
|
|
||||||
### 6. `nginx` + `certbot`
|
|
||||||
|
|
||||||
Install the supplied `nginx.conf` and `nginx-mempool.conf` in `/etc/nginx`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# install nginx and certbot
|
|
||||||
apt-get install -y nginx python3-certbot-nginx
|
|
||||||
|
|
||||||
# install the mempool configuration for nginx
|
|
||||||
cp nginx.conf nginx-mempool.conf /etc/nginx/
|
|
||||||
|
|
||||||
# replace example.com with your domain name
|
|
||||||
certbot --nginx -d example.com
|
|
||||||
```
|
|
||||||
|
|
||||||
If everything went well, you should see the beautiful mempool :grin:
|
|
||||||
|
|
||||||
If you get stuck on "loading blocks", this means the websocket can't connect. Check your nginx proxy setup, firewalls, etc. and open an issue if you need help.
|
|
Loading…
x
Reference in New Issue
Block a user