Introduction Link to heading
Briar Mailbox offers a solution for Briar users to improve their reachability and reduce battery consumption. This guide will walk you through the steps to install and set up Briar Mailbox on your server.
Note: Always refer to briarproject.org for the most up-to-date and detailed information.
Prerequisites Link to heading
- A server running GNU/Linux (either x86_64 or ARM64 architecture).
- Basic command-line knowledge.
Install Link to heading
-
Install dependencies:
sudo apt update sudo apt install git default-jdk
-
Clone the Briar Mailbox repository:
git clone https://code.briarproject.org/briar/briar-mailbox.git cd briar-mailbox
-
Prepare the
/opt
directory: Create a directory for Briar Mailbox:sudo mkdir -p /opt/briar-mailbox
-
Compile the Briar Mailbox and move the JAR to
/opt
directory:For x86_64 GNU/Linux server:
./gradlew x86LinuxJar sudo mv mailbox-cli/build/libs/mailbox-cli-linux-x86_64.jar /opt/briar-mailbox/briar-mailbox.jar
For ARM64 server:
./gradlew aarch64LinuxJar sudo mv mailbox-cli/build/libs/mailbox-cli-linux-aarch64.jar /opt/briar-mailbox/briar-mailbox.jar
-
Set up a systemd service:
sudo nano /etc/systemd/system/briar-mailbox.service
Add the following content:
[Unit] Description=Briar Mailbox Service After=network.target [Service] User=YOUR_USERNAME WorkingDirectory=/opt/briar-mailbox ExecStart=/usr/bin/java -jar /opt/briar-mailbox/briar-mailbox.jar Restart=always [Install] WantedBy=multi-user.target
Replace
YOUR_USERNAME
with your actual Linux username. -
Start and enable the service:
sudo systemctl start briar-mailbox sudo systemctl enable briar-mailbox
-
Check the connection information: View the logs to find the QR code or URL to connect to the mailbox:
sudo journalctl -u briar-mailbox -f
-
Connect to Briar Mailbox: Use the Briar app to connect to your server’s Briar Mailbox via Tor.
Update Link to heading
To update Briar Mailbox to the latest version, follow these steps:
-
Navigate to the Briar Mailbox directory:
cd path/to/briar-mailbox
Replace
path/to/briar-mailbox
with the directory where you cloned the Briar Mailbox repository. -
Pull the latest version:
git pull
-
Recompile the Briar Mailbox:
For x86_64 GNU/Linux server:
./gradlew x86LinuxJar sudo mv mailbox-cli/build/libs/mailbox-cli-linux-x86_64.jar /opt/briar-mailbox/briar-mailbox.jar
For ARM64 server:
./gradlew aarch64LinuxJar sudo mv mailbox-cli/build/libs/mailbox-cli-linux-aarch64.jar /opt/briar-mailbox/briar-mailbox.jar
-
Restart the service:
sudo systemctl restart briar-mailbox
-
Verification: Ensure the service is running without any issues:
sudo systemctl status briar-mailbox
You should see the service in an “active (running)” state.
Uninstall Link to heading
If for any reason you wish to uninstall or remove Briar Mailbox from your server, follow the steps below:
-
Stop and disable the service:
sudo systemctl stop briar-mailbox sudo systemctl disable briar-mailbox
-
Remove the systemd service file:
sudo rm /etc/systemd/system/briar-mailbox.service
-
Delete the application files:
sudo rm -r /opt/briar-mailbox
Resources Link to heading
For more in-depth details and resources related to Briar Mailbox, you can refer to the following links:
- Source Code: https://code.briarproject.org/briar/briar-mailbox/-/tree/main
- API Documentation: https://code.briarproject.org/briar/briar-mailbox/-/blob/main/API.md
- Mailbox Architecture: https://code.briarproject.org/briar/briar/-/wikis/Mailbox-Architecture
- Official Website: https://briarproject.org/