A full introduction is described in our docs: https://docs.walletconnect.org/technical-specification
- Python
- Docker (for Docker setup)
- Make (for Make commands)
Step 0. Point DNS record to your box (required for SSL)
<YOUR_BRIDGE_URL> A 192.168.1.1Step 1. Setup the bridge URL to match your DNS record
$ make setup URL=<YOUR_BRIDGE_URL>
# OR
$ sed -i -e 's/bridge.mydomain.com/<YOUR_BRIDGE_URL>/g' nginx/defaultConf && rm -rf nginx/defaultConf-eStep 2. Run the following command to build the Docker image
$ make build
# OR
$ docker build . -t py-walletconnect-bridgeStep 3. Finally run the following command to run the Docker container
$ make run
# OR
$ docker run -it -v $(pwd)/:/source/ -p 443:443 -p 80:80 py-walletconnect-bridgeYou can test it at https://<YOUR_BRIDGE_URL>/hello
This setup defaults to the active branch in your current directory in order to build a Docker image from another branch, run the following command:
$ make build BRANCH=v0.7.x
# OR
$ docker build . -t py-walletconnect-bridge --build-arg branch=v0.7.xFor this sample configuration file, the bridge will be available at https://<YOUR_BRIDGE_URL>/ . After specifying <YOUR_BRIDGE_URL> to 0.0.0.0 in /etc/hosts,
To update the bridge, just run the following and it will maintain the existing state of the existing bridge sessions and quickly swap containers to the new version
$ make update
# Optional (choose branch)
$ make update BRANCH=developThis approach uses Certbot to generate real SSL certificates for your configured nginx hosts. If you would prefer to use the self signed certificates, you can pass the --skip-certbot flag to docker run as follows:
$ make run_no_certbot
# OR
$ docker run -it -v $(pwd)/:/source/ -p 443:443 -p 80:80 py-walletconnect-bridge --skip-certbotCertbot certificates expire after 90 days. To renew, shut down the docker process and run make renew. You should back up your old certs before doing this, as they will be deleted.
If you'd like to keep a separate Python environment for this project's installs, set up virtualenv
$ pip install virtualenv virtualenvwrapperAdd the following to your ~/.bashrc
export WORKON_HOME=$HOME/.virtualenvs~
export PROJECT_HOME=$HOME/Devel
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
source /usr/local/bin/virtualenvwrapper.shFrom the project directory, run these commands to install the walletconnect-bridge package in a virtualenv called "walletconnect-bridge"
$ mkvirtualenv walletconnect-bridge
$ pip install -r requirements.txt
$ python setup.py developIn another terminal, start local Redis instance
$ redis-serverRun the project locally
$ walletconnect-bridge --redis-localTest your Bridge is working
$ curl https://<YOUR_BRIDGE_URL>/hello