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

Commit 4cdb4f1

Browse files
committed
chore(readme): add instructions how to build .deb package
1 parent 7cbc63e commit 4cdb4f1

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
@@ -100,5 +100,36 @@ tox-node --keys-file keys \
100100
--motd "{{start_date}} {{uptime}} Tcp: incoming {{tcp_packets_in}}, outgoing {{tcp_packets_out}}, Udp: incoming {{udp_packets_in}}, outgoing {{udp_packets_out}}"
101101
```
102102
103+
## Build Debian package
104+
105+
Install [cargo-deb] - a Cargo helper command which automatically creates binary Debian packages (.deb) from Cargo projects:
106+
107+
```sh
108+
cargo install cargo-deb
109+
```
110+
111+
And build binary Debian package:
112+
113+
```sh
114+
cargo deb
115+
```
116+
117+
This command will create a Debian package in `target/debian` directory.
118+
The description of the package:
119+
120+
* Binary in `/usr/bin/tox-node`
121+
* Default config in `/etc/tox-node/config.yml`
122+
* Systemd config in `/lib/systemd/system/tox-node.service`
123+
* postinstall creates user `tox-node` and its home in `/var/lib/tox-node/`
124+
* keys will be generated in `/var/lib/tox-node/keys` if missing during service startup
125+
126+
bootstrap-nodes from config.yml can be generated with:
127+
128+
```sh
129+
curl 'https://nodes.tox.chat/json' -s | jq -r '.nodes[] | .public_key + " " + .ipv4 + ":" + (.port | tostring)' | \
130+
while read pk addr; do echo " - pk: $pk"; echo " addr: $addr"; done
131+
```
132+
103133
[libsodium]: https://github.com/jedisct1/libsodium
104134
[Rust]: https://www.rust-lang.org
135+
[cargo-deb]: https://crates.io/crates/cargo-deb

0 commit comments

Comments
 (0)