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

Commit 31f31eb

Browse files
committed
docs(readme): move info about docker to the top
1 parent d6ae05b commit 31f31eb

File tree

1 file changed

+34
-31
lines changed

1 file changed

+34
-31
lines changed

README.md

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,39 @@ RUST_LOG=tox=trace cargo run --release
2828

2929
Also it's possible to use syslog via `--log-type` parameter.
3030

31+
### Running tox-node in docker
32+
33+
There is a [docker repository] of tox-node with exposed 443/tcp 3389/tcp 33445/tcp 33445/udp ports.
34+
You can run tox-node using docker like this:
35+
36+
```sh
37+
TOX_SECRET_KEY=<secret key> docker run -e TOX_SECRET_KEY toxrust/tox-node <ARGS>
38+
```
39+
40+
or
41+
42+
```sh
43+
docker run --mount type=bind,source=<path/to/config.yml>,target=<path/to/target/config.yml> \
44+
--mount type=bind,source=<path/to/keys>,target=/var/lib/tox-node/keys toxrust/tox-node config <path/to/config.yml>
45+
```
46+
47+
Example commands:
48+
49+
```sh
50+
TOX_SECRET_KEY="4a2d4098e9d6ae6addb8035085cf1467fd7611edd2e22df2f1b60a71763b4ce4" \
51+
docker run -e TOX_SECRET_KEY toxrust/tox-node \
52+
--bootstrap-node 1D5A5F2F5D6233058BF0259B09622FB40B482E4FA0931EB8FD3AB8E7BF7DAF6F 198.98.51.198:33445 \
53+
--udp-address '0.0.0.0:33445' --tcp-address '0.0.0.0:33445' \
54+
--motd "{{start_date}} {{uptime}} Tcp: incoming {{tcp_packets_in}}, outgoing {{tcp_packets_out}}, Udp: incoming {{udp_packets_in}}, outgoing {{udp_packets_out}}"
55+
```
56+
57+
or
58+
59+
```sh
60+
docker run --mount type=bind,source=$PWD/dpkg/config.yml,target=/config.yml \
61+
--mount type=bind,source=$PWD/keys,target=/var/lib/tox-node/keys toxrust/tox-node config /config.yml
62+
```
63+
3164
### Running tox-node on NixOS
3265

3366
If you are using NixOS (unstable channel), you can install and run tox-node by adding `services.tox-node.enable = true;` to your `configuration.nix`.
@@ -158,40 +191,10 @@ curl 'https://nodes.tox.chat/json' -s | jq -r '.nodes[] | .public_key + " " + .i
158191
while read pk addr; do echo " - pk: $pk"; echo " addr: $addr"; done
159192
```
160193

161-
## Using docker
162-
163-
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:
164-
165-
```sh
166-
TOX_SECRET_KEY=<secret key> docker run -e TOX_SECRET_KEY toxrust/tox-node <ARGS>
167-
```
168-
169-
or
170-
171-
```sh
172-
docker run --mount type=bind,source=<path/to/config.yml>,target=<path/to/target/config.yml> \
173-
--mount type=bind,source=<path/to/keys>,target=/var/lib/tox-node/keys toxrust/tox-node config <path/to/config.yml>
174-
```
175-
176-
Example commands:
177-
178-
```sh
179-
TOX_SECRET_KEY="4a2d4098e9d6ae6addb8035085cf1467fd7611edd2e22df2f1b60a71763b4ce4" \
180-
docker run -e TOX_SECRET_KEY toxrust/tox-node \
181-
--bootstrap-node 1D5A5F2F5D6233058BF0259B09622FB40B482E4FA0931EB8FD3AB8E7BF7DAF6F 198.98.51.198:33445 \
182-
--udp-address '0.0.0.0:33445' --tcp-address '0.0.0.0:33445' \
183-
--motd "{{start_date}} {{uptime}} Tcp: incoming {{tcp_packets_in}}, outgoing {{tcp_packets_out}}, Udp: incoming {{udp_packets_in}}, outgoing {{udp_packets_out}}"
184-
```
185-
186-
or
187-
188-
```sh
189-
docker run --mount type=bind,source=$PWD/dpkg/config.yml,target=/config.yml \
190-
--mount type=bind,source=$PWD/keys,target=/var/lib/tox-node/keys toxrust/tox-node config /config.yml
191-
```
192194
[libsodium]: https://github.com/jedisct1/libsodium
193195
[Rust]: https://www.rust-lang.org
194196
[cargo-deb]: https://crates.io/crates/cargo-deb
195197
[tox-node-rs]: https://aur.archlinux.org/packages/tox-node-rs
196198
[tox-node-rs-git]: https://aur.archlinux.org/packages/tox-node-rs-git
197199
[ArchWiki]: https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages
200+
[docker repository]: https://hub.docker.com/r/toxrust/tox-node

0 commit comments

Comments
 (0)