mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/opsec-blogposts.git
synced 2025-07-01 22:16:41 +00:00
update simplexalerts tutorial
This commit is contained in:
parent
c8aebd0c4a
commit
d22e8f7bec
1 changed files with 7 additions and 21 deletions
|
@ -229,7 +229,7 @@ The release page can be accessed through your web browser or you can download th
|
|||
Run your client in server mode:
|
||||
|
||||
|
||||
[user@devnode:~]$ simplex-chat -d clientDB -p 1337 -x
|
||||
[user@devnode:~]$ simplex-chat -d chatDB
|
||||
No user profiles found, it will be created now.
|
||||
Please choose your display name.
|
||||
It will be sent to your contacts when you connect.
|
||||
|
@ -242,7 +242,8 @@ This command will:
|
|||
- create two databases that your client uses for reconnecting to groups and interacting with the simpleX Network
|
||||
- make sure that simplex routes all traffic through Tor (thanks to the -x argument)
|
||||
- set this client display name (what you will see in your groups when receiving alerts)
|
||||
- open a websocket port that the alerter will use on 127.0.0.1:1337
|
||||
|
||||
Once you are done, you can Ctrl-c as the DB will be used by the alerter container.
|
||||
|
||||
|
||||
|
||||
|
@ -367,7 +368,7 @@ so it looks like this:
|
|||
|
||||
Run the container
|
||||
|
||||
sudo docker run -v $(pwd):/config --network="host" --rm simplex-alerter -c /config/config.yml -e 127.0.0.1:1337
|
||||
sudo docker run -v $(pwd):/config -v $(pwd):/alerterconfig -v $(pwd):/simplex --rm -p 127.0.0.1:7897:7897 simplex-alerter -c /alerterconfig/config.yml
|
||||
|
||||
It will connect to the simplex-chat client we started earlier. You can check the metrics to make sure it's running by checking the metrics page
|
||||
|
||||
|
@ -501,20 +502,6 @@ And here's the alert:
|
|||
|
||||
To turn the simplex-chat and the alerter into systemd services, you only need to create two files:
|
||||
|
||||
## /etc/systemd/system/simplex-chat.service
|
||||
```sh
|
||||
sudo vim /etc/systemd/system/simplex-chat.service
|
||||
sudo cat /etc/systemd/system/simplex-chat.service
|
||||
```
|
||||
|
||||
[Unit]
|
||||
Requires=tor.service
|
||||
|
||||
[Service]
|
||||
ExecStart=simplex-chat -d /etc/alerter_clientDB -p 1337 -x
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
## /etc/systemd/system/alerter.service
|
||||
|
||||
```sh
|
||||
|
@ -522,19 +509,18 @@ sudo vim /etc/systemd/system/alerter.service
|
|||
sudo cat /etc/systemd/system/alerter.service
|
||||
|
||||
[Unit]
|
||||
Requires=simplex-chat.service
|
||||
|
||||
[Service]
|
||||
ExecStart=docker run --rm simplex-alerter -c /etc/alerter-config.yaml -e 127.0.0.1:1337
|
||||
ExecStart=docker run --rm simplex-alerter -v /my/alerter/folder:/simplex -v /my/alerter/folder:/alerterconfig -p 127.0.0.1:7897:7897 -c /alerterconfig/config.yaml
|
||||
|
||||
[Install]
|
||||
WantedBy=simplex-chat.service
|
||||
WantedBy=multi-user.service
|
||||
```
|
||||
|
||||
## Enable the services
|
||||
Now enable the service:
|
||||
```sh
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now simplex-chat.service
|
||||
sudo systemctl enable --now alerter.service
|
||||
```
|
||||
# Conclusion
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue