mirror of
https://github.com/cryptoadvance/specter-desktop.git
synced 2026-08-13 12:33:29 +02:00
add daemon docs (#621)
This commit is contained in:
parent
382e127a48
commit
458283004d
2 changed files with 62 additions and 9 deletions
16
README.md
16
README.md
|
|
@ -62,6 +62,7 @@ Stepan, Ben, Kim, all the fellow Specter-Builders & Moritz
|
|||
[Donations are welcome](https://btcpay.benkaufman.info/apps/2NBJqJ9GMmy1SPqEtg49bEcKUZqd/pos)
|
||||
|
||||
## How to run
|
||||
|
||||
### Using the Specter Desktop app
|
||||
The easiest way to run Specter Desktop is by installing the Specter Desktop app, which you can find on the [GitHub release page](https://github.com/cryptoadvance/specter-desktop/releases).
|
||||
With this method, all you need to do is just download the right file for your operating system and install it like a normal desktop app.
|
||||
|
|
@ -79,10 +80,6 @@ pip3 install cryptoadvance.specter
|
|||
* Run Specter
|
||||
```sh
|
||||
python3 -m cryptoadvance.specter server
|
||||
# Or as a deamon:
|
||||
python3 -m cryptoadvance.specter server --daemon
|
||||
# Stop the daemon again:
|
||||
python3 -m cryptoadvance.specter server --stop
|
||||
```
|
||||
* Upgrade Specter
|
||||
```sh
|
||||
|
|
@ -91,12 +88,12 @@ pip3 install cryptoadvance.specter --upgrade
|
|||
|
||||
After that, specter will be available at [http://127.0.0.1:25441/](http://127.0.0.1:25441/).
|
||||
|
||||
You can also run it (as a daemon), using tor, provide ssl certificates to run over https. Https is especially important because browsers don't allow the website to access camera without secure connection, and we need camera access to scan QR codes.
|
||||
You can also run it using tor, provide ssl certificates to run over https. Https is especially important because browsers don't allow the website to access camera without secure connection, and we need camera access to scan QR codes.
|
||||
|
||||
An example how to run specter server in the background (`--daemon`) with ssl certificates (`--key`, `--cert`) over tor (make sure to walk through the [tor-document](docs/tor.md) ):
|
||||
An example how to run specter server with ssl certificates (`--key`, `--cert`) over tor (make sure to walk through the [tor-document](docs/tor.md) ):
|
||||
|
||||
```sh
|
||||
python3 -m cryptoadvance.specter server --tor --cert=./cert.pem --key=./key.pem --daemon
|
||||
python3 -m cryptoadvance.specter server --tor --cert=./cert.pem --key=./key.pem
|
||||
```
|
||||
|
||||
### Connect Specter to Bitcoin Core
|
||||
|
|
@ -109,11 +106,12 @@ If you use Specter from a remote machine and want to use it with hardware wallet
|
|||
|
||||
Have a look at [DEVELOPMENT.md](DEVELOPMENT.md) for further information about hacking on specter-desktop.
|
||||
|
||||
## Detailed instructions
|
||||
## Tips and tricks (detailed instructions)
|
||||
|
||||
- Beyond local network - how to forward your node through a cheap VPS: [docs/reverse-proxy.md](docs/reverse-proxy.md)
|
||||
- Setting up Specter over Tor: [docs/tor.md](docs/tor.md)
|
||||
- Using self-signed certificates in local network or Tor: [docs/self-signed-certificates.md](docs/self-signed-certificates.md)
|
||||
- Running Specter as a service on a linux machine: [docs/daemon.md](docs/daemon.md)
|
||||
- Beyond local network - how to forward your node through a cheap VPS: [docs/reverse-proxy.md](docs/reverse-proxy.md)
|
||||
|
||||
## Errors, doubts.. Read our FAQ!
|
||||
|
||||
|
|
|
|||
55
docs/daemon.md
Normal file
55
docs/daemon.md
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
# Running as a daemon
|
||||
|
||||
How to use Specter as a service - launch on boot, start and stop in the background.
|
||||
|
||||
1. Create a file `/lib/systemd/system/specter.service` with the following content (replace `User=myusername` to your username):
|
||||
```
|
||||
[Unit]
|
||||
Description=Specter Desktop Service
|
||||
After=multi-user.target
|
||||
Conflicts=getty@tty1.service
|
||||
|
||||
[Service]
|
||||
User=myusername
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/python3 -m cryptoadvance.specter server
|
||||
StandardInput=tty-force
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
2. Reload systemd with `sudo systemctl daemon-reload`
|
||||
3. Enable service to run on boot with `sudo systemctl enable specter.service` (optional)
|
||||
4. Start service with `sudo systemctl start specter.service`
|
||||
|
||||
To stop run `sudo systemctl stop specter.service`, to restart `sudo systemctl restart specter.service`
|
||||
|
||||
## bitcoind as a service
|
||||
|
||||
You can do the same for `bitcoind` if you want to, then both Specter and bitcoind will start on system boot.
|
||||
To make bitcoind service follow the same steps, just name the service `bitcoind.service` and set `ExecStart=bitcoind` there.
|
||||
|
||||
## Specter with virtual environment
|
||||
|
||||
Let's say you don't want to have Specter in you global python modules, but use a virtual environment instead.
|
||||
|
||||
First create the virtual environment and install Specter there, let's say the path is `/home/myusername/.venv_specter`.
|
||||
|
||||
Then you need to change the `specter.service` to the following:
|
||||
|
||||
```
|
||||
[Unit]
|
||||
Description=Specter Desktop Service
|
||||
After=multi-user.target
|
||||
Conflicts=getty@tty1.service
|
||||
|
||||
[Service]
|
||||
User=myusername
|
||||
Type=simple
|
||||
ExecStart=/home/myusername/.venv_specter/bin/python -m cryptoadvance.specter server
|
||||
Environment="PATH=/home/myusername/.venv_specter/bin"
|
||||
StandardInput=tty-force
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue