Difference between revisions of "Running Bisq on Tails"
m (→Configure: fix error) |
(uploaded changes by HeadsAndTails from bisq.community) |
||
Line 5: | Line 5: | ||
== Preparations == | == Preparations == | ||
− | * Configure | + | * Configure an [https://tails.boum.org/doc/first_steps/welcome_screen/administration_password/ administration password] |
− | * Configure | + | * Configure [https://tails.boum.org/doc/first_steps/persistence/index.en.html persistence] |
− | |||
− | {{Admonition_Warn|Tails does not persist data by default | + | {{Admonition_Warn|Tails does not persist user data by default. Even with persistence enabled, '''all data in Bisq's default [[data directory]] will be erased as soon as you reboot'''. This means you will lose your Bisq keys, wallet data, and everything else. |
− | + | To avoid data loss, make sure that persistence is enabled, and that Bisq user data is stored in a persistent directory before shutting down Tails.}} | |
− | == | + | == Download == |
After restarting Tails, go to https://github.com/bisq-network/bisq/releases using your Tor Browser and download the <code>Bisq-64bit-[version].deb</code> and <code>.asc</code> files. | After restarting Tails, go to https://github.com/bisq-network/bisq/releases using your Tor Browser and download the <code>Bisq-64bit-[version].deb</code> and <code>.asc</code> files. | ||
Line 23: | Line 22: | ||
* <code>wget <nowiki>https://bisq.network/pubkey/[keyid].asc</nowiki></code> should result in a file <code>[keyid].asc</code> in your working directory. See "Verification" section of [https://github.com/bisq-network/bisq/releases/latest release notes] for the exact key ID you should use (it's <code>29CDFD3B</code> as of this writing) to verify your download. | * <code>wget <nowiki>https://bisq.network/pubkey/[keyid].asc</nowiki></code> should result in a file <code>[keyid].asc</code> in your working directory. See "Verification" section of [https://github.com/bisq-network/bisq/releases/latest release notes] for the exact key ID you should use (it's <code>29CDFD3B</code> as of this writing) to verify your download. | ||
* Import the key to gpg by <code>gpg --import [keyid].asc</code> | * Import the key to gpg by <code>gpg --import [keyid].asc</code> | ||
− | * Check the signature with <code>gpg --digest-algo SHA256 --verify [yourbinaryhere]{.asc*,}</code> which should give you something like this | + | * Check the signature with <code>gpg --digest-algo SHA256 --verify [yourbinaryhere]{.asc*,}</code> which should give you something like this: |
<pre> | <pre> | ||
[snip] | [snip] | ||
Line 30: | Line 29: | ||
</pre> | </pre> | ||
− | + | == Install == | |
Do a simple <code>sudo dpkg -i [yourbinaryhere]</code>. | Do a simple <code>sudo dpkg -i [yourbinaryhere]</code>. | ||
− | == Configure == | + | === Configure === |
* Make authcookie readable: | * Make authcookie readable: | ||
− | < | + | <code>sudo chmod o+r /var/run/tor/control.authcookie</code> |
* Configure <code>onion-grater</code>. | * Configure <code>onion-grater</code>. | ||
Line 99: | Line 98: | ||
</pre> | </pre> | ||
− | Then restart the <code>onion-grater</code> service with <code>systemctl restart onion-grater.service</code>. | + | Then restart the <code>onion-grater</code> service with <code>sudo systemctl restart onion-grater.service</code>. |
* In <code>/usr/share/applications/Bisq.desktop</code>, replace: | * In <code>/usr/share/applications/Bisq.desktop</code>, replace: | ||
− | < | + | <code>Exec=/opt/bisq/bin/Bisq</code> |
with: | with: | ||
− | < | + | <code>Exec=/opt/bisq/bin/Bisq --torControlPort 9051 --torControlCookieFile=/var/run/tor/control.authcookie --torControlUseSafeCookieAuth</code> |
+ | |||
+ | == Persistent Data Directory == | ||
+ | |||
+ | Tails will delete all new files when shutting down, unless they are in a persistent storage location. | ||
+ | |||
+ | First, move the Bisq binary you downloaded to a persistent directory: | ||
+ | |||
+ | <code>mkdir /home/amnesia/Persistent/bisq/ | ||
+ | mv /path/to/[yourbinaryhere] /home/amnesia/Persistent/bisq/</code> | ||
− | + | Then, link Bisq's default [[data directory]] to a persistent data directory: | |
+ | |||
+ | <code>mkdir /home/amnesia/Persistent/bisq/Bisq/ | ||
+ | ln -s /home/amnesia/Persistent/bisq/Bisq /home/amnesia/.local/share/Bisq</code> | ||
− | + | === Existing user === | |
− | + | To import user data from another Bisq installation or backup, copy it to the persistent data directory: | |
− | < | + | <code>cp -r /[yourdirectoryhere]/Bisq/* /home/amnesia/Persistent/bisq/Bisq/</code> |
− | / | ||
− | </ | ||
− | + | N.B. In this example, the correct path to your <code>btc_mainnet</code> directory should be: | |
− | + | <code>/home/amnesia/Persistent/bisq/Bisq/btc_mainnet</code> | |
− | + | == Run Bisq == | |
− | + | Click <code>Applications</code> > <code>Internet</code> > <code>Bisq</code>. | |
− | + | Or via terminal: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | <code>/opt/bisq/bin/Bisq --torControlPort 9051 --torControlCookieFile=/var/run/tor/control.authcookie --torControlUseSafeCookieAuth</code> | |
− | |||
− | <code> | ||
− | |||
== Installation Script == | == Installation Script == | ||
− | Because Tails doesn't persist the Bisq | + | Because Tails doesn't persist the Bisq installation [https://bisq.wiki/Running_Bisq_on_Tails#Install_Bisq] or configuration [https://bisq.wiki/Running_Bisq_on_Tails#Configure], they must be repeated after every restart. To make life easier, you can automate this in a bash script. Make sure the script is saved somewhere in the Tails persistent directory. |
* Create script file: | * Create script file: | ||
− | <code>touch ~/Persistent/install-bisq.sh</code> | + | <code>touch ~/Persistent/bisq/install-bisq.sh</code> |
* Make script executable: | * Make script executable: | ||
− | <code>chmod +x ~/Persistent/install-bisq.sh</code> | + | <code>chmod +x ~/Persistent/bisq/install-bisq.sh</code> |
* Edit and save file: | * Edit and save file: | ||
<pre> | <pre> | ||
#!/bin/bash | #!/bin/bash | ||
− | dpkg -i [yourbinaryhere] | + | dpkg -i /home/amnesia/Persistent/bisq/[yourbinaryhere] |
echo "Change access rights of /var/run/tor/control.authcookie ..." | echo "Change access rights of /var/run/tor/control.authcookie ..." | ||
chmod o+r /var/run/tor/control.authcookie | chmod o+r /var/run/tor/control.authcookie | ||
Line 215: | Line 210: | ||
suppress: true" > /etc/onion-grater.d/bisq.yml | suppress: true" > /etc/onion-grater.d/bisq.yml | ||
echo "Restart onion-grater service ..." | echo "Restart onion-grater service ..." | ||
− | + | systemctl restart onion-grater.service | |
echo "Edit Bisq executable file ..." | echo "Edit Bisq executable file ..." | ||
sed -i 's+Exec=/opt/bisq/bin/Bisq+Exec=/opt/bisq/bin/Bisq --torControlPort 9051 --torControlCookieFile=/var/run/tor/control.authcookie --torControlUseSafeCookieAuth+' /usr/share/applications/bisq-Bisq.desktop | sed -i 's+Exec=/opt/bisq/bin/Bisq+Exec=/opt/bisq/bin/Bisq --torControlPort 9051 --torControlCookieFile=/var/run/tor/control.authcookie --torControlUseSafeCookieAuth+' /usr/share/applications/bisq-Bisq.desktop | ||
+ | ln -s /home/amnesia/Persistent/bisq/Bisq /home/amnesia/.local/share/Bisq | ||
echo "Bisq installed successfully." | echo "Bisq installed successfully." | ||
</pre> | </pre> | ||
− | Now you | + | Now you can run this script to install and configure Bisq after a Tails restart: |
− | <code>sudo | + | <code>sudo /home/amnesia/Persistent/bisq/install-bisq.sh</code> |
[[Category:Guides]] | [[Category:Guides]] |
Revision as of 17:21, 1 March 2023
To run Bisq on the Tails OS, a few manual steps are required.
Contents
Preparations
- Configure an administration password
- Configure persistence
Tails does not persist user data by default. Even with persistence enabled, all data in Bisq's default data directory will be erased as soon as you reboot. This means you will lose your Bisq keys, wallet data, and everything else.
To avoid data loss, make sure that persistence is enabled, and that Bisq user data is stored in a persistent directory before shutting down Tails. |
Download
After restarting Tails, go to https://github.com/bisq-network/bisq/releases using your Tor Browser and download the Bisq-64bit-[version].deb
and .asc
files.
You may have to use wget
, because curl
may not use Tor and could be blocked from using the internet.
Verify your download
wget https://bisq.network/pubkey/[keyid].asc
should result in a file[keyid].asc
in your working directory. See "Verification" section of release notes for the exact key ID you should use (it's29CDFD3B
as of this writing) to verify your download.- Import the key to gpg by
gpg --import [keyid].asc
- Check the signature with
gpg --digest-algo SHA256 --verify [yourbinaryhere]{.asc*,}
which should give you something like this:
[snip] gpg: Good signature from "Christoph Atteneder... [snip]
Install
Do a simple sudo dpkg -i [yourbinaryhere]
.
Configure
- Make authcookie readable:
sudo chmod o+r /var/run/tor/control.authcookie
- Configure
onion-grater
.
Create a file /etc/onion-grater.d/bisq.yml
with contents:
--- - apparmor-profiles: - '/opt/bisq/bin/Bisq' users: - 'amnesia' commands: AUTHCHALLENGE: - 'SAFECOOKIE .*' SETEVENTS: - 'CIRC WARN ERR' - 'CIRC ORCONN INFO NOTICE WARN ERR HS_DESC HS_DESC_CONTENT' GETINFO: - 'net/listeners/socks' ADD_ONION: - pattern: 'NEW:(\S+) Port=9999,(\S+)' replacement: 'NEW:{} Port=9999,{client-address}:{}' - pattern: '(\S+):(\S+) Port=9999,(\S+)' replacement: '{}:{} Port=9999,{client-address}:{}' DEL_ONION: - '.+' HSFETCH: - '.+' events: CIRC: suppress: true ORCONN: suppress: true INFO: suppress: true NOTICE: suppress: true WARN: suppress: true ERR: suppress: true HS_DESC: response: - pattern: '650 HS_DESC CREATED (\S+) (\S+) (\S+) \S+ (.+)' replacement: '650 HS_DESC CREATED {} {} {} redacted {}' - pattern: '650 HS_DESC UPLOAD (\S+) (\S+) .*' replacement: '650 HS_DESC UPLOAD {} {} redacted redacted' - pattern: '650 HS_DESC UPLOADED (\S+) (\S+) .+' replacement: '650 HS_DESC UPLOADED {} {} redacted' - pattern: '650 HS_DESC REQUESTED (\S+) NO_AUTH' replacement: '650 HS_DESC REQUESTED {} NO_AUTH' - pattern: '650 HS_DESC REQUESTED (\S+) NO_AUTH \S+ \S+' replacement: '650 HS_DESC REQUESTED {} NO_AUTH redacted redacted' - pattern: '650 HS_DESC RECEIVED (\S+) NO_AUTH \S+ \S+' replacement: '650 HS_DESC RECEIVED {} NO_AUTH redacted redacted' - pattern: '.*' replacement: '' HS_DESC_CONTENT: suppress: true
Then restart the onion-grater
service with sudo systemctl restart onion-grater.service
.
- In
/usr/share/applications/Bisq.desktop
, replace:
Exec=/opt/bisq/bin/Bisq
with:
Exec=/opt/bisq/bin/Bisq --torControlPort 9051 --torControlCookieFile=/var/run/tor/control.authcookie --torControlUseSafeCookieAuth
Persistent Data Directory
Tails will delete all new files when shutting down, unless they are in a persistent storage location.
First, move the Bisq binary you downloaded to a persistent directory:
mkdir /home/amnesia/Persistent/bisq/
mv /path/to/[yourbinaryhere] /home/amnesia/Persistent/bisq/
Then, link Bisq's default data directory to a persistent data directory:
mkdir /home/amnesia/Persistent/bisq/Bisq/
ln -s /home/amnesia/Persistent/bisq/Bisq /home/amnesia/.local/share/Bisq
Existing user
To import user data from another Bisq installation or backup, copy it to the persistent data directory:
cp -r /[yourdirectoryhere]/Bisq/* /home/amnesia/Persistent/bisq/Bisq/
N.B. In this example, the correct path to your btc_mainnet
directory should be:
/home/amnesia/Persistent/bisq/Bisq/btc_mainnet
Run Bisq
Click Applications
> Internet
> Bisq
.
Or via terminal:
/opt/bisq/bin/Bisq --torControlPort 9051 --torControlCookieFile=/var/run/tor/control.authcookie --torControlUseSafeCookieAuth
Installation Script
Because Tails doesn't persist the Bisq installation [1] or configuration [2], they must be repeated after every restart. To make life easier, you can automate this in a bash script. Make sure the script is saved somewhere in the Tails persistent directory.
- Create script file:
touch ~/Persistent/bisq/install-bisq.sh
- Make script executable:
chmod +x ~/Persistent/bisq/install-bisq.sh
- Edit and save file:
#!/bin/bash dpkg -i /home/amnesia/Persistent/bisq/[yourbinaryhere] echo "Change access rights of /var/run/tor/control.authcookie ..." chmod o+r /var/run/tor/control.authcookie echo "Create /etc/onion-grater.d/bisq.yml ..." echo "--- - apparmor-profiles: - '/opt/bisq/bin/Bisq' users: - 'amnesia' commands: AUTHCHALLENGE: - 'SAFECOOKIE .*' SETEVENTS: - 'CIRC WARN ERR' - 'CIRC ORCONN INFO NOTICE WARN ERR HS_DESC HS_DESC_CONTENT' GETINFO: - 'net/listeners/socks' ADD_ONION: - pattern: 'NEW:(\S+) Port=9999,(\S+)' replacement: 'NEW:{} Port=9999,{client-address}:{}' - pattern: '(\S+):(\S+) Port=9999,(\S+)' replacement: '{}:{} Port=9999,{client-address}:{}' DEL_ONION: - '.+' HSFETCH: - '.+' events: CIRC: suppress: true ORCONN: suppress: true INFO: suppress: true NOTICE: suppress: true WARN: suppress: true ERR: suppress: true HS_DESC: response: - pattern: '650 HS_DESC CREATED (\S+) (\S+) (\S+) \S+ (.+)' replacement: '650 HS_DESC CREATED {} {} {} redacted {}' - pattern: '650 HS_DESC UPLOAD (\S+) (\S+) .*' replacement: '650 HS_DESC UPLOAD {} {} redacted redacted' - pattern: '650 HS_DESC UPLOADED (\S+) (\S+) .+' replacement: '650 HS_DESC UPLOADED {} {} redacted' - pattern: '650 HS_DESC REQUESTED (\S+) NO_AUTH' replacement: '650 HS_DESC REQUESTED {} NO_AUTH' - pattern: '650 HS_DESC REQUESTED (\S+) NO_AUTH \S+ \S+' replacement: '650 HS_DESC REQUESTED {} NO_AUTH redacted redacted' - pattern: '650 HS_DESC RECEIVED (\S+) NO_AUTH \S+ \S+' replacement: '650 HS_DESC RECEIVED {} NO_AUTH redacted redacted' - pattern: '.*' replacement: '' HS_DESC_CONTENT: suppress: true" > /etc/onion-grater.d/bisq.yml echo "Restart onion-grater service ..." systemctl restart onion-grater.service echo "Edit Bisq executable file ..." sed -i 's+Exec=/opt/bisq/bin/Bisq+Exec=/opt/bisq/bin/Bisq --torControlPort 9051 --torControlCookieFile=/var/run/tor/control.authcookie --torControlUseSafeCookieAuth+' /usr/share/applications/bisq-Bisq.desktop ln -s /home/amnesia/Persistent/bisq/Bisq /home/amnesia/.local/share/Bisq echo "Bisq installed successfully."
Now you can run this script to install and configure Bisq after a Tails restart:
sudo /home/amnesia/Persistent/bisq/install-bisq.sh