<p>As I understood on the Umbrel forum, Umbrel does not support local LAN connection to RPC port 8332 for security reasons.
did you manage to solve it somehow?</p>

CC BY-SA 4.0
2024-09-15T20:38:26.907Z
2024-09-15T20:38:26.907Z
Radomil Zumtrle Kupan
<p>It seems like you have some special character in either <code>rpc_user</code> or <code>rpc_pass</code> that makes the parser think that the host appears much earlier than it actually does. It's probably one of <code>:</code>, <code>@</code>, <code>;</code>, <code>?</code>, <code>#</code>, or <code>/</code>.</p>

CC BY-SA 4.0
2024-01-28T08:35:53.763Z
my password has such a chrachater in it, but how can i change the password?
donbolli
CC BY-SA 4.0
2024-01-28T09:56:17.377Z
I would try [URL encoding](https://en.wikipedia.org/wiki/Percent-encoding) the value of `rpc_pass` when constructing the  `rpc_connection` URL. In other words change ":" to "%3A" and "@" to "%40" in the `rpc_pass` value.
RedGrittyBrick
CC BY-SA 4.0
2024-01-28T17:31:17.073Z
I'm not familiar with Umbrel, so I cannot give instructions. But in general, you'll need to find the bitcoin.conf file that Umbrel's bitcoind is using and modify the password set in there, then restart bitcoind.
Ava Chow
CC BY-SA 4.0
2024-01-28T03:40:56.747Z
2024-01-28T03:40:56.747Z
Ava Chow
<p>I have an Umbrel Node on my RaspberryPi4. It is connected to the same router as my Computer, but somehow I can't connect to it using python (bitcoinrpc).</p>
<p>My Code</p>
<pre><code>rpc_user = &quot;umbrel&quot;
rpc_pass = &quot;password&quot;
rpc_host = &quot;192.168.1.122&quot;
rpc_port = &quot;8332&quot;
rpc_connection = f&quot;http://{rpc_user}:{rpc_pass}@{rpc_host}:{rpc_port}&quot;
print(rpc_connection)
rpc_client = AuthServiceProxy(rpc_connection, timeout=240)
</code></pre>
<p>This always results in the same error</p>
<pre><code>Traceback (most recent call last):
  File &quot;/media/donbolli/code/python/bitcoin/crawler/test.py&quot;, line 10, in &lt;module&gt;
    rpc_client = AuthServiceProxy(rpc_connection, timeout=240)
  File &quot;/media/donbolli/code/python/bitcoin/venv/lib/python3.10/site-packages/bitcoinrpc/authproxy.py&quot;, line 87, in __init__
    if self.__url.port is None:
  File &quot;/usr/lib/python3.10/urllib/parse.py&quot;, line 185, in port
    raise ValueError(f&quot;Port could not be cast to integer value as {port!r}&quot;)
ValueError: Port could not be cast to integer value as 'password'
</code></pre>
<p>What am I missing? What is done wrong?</p>

CC BY-SA 4.0
2024-01-27T21:45:52.240Z
Could it be a special char in the password is causing this issue, if so, how can I solve it?
donbolli
<python>
RPC connect to Umbrel
donbolli
# RPC connect to Umbrel

(Asked by: username_0 on 2024-01-27)

I have an Umbrel Node on my RaspberryPi4. It is connected to the same router as my Computer, but somehow I can't connect to it using python (bitcoinrpc).

My Code

```
rpc_user = "umbrel"
rpc_pass = "password"
rpc_host = "192.168.1.122"
rpc_port = "8332"
rpc_connection = f"http://{rpc_user}:{rpc_pass}@{rpc_host}:{rpc_port}"
print(rpc_connection)
rpc_client = AuthServiceProxy(rpc_connection, timeout=240)

```

This always results in the same error

```
Traceback (most recent call last):
  File "/media/username_0/code/python/bitcoin/crawler/test.py", line 10, in <module>
    rpc_client = AuthServiceProxy(rpc_connection, timeout=240)
  File "/media/username_0/code/python/bitcoin/venv/lib/python3.10/site-packages/bitcoinrpc/authproxy.py", line 87, in __init__
    if self.__url.port is None:
  File "/usr/lib/python3.10/urllib/parse.py", line 185, in port
    raise ValueError(f"Port could not be cast to integer value as {port!r}")
ValueError: Port could not be cast to integer value as 'password'

```

What am I missing? What is done wrong?

**Tags:** python

> **Comments:**
> **username_0**: Could it be a special char in the password is causing this issue, if so, how can I solve it?  

---

## 2 answers

### Answer by username_1 on 2024-09-15. Score: 0 | Accepted answer

As I understood on the Umbrel forum, Umbrel does not support local LAN connection to RPC port 8332 for security reasons.
did you manage to solve it somehow?


---

### Answer by username_2 on 2024-01-28. Score: 0

It seems like you have some special character in either `rpc_user` or `rpc_pass` that makes the parser think that the host appears much earlier than it actually does. It's probably one of `:`, `@`, `;`, `?`, `#`, or `/`.

> **Comments:**
> **username_0**: my password has such a chrachater in it, but how can i change the password?  
> **username_3**: I would try [URL encoding](https://en.wikipedia.org/wiki/Percent-encoding) the value of `rpc_pass` when constructing the  `rpc_connection` URL. In other words change ":" to "%3A" and "@" to "%40" in the `rpc_pass` value.  
> **username_2**: I'm not familiar with Umbrel, so I cannot give instructions. But in general, you'll need to find the bitcoin.conf file that Umbrel's bitcoind is using and modify the password set in there, then restart bitcoind.  

---

