Skip to content
This repository was archived by the owner on Dec 10, 2022. It is now read-only.

Commit f8f5c70

Browse files
authored
Merge pull request #62 from tox-rs/readme
Add info about docker
2 parents 8c4b933 + 9cbb2c0 commit f8f5c70

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,37 @@ curl 'https://nodes.tox.chat/json' -s | jq -r '.nodes[] | .public_key + " " + .i
153153
while read pk addr; do echo " - pk: $pk"; echo " addr: $addr"; done
154154
```
155155

156+
## Using docker
157+
158+
There is a docker image of tox-node with exposed 443/tcp 3389/tcp 33445/tcp 33445/udp ports. You can run tox-node using docker like this:
159+
160+
```sh
161+
TOX_SECRET_KEY=<secret key> docker run -e TOX_SECRET_KEY toxrust/tox-node <ARGS>
162+
```
163+
164+
or
165+
166+
```sh
167+
docker run --mount type=bind,source=<path/to/config.yml>,target=<path/to/target/config.yml> \
168+
--mount type=bind,source=<path/to/keys>,target=/var/lib/tox-node/keys toxrust/tox-node config <path/to/config.yml>
169+
```
170+
171+
Example commands:
172+
173+
```sh
174+
TOX_SECRET_KEY="4a2d4098e9d6ae6addb8035085cf1467fd7611edd2e22df2f1b60a71763b4ce4" \
175+
docker run -e TOX_SECRET_KEY toxrust/tox-node \
176+
--bootstrap-node 1D5A5F2F5D6233058BF0259B09622FB40B482E4FA0931EB8FD3AB8E7BF7DAF6F 198.98.51.198:33445 \
177+
--udp-address '0.0.0.0:33445' --tcp-address '0.0.0.0:33445' \
178+
--motd "{{start_date}} {{uptime}} Tcp: incoming {{tcp_packets_in}}, outgoing {{tcp_packets_out}}, Udp: incoming {{udp_packets_in}}, outgoing {{udp_packets_out}}"
179+
```
180+
181+
or
182+
183+
```sh
184+
docker run --mount type=bind,source=$PWD/dpkg/config.yml,target=/config.yml \
185+
--mount type=bind,source=$PWD/keys,target=/var/lib/tox-node/keys toxrust/tox-node config /config.yml
186+
```
156187
[libsodium]: https://github.com/jedisct1/libsodium
157188
[Rust]: https://www.rust-lang.org
158189
[cargo-deb]: https://crates.io/crates/cargo-deb

0 commit comments

Comments
 (0)