Soroban RPC - on Windows
Tags: soroban, stellar
Published: 2024-02-24 21:58:16

Earlier, I [posted](https://dev.to/row-bear/rpc-for-soroban-mainnet-36eo) 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/grh1cnnoef1rhn3rykum.png)

**3) Search for stellar/soroban-rpc and pull it**
![Search results for stellar/soroban-rpc in Docker Desktop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mox8h8b40mk7i7nf3ne4.png)

**4) Create a stellar-core.toml config file**
I use the example I stored [here](https://gist.githubusercontent.com/Row-Bear/952266e78ab8a5c623786fa4fa5feba2/raw/7d4d798d3b3db36282fee18cfcbb47aa1e3b1a9f/stellar-core.toml) but as Kalepail pointed out during his stream on the Stellar Dev discord, you can use one from the [Quickstart image](https://github.com/stellar/quickstart/blob/master/pubnet/core/etc/stellar-core.cfg).
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"
```
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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2z722dq411qauahl7a93.png)
You can start/stop the container from here, and also see its stats.

During initial sync, it uses ~50% of my CPU ([i5 12450h](https://www.intel.com/content/www/us/en/products/sku/132222/intel-core-i512450h-processor-12m-cache-up-to-4-40-ghz/specifications.html)) 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m1tciq6unqzxdxhko51v.png)

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

As always, join the [Stellar Dev](https://discord.gg/stellardev) discord to discuss the technical stuff, and the [Stellar Global](https://discord.gg/stellar-global-761985725453303838) discord for everything Stellar.

Happy coding!