Rosen Bridge Watcher — Windows Setup Guide

Follow this guide to deploy your very own watcher app on Windows

GoatSpark
6 min readDec 14, 2023
Photo from the Watcher UI at http://localhost:3030

Link to Original Guide for Linux

https://github.com/rosen-bridge/operation/blob/dev/docs/watcher/deploy-docker.md

Other resources

Intro

This guide will walk you through deploying a Rosen Bridge Watcher App for Ergo on a Windows PC.

Software Requirements

Follow the steps in this section to setup your Windows PC with the required software

Docker Desktop App

GitHub for Desktop

Nautilus Wallet Browser Extension

Nami Wallet Browser Extension (For Cardano Watcher Setup)

Create a new Ergo wallet using Nautilus

Watcher Setup — Ergo

Clone the Rosen Bridge Operation Repository + Additional Setup

In this section you’ll be using the GitHub Desktop App that you previously installed.

  • Search for “GitHub Desktop” in the Windows search bar
  • Open the GitHub Desktop App
  • Select File > Clone repository…
  • In the “Clone a repository” window that pops up:
    — Select the “URL” tab
  • In the Repository URL text box enter the following:
    https://github.com/rosen-bridge/operation.git
  • Select the “Choose…” button and create/select the folder where the Rosen Bridge Watcher App will be cloned to
  • Select “Clone”
  • Open the File Explorer app
File Explorer
  • Navigate to the “watcher” folder inside the repository you have just cloned.
    — In my example I’m navigating to C:\rosen-bridge\operation\watcher
  • The watcher folder contents should look like:
  • Select the env.template file
  • Copy the file with ctrl+c
  • Paste the file with ctrl+v and you should now have the following file
  • Shift+right-click on the “env — Copy.template” file and select “Open with”
  • Select “Notepad”
  • Edit the “env — Copy.template” in the Notepad App
    — Add an alphanumeric password after POSTGRES_PASSWORD=
    — Add a name after POSTGRES_USER=
    — Add a name after POSTGRES_DB=
    — Make sure there is no space after the “=”
  • Example:
# Required Environments
POSTGRES_PASSWORD=rosen
POSTGRES_USER=rosen
POSTGRES_DB=rosen
POSTGRES_PORT=5432

# Optional Environments
WATCHER_PORT=
WATCHER_IMAGE_VERSION=
UI_IMAGE_VERSION=
  • Select File > Save as
    — Name the file:
.env
  • Go back to the “watcher” folder in the File Explorer
  • Enter the config folder (C:\rosen-bridge\operation\watcher\config)
  • Right-click inside the folder and select New > Text Document
  • Right-click “New Text Document.txt” and rename to:
local.yaml
  • When prompted with “Are you sure you want to change it?”
  • Select Yes
  • Shift+right-click the “local.yaml” file and select “Open With”
  • Select Notepad
  • Paste the following template into the file
network: ergo
ergo:
type: explorer
initialHeight: 1171162
mnemonic: "enter your mnemonic seed phrase from Nautilus here"
node:
url: https://node.ergopool.io
explorer:
url: https://api.ergoplatform.com
transaction:
commitmentTimeoutConfirmation: 720

observation:
confirmation: 10
validThreshold: 3600

healthCheck:
permit:
warnCommitmentCount: 1 # amount of permits left it starts warning
criticalCommitmentCount: 0 # amount of permits left it is critical
  • Navigate to https://explorer.ergoplatform.com/ and find the most recent block number under the Height column
    — This number will be used as the initialHeight value later
  • Make the following edits to the pasted template
    — In line 4, after “initialHeight:” type the most recent block number found in the previous step
    — In line 5, after “mnemonic:” type the seed phrase you wrote down when creating a new wallet in Nautilus
  • Save the local.yaml file
  • STOP HERE if you are using Ergo Explorer as the primary data source for the Ergo network

Using an Ergo Node as the primary data source

  • If you have a full ergo node already setup on your computer then
    make the the following edits
    — In line 3, after “type:” replace “explorer” with “node”
    — In line 7, after “url:” type
http://<your-IP-address>:9053/
  • Save the local.yaml file

Run Docker

  • Search for “Docker Desktop” in the Windows search bar
  • Open the Docker Desktop App
  • Open the File Explorer app
File Explorer
  • Navigate to the “operation” folder inside the repository you previously cloned
    — In my example I’m navigating to C:\rosen-bridge\operation\
  • Shift+right-click the “watcher” folder
  • Select “Open PowerShell window here”
  • Type the following and then press enter
docker compose pull
  • then
docker compose up -d

The command output should look like

[+] Running 5/5
✔ Network watcher_rosen_network Created
✔ Volume "watcher_postgres-data" Created
✔ Container watcher-db-1 Healthy
✔ Container watcher-service-1 Healthy
✔ Container watcher-ui-1 Started

Obtain Report Permits

  • Send 802 ERG and 30,002 RSN to your watcher wallet
    — The above amounts include additional ERG & RSN for transaction fees
  • Send an additional 3,000 RSN for each watcher permit you wish to obtain
  • In the actions section click on the “Lock” icon
  • In the “Amount” text box enter a number in multiples of 3000
3000 RSN generates 1 permit
  • Click “Lock”
  • You should now receive your WID Token in exchange for the collateral of 800 ERG and 30,000 RSN
  • Wait 30–60 minutes before your Watcher UI shows healthy for your WID Token

Starting Watcher UI After Reboot

Now that your watcher is all setup this is how you start it up again after it gets shut down or after a computer reboot

  • Open the Docker Desktop App
  • Navigate to the “operation” folder
  • Shift+right-click the “watcher” folder
  • Select “Open PowerShell window here”
  • Type the following and press enter
docker compose up -d

--

--