BasicSwap Installation Guide
Monitor your terminal output carefully during BasicSwap installation. Any error messages require immediate attention—even seemingly minor errors can prevent successful launch if left unresolved.
Watch particularly for permission issues, dependency failures, or network connectivity problems, and resolve each before proceeding to the next installation step.
Automated Installation Methods
- Windows
- Linux
Windows .exe Installer (Unstable, not Recommended)
Install BasicSwap on Windows effortlessly with a graphical installation wizard:
- Download the .exe installer from GitHub
- Run the installer as administrator (right-click → Run as administrator)
- Follow the on-screen instructions to complete the installation
This intuitive installer streamlines the setup process via an easy-to-navigate menu.
Linux Scripts Suite
For Linux users, the simplest installation method is through community-developed scripts:
- Download the scripts from GitHub
- Make the script executable:
chmod +x basicswap-install.sh
- Run the installation script:
./basicswap-install.sh
This collection of scripts automates common setup tasks, including installing, adding/removing/updating coin cores, updating BasicSwap, and enabling Tor.
Install Using Docker
BasicSwap is currently in beta stage and doesn't offer pre-compiled executables or integrations with third-party services (upcoming). You'll need to compile the source code and run a full node on your device.
Install Docker
Docker provides the simplest installation method for most users. This containerized approach ensures consistent setup across different environments and simplifies dependency management.
However, please note that this method is not compatible with macOS systems — Mac users should follow the alternative instructions in the next section.
- Windows
- Linux
-
Complete the prerequisites on the Docker Desktop WSL 2 backend page, which includes activating WSL2 on Windows.
-
Download Docker Desktop for Windows from the official website.
-
Follow the installation instructions for Docker with WSL 2 as detailed on the Docker Desktop WSL 2 backend documentation.
Docker on Windows 11: Some Docker Desktop versions may experience compatibility issues with Windows 11. If you encounter problems, consider installing Docker Desktop version 4.8.x or earlier, which have proven more stable on Windows 11 systems.
Hardware Virtualization Requirements: Docker requires hardware virtualization support which must be enabled in your BIOS/UEFI settings. Before installation:
- Access your computer's BIOS/UEFI (typically by pressing
F2
,F12
, orDelete
during startup) - Navigate to the CPU configuration section
- Enable options labeled "Virtualization Technology", "Intel VT-x/AMD-V", or similar
- Save changes and restart
Docker's installation wizard will alert you if virtualization is disabled. Follow any on-screen troubleshooting guidance provided during setup.
Depending on your Docker version, commands may either require a dash (-) or not. If, for example, docker-compose up
and other Docker commands return an error, try running them without a dash (e.g., docker compose up
).
- Install the required dependencies.
apt-get install curl jq git
- Verify that Docker is already installed on your system.
docker -v
If you see a message indicating Docker version (...)
, Docker is already installed and you can move on to the next steps without reinstalling it.
-
Install Docker by following the instructions on their website.
-
Configure Docker to run without sudo is recommended, as outlined in this guide. Without this setup, you'll need to type
sudo
before everydocker-compose
command.
Create the Docker Image
Create the BasicSwap Docker image needed to run the DEX.
- Windows
- Linux
- Open a WSL (Linux) terminal.
Press Windows + R
> type "wsl" > press ENTER
.
- Install Git and other dependencies.
sudo apt update
sudo apt install git jq curl
- Clone the BasicSwap repository.
git clone https://github.com/basicswap/basicswap.git
- Navigate to BasicSwap's Docker folder.
cd basicswap/docker/
- Copy the default environment file.
cp example.env .env
- (Optional) Set a custom coin data path by modifying the target path in your
.env
file.
nano .env
- Build the BasicSwap Docker image (make sure that you are in
basicswap/docker
).
docker-compose build
-
Open a terminal.
-
Install Git and other dependencies.
sudo apt update
sudo apt install git jq curl
- Clone the BasicSwap repository.
git clone https://github.com/basicswap/basicswap.git
- Navigate to BasicSwap's Docker folder.
cd basicswap/docker/
- Copy the default environment file.
cp example.env .env
- (Optional) Set a custom coin data path by modifying the target path in your
.env
file.
nano .env
- Build the BasicSwap Docker image (make sure you are in
basicswap/docker
).
docker-compose build
Configure the Docker Image
After creating BasicSwap's Docker image, it's time to configure it to your preferences.
- Windows
- Linux
- Open a WSL (Linux) terminal.
Press Windows + R
> type "wsl" > press ENTER
.
- Navigate to BasicSwap's Docker folder.
cd basicswap/docker/
- Set
xmrrestoreheight
to Monero's current chain height.
CURRENT_XMR_HEIGHT=$(curl -s http://node2.monerodevs.org:18089/get_info | jq .height)
-
Choose which cryptocurrencies to enable (Particl is enabled by default and cannot be disabled). You must explicitly specify these currencies in your configuration command.
-
Determine whether you want to use fast synchronization for the Bitcoin blockchain by including the
--usebtcfastsync
parameter. Fast sync uses checkpoints to reduce initial setup time significantly. -
Append
--client-auth-password=<YOUR_PASSWORD>
to the below command to optionally enable client authentication to protect your web UI and API port access from unauthorized access. -
Execute the following command to configure your BasicSwap, adjusting it according to your preferences as described above.
docker run --rm -t --name swap_prepare -v $COINDATA_PATH:/coindata i_swapclient basicswap-prepare --datadir=/coindata --withcoins=monero,bitcoin --htmlhost="0.0.0.0" --wshost="0.0.0.0" --xmrrestoreheight=$CURRENT_XMR_HEIGHT --usebtcfastsync
-
Note down and store the mnemonic provided by the above command in a safe place. It serves as your backup key and is valid for all enabled coins.
-
Note down the result of the following command, it will speed up the process of recovering your Monero if needed.
echo $CURRENT_XMR_HEIGHT
- (Optional) Adjust your timezone by specifying the appropriate
TZ
value in your.env
file, located within the BasicSwap Docker directory. Use thetimedatectl list-timezones
command to view valid timezone options.
nano .env
To save changes, press CTRL + X
, then Y + ENTER
.
-
Open a terminal.
-
Navigate to BasicSwap's Docker folder.
cd basicswap/docker/
- Set
xmrrestoreheight
to Monero's current chain height.
CURRENT_XMR_HEIGHT=$(curl -s http://node2.monerodevs.org:18089/get_info | jq .height)
-
Choose which cryptocurrencies to enable (Particl is enabled by default and cannot be disabled). You must explicitly specify these currencies in your configuration command.
-
Determine whether you want to use fast synchronization for the Bitcoin blockchain by including the
--usebtcfastsync
parameter. Fast sync uses checkpoints to reduce initial setup time significantly. -
Append
--client-auth-password=<YOUR_PASSWORD>
to the below command to optionally enable client authentication to protect your web UI and API port access from unauthorized access. -
Execute the following command to configure your BasicSwap, adjusting it according to your preferences as described above.
docker run --rm -t --name swap_prepare -v $COINDATA_PATH:/coindata i_swapclient basicswap-prepare --datadir=/coindata --withcoins=monero,bitcoin --htmlhost="0.0.0.0" --wshost="0.0.0.0" --xmrrestoreheight=$CURRENT_XMR_HEIGHT --usebtcfastsync
-
Note down and store the mnemonic provided by the above command in a safe place. It serves as your backup key and is valid for all enabled coins.
-
Note down the result of the following command, it will speed up the process of recovering your Monero if needed.
echo $CURRENT_XMR_HEIGHT
- (Optional) Adjust your timezone by specifying the appropriate
TZ
value in your.env
file, located within the BasicSwap Docker directory. Use thetimedatectl list-timezones
command to view valid timezone options.
nano .env
To save changes, press CTRL + X
, then Y + ENTER
.
Start BasicSwap
After configuring your Docker image, the next step is to run it. Doing so will launch BasicSwap, making it accessible through web browsers.
- Windows
- Linux
- Open a WSL (Linux) terminal.
Press Windows + R
> type "wsl" > press ENTER
.
- Navigate to BasicSwap's Docker folder.
cd basicswap/docker/
- Start the Docker image. This will initiate BasicSwap's startup process.
export COINDATA_PATH=/var/data/coinswaps
docker-compose up
- Allow BasicSwap to complete its startup sequence, then access the interface by opening your web browser and navigating to the address below.
http://localhost:12700
-
Open a terminal.
-
Navigate to BasicSwap's Docker folder.
cd basicswap/docker/
- Start the Docker image. This will initiate BasicSwap's startup process.
export COINDATA_PATH=/var/data/coinswaps
docker-compose up
- Allow BasicSwap to complete its startup sequence, then access the interface by opening your web browser and navigating to the address below.
http://localhost:12700
Install Without Docker
Build BasicSwap
The first step to running BasicSwap without docker is to build it locally on your device.
- macOS
- Linux
-
Open Terminal (i.e.,
COMMAND ⌘ + SPACE
and type "terminal" > hitENTER ↵
). -
Install Homebrew by executing the following command in the Terminal. Homebrew extends MacOS with a wealth of Linux-style package management capabilities.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install the required dependencies
brew install python git gnupg pkg-config jq
-
Close the terminal and open a new one. This will update the python symlinks and let you progress through the next steps.
-
Execute the commands below sequentially to setup the environment. Each line must be run one-by-one to prevent errors and ensure successful execution.
export SWAP_DATADIR=/Users/$USER/coinswaps
python3 -m venv "$SWAP_DATADIR/venv"
. $SWAP_DATADIR/venv/bin/activate && python3 -V
cd $SWAP_DATADIR
git clone https://github.com/basicswap/basicswap.git
cd $SWAP_DATADIR/basicswap
- Install root SSL certificates for the SSL module (more information here).
sudo python3 bin/install_certifi.py
- Continue with the BasicSwap installation, executing the following two commands.
pip3 install --require-hashes -r requirements.txt
pip3 install .
- Install the required dependencies
apt-get install --no-install-recommends git python3-venv libpython3-dev gnupg pkg-config gcc libc-dev curl jq
- Execute the commands below sequentially (one by one) to setup the environment. Each line must be run one-by-one to prevent errors and ensure successful execution.
export SWAP_DATADIR=$HOME/coinswaps
python3 -m venv "$SWAP_DATADIR/venv"
. $SWAP_DATADIR/venv/bin/activate && python3 -V
cd $SWAP_DATADIR
git clone https://github.com/basicswap/basicswap.git
cd $SWAP_DATADIR/basicswap
pip3 install --require-hashes -r requirements.txt
pip3 install .
Configure BasicSwap
Once the installation is complete, configure BasicSwap according to your requirements.
- macOS
- Linux
-
Open Terminal (i.e.,
COMMAND ⌘ + SPACE
and type "terminal" > hitENTER ↵
). -
Navigate to your BasicSwap folder.
cd /Users/$USER/coinswaps
- Set
xmrrestoreheight
to Monero's current chain height.
CURRENT_XMR_HEIGHT=$(curl -s http://node2.monerodevs.org:18089/get_info | jq .height)
-
Choose which cryptocurrencies to enable (Particl is enabled by default and cannot be disabled). You must explicitly specify these currencies in your configuration command.
-
Determine whether you want to use fast synchronization for the Bitcoin blockchain by including the
--usebtcfastsync
parameter. Fast sync uses checkpoints to reduce initial setup time significantly. -
Append
--client-auth-password=<YOUR_PASSWORD>
to the below command to optionally enable client authentication to protect your web UI and API port access from unauthorized access. -
Execute the following command to configure your BasicSwap, adjusting it according to your preferences as described above.
basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,bitcoin --xmrrestoreheight=$CURRENT_XMR_HEIGHT --usebtcfastsync
-
Open a terminal.
-
Navigate to your BasicSwap folder.
cd $HOME/coinswaps
- Set
xmrrestoreheight
to Monero's current chain height.
CURRENT_XMR_HEIGHT=$(curl -s http://node2.monerodevs.org:18089/get_info | jq .height)
-
Choose which cryptocurrencies to enable (Particl is enabled by default and cannot be disabled). You must explicitly specify these currencies in your configuration command.
-
Determine whether you want to use fast synchronization for the Bitcoin blockchain by including the
--usebtcfastsync
parameter. Fast sync uses checkpoints to reduce initial setup time significantly. -
Append
--client-auth-password=<YOUR_PASSWORD>
to the below command to optionally enable client authentication to protect your web UI and API port access from unauthorized access. -
Execute the following command to configure your BasicSwap, adjusting it according to your preferences as described above.
basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,bitcoin --xmrrestoreheight=$CURRENT_XMR_HEIGHT --usebtcfastsync
Start BasicSwap
After configuration, launch BasicSwap to start the service. Once initialized, the DEX interface will be accessible through your web browser, allowing you to begin trading.
- macOS
- Linux
-
Open Terminal (i.e.,
COMMAND ⌘ + SPACE
and type "terminal" > hitENTER ↵
). -
Navigate to your BasicSwap folder.
cd /Users/$USER/coinswaps
- Launch BasicSwap.
basicswap-run --datadir=$SWAP_DATADIR
- Allow BasicSwap to complete its startup sequence, then access the interface by opening your web browser and navigating to the address below.
http://localhost:12700
-
Open a terminal.
-
Navigate to your BasicSwap folder.
cd $HOME/coinswaps
- Launch BasicSwap.
basicswap-run --datadir=$SWAP_DATADIR
- Allow BasicSwap to complete its startup sequence, then access the interface by opening your web browser and navigating to the address below.
http://localhost:12700