DEV Community

Cover image for Soroban RPC - on Windows
Row-Bear
Row-Bear

Posted on

Soroban RPC - on Windows

Earlier, I posted how to run the Soroban RPC Docker image locally on Linux.
Today, I'll give you the steps for Windows.

1) Install Docker Desktop
You can just use the installer.
https://docs.docker.com/desktop/install/windows-install/

2) Sign in (or not)
Docker desktop login screen

3) Search for stellar/soroban-rpc and pull it
Search results for stellar/soroban-rpc in Docker Desktop

4) Create a stellar-core.toml config file
I use the example I stored here but as Kalepail pointed out during his stream on the Stellar Dev discord, you can use one from the Quickstart image.
You may need to remove some lines from the header.

I placed it at c:\soroban-rpc

4) Start a terminal (cmd) window and run the container:
I used the following command to start:

docker run -p 8001:8001 -p 8000:8000 ^
-v c:/soroban-rpc:/config stellar/soroban-rpc ^
--captive-core-config-path="/config/stellar-core.toml" ^
--captive-core-storage-path="/var/lib/stellar/captive-core" ^
--stellar-core-binary-path="/usr/bin/stellar-core" ^
--db-path="/var/lib/stellar/soroban-rpc-db.sqlite" ^
--stellar-captive-core-http-port=11626 ^
--network-passphrase="Public Global Stellar Network ; September 2015" ^
--history-archive-urls="https://history.stellar.org/prd/core-live/core_live_001" ^
--admin-endpoint="0.0.0.0:8001" ^
--endpoint="0.0.0.0:8000"
Enter fullscreen mode Exit fullscreen mode

Two things of note:

  • notice how I used the directory of the stellar-core.toml config in the second line.
  • Windows cmd uses ^ for multi-line input. Delightfully, Powershell uses ` (backtick) ¯\_(ツ)_/¯ You can probably do this from the Docker Desktop UI, but I haven't figured out how to easily launch it with all these flags.

5) Go back to Docker Desktop and check the containers tab.

Container overview in Docker Desktop
You can start/stop the container from here, and also see its stats.

During initial sync, it uses ~50% of my CPU (i5 12450h) and about 4-5 GB RAM, but after about 15 minutes that dropped to 15% and 1GB. Docker Desktop itself uses 7GB RAM though, I guess it reserves quite some headroom.
Container resource usage graphs

If you have any practical tips for others, please share them in the comments :-)

As always, join the Stellar Dev discord to discuss the technical stuff, and the Stellar Global discord for everything Stellar.

Happy coding!

Top comments (0)