basicswap/doc/install.md

136 lines
3.3 KiB
Markdown
Raw Normal View History

2019-07-26 13:07:22 +00:00
## Source code
2019-07-26 13:07:22 +00:00
$ git clone https://github.com/tecnovert/basicswap.git
## Run Using Docker
Docker must be installed and started:
$ sudo systemctl status docker | grep Active
Should return a line containing `active (running)`
Create the images:
2019-07-26 13:07:22 +00:00
$ cd basicswap/docker
$ docker-compose build
Prepare the datadir:
Set XMR_RPC_HOST and BASE_XMR_RPC_PORT to a public XMR node or exclude to run a local node.
$ export SWAP_DATADIR=/var/data/coinswaps
$ docker run -e XMR_RPC_HOST="node.xmr.to" -e BASE_XMR_RPC_PORT=18081 -t --name swap_prepare -v $SWAP_DATADIR:/coindata i_swapclient \
basicswap-prepare --datadir=/coindata --withcoins=monero --withoutcoins=litecoin --htmlhost="0.0.0.0" --xmrrestoreheight=2245107
Record the mnemonic from the output of the above command.
Remove swap_prepare container (and logs):
$ docker rm swap_prepare
2019-07-26 13:07:22 +00:00
Start the container
2019-07-26 13:07:22 +00:00
$ export SWAP_DATADIR=/var/data/coinswaps
$ docker-compose up
2019-07-26 13:07:22 +00:00
Open in browser: `http://localhost:12700`
2019-07-26 13:07:22 +00:00
## Run Without Docker:
2019-07-26 13:07:22 +00:00
$ apt-get install -y wget python3-pip gnupg unzip protobuf-compiler automake libtool pkg-config
2019-07-26 13:07:22 +00:00
$ export SWAP_DATADIR=/var/data/coinswaps
$ mkdirs -p "$SWAP_DATADIR/venv"
$ python3 -m venv "$SWAP_DATADIR/venv"
$ . $SWAP_DATADIR/venv/bin/activate && python -V
$ wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/anonswap.zip
$ unzip coincurve-anonswap.zip
$ cd coincurve-anonswap
$ python3 setup.py install --force
2019-07-26 13:07:22 +00:00
$ cd $SWAP_DATADIR
$ git clone https://github.com/tecnovert/basicswap.git
2019-07-26 13:07:22 +00:00
$ cd basicswap
$ protoc -I=basicswap --python_out=basicswap basicswap/messages.proto
2019-07-27 20:13:35 +00:00
$ pip3 install .
2019-07-26 13:07:22 +00:00
Prepare the datadir:
XMR_RPC_HOST="node.xmr.to" BASE_XMR_RPC_PORT=18081 basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero --withoutcoins=litecoin --xmrrestoreheight=2245107
Record the mnemonic from the output of the above command.
Start the app
$ basicswap-run --datadir=$SWAP_DATADIR
Open in browser: `http://localhost:12700`
2019-07-26 13:07:22 +00:00
Old notes
=============
2019-07-26 13:07:22 +00:00
## Run Without Installing
$ cd basicswap
$ pip install sqlalchemy protobuf pyzmq
$ protoc -I=basicswap --python_out=basicswap basicswap/messages.proto
$ export PYTHONPATH=$(pwd)
$ python bin/basicswap-prepare.py
$ python bin/basicswap-run.py
2019-07-27 20:34:40 +00:00
## OSX
2019-07-29 22:41:28 +00:00
Install Homebrew:
https://brew.sh/
Command Line Tools:
$ xcode-select --install
Dependencies:
$ brew install python git protobuf gnupg
Python certificates:
$ /Applications/Python\ 3.7/Install\ Certificates.command
Basicswap
2019-07-27 20:34:40 +00:00
$ git clone https://github.com/tecnovert/basicswap.git
$ cd basicswap
$ protoc -I=basicswap --python_out=basicswap basicswap/messages.proto
$ pip3 install .
$ basicswap-prepare
$ basicswap-run
2019-07-28 12:45:26 +00:00
# Windows
2019-07-29 22:41:28 +00:00
Install git and python3:
https://gitforwindows.org/
https://www.python.org/downloads/windows/
2019-09-05 08:21:45 +00:00
Remember to select the 'Add Python to environment variables' option.
2019-07-29 22:41:28 +00:00
2019-07-28 12:45:26 +00:00
Right click in the directory you want to install into and select 'Git Bash Here':
$ git clone https://github.com/tecnovert/basicswap.git
$ cd basicswap
$ pip3 install .
$ basicswap-prepare
$ basicswap-run
Open url in browser:
http://localhost:12700
Shutdown by pressing ctrl + c in the Git Bash console window.