mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-09-01 17:55:10 +00:00
Update how-to-change-port.md
This commit is contained in:
parent
9bb1595079
commit
f53291c3ba
1 changed files with 7 additions and 26 deletions
|
@ -1,37 +1,18 @@
|
||||||
---
|
---
|
||||||
title: How to change default deamon peer port?
|
title: How to change default daemon peer port?
|
||||||
category: setup
|
category: setup
|
||||||
---
|
---
|
||||||
|
|
||||||
#### Why it occurs?
|
If you see the error message `couldn't bind to port 3333`, it is likely that another process is already bound to that port. You will need to change the port before starting the daemon.
|
||||||
|
|
||||||
It usually occurs when some other service is already using the default TCP port 3333.
|
To change the port once during runtime, set the LBRY_PEER_PORT env variable. Here's one way to do this:
|
||||||
|
|
||||||
|
LBRY_PEER_PORT=3334 ./lbrynet-daemon
|
||||||
|
|
||||||
### How to solve the problem?
|
Once the daemon is running, you can change the port permanently by using the following [api](/api) call
|
||||||
|
|
||||||
|
|
||||||
#### If LBRY is not starting and spews "couldn't bind to port 3333"
|
|
||||||
|
|
||||||
Open the file `lbrynet/conf.py`
|
|
||||||
|
|
||||||
Locate the line:
|
|
||||||
|
|
||||||
```python
|
|
||||||
'peer_port': (int, 3333),
|
|
||||||
```
|
|
||||||
|
|
||||||
And change the value to the desired unused port.
|
|
||||||
|
|
||||||
After that run the command `python setup.py install` from the repo's root directory.
|
|
||||||
|
|
||||||
|
|
||||||
#### If LBRY Daemon is running and you want to change it for the next run
|
|
||||||
|
|
||||||
You can change it via the following [api](/api) call
|
|
||||||
|
|
||||||
curl 'http://localhost:5279/lbryapi' --data '{"method":"settings_set", "params":{"peer_port":<port-num>}}'
|
curl 'http://localhost:5279/lbryapi' --data '{"method":"settings_set", "params":{"peer_port":<port-num>}}'
|
||||||
|
|
||||||
Or via cli command
|
or via cli command
|
||||||
|
|
||||||
lbrynet-cli settings_set --peer_port 3333
|
lbrynet-cli settings_set --peer_port 3333
|
||||||
|
|
Loading…
Add table
Reference in a new issue