Welcome to Zorya.Theta.Privacy

Setting Up the Tor Package Repository on Debian-Based Systems

Setting Up the Tor Package Repository on Debian-Based Systems

Enabling the Tor package repository on Debian and Debian-based distributions, such as Ubuntu, can help ensure you receive the latest updates directly from the Tor project. Follow the steps below to set up and install the Tor package securely on your system.

Important: The # symbol denotes commands that should be run as the root user or with sudo privileges.


Step 1: Verify Your CPU Architecture

To ensure compatibility, confirm your CPU architecture supports the Tor package binaries. The repository offers binaries for amd64, arm64, and i386. Run the following command to check your system’s architecture:

# dpkg --print-architecture

Expected outputs should be either amd64, arm64, or i386. Note that 32-bit ARM (armhf) is not yet supported directly by the Tor project repository, so users with that architecture should install Tor from Debian’s repositories or build it from source.


Step 2: Install apt-transport-https

To securely access Tor’s repository over HTTPS, install apt-transport-https, which is required for secure connections:

# apt install apt-transport-https

Step 3: Configure the Tor Package Repository

  1. Create a New Source List File: Open or create /etc/apt/sources.list.d/tor.list and add the following repository entries:

    deb     [signed-by=/usr/share/keyrings/deb.torproject.org-keyring.gpg] https://deb.torproject.org/torproject.org <DISTRIBUTION> main
    deb-src [signed-by=/usr/share/keyrings/deb.torproject.org-keyring.gpg] https://deb.torproject.org/torproject.org <DISTRIBUTION> main
    

    Replace <DISTRIBUTION> with your OS codename. You can find it by running:

    # lsb_release -c
    

    or:

    # cat /etc/debian_version
    
  2. Optional: Add Experimental or Nightly Builds

    For those who want experimental or nightly builds, add the lines below to the same file:

    Experimental:

    deb     [signed-by=/usr/share/keyrings/deb.torproject.org-keyring.gpg] https://deb.torproject.org/torproject.org tor-experimental-<DISTRIBUTION> main
    deb-src [signed-by=/usr/share/keyrings/deb.torproject.org-keyring.gpg] https://deb.torproject.org/torproject.org tor-experimental-<DISTRIBUTION> main
    

    Nightly Builds:

    deb     [signed-by=/usr/share/keyrings/deb.torproject.org-keyring.gpg] https://deb.torproject.org/torproject.org tor-nightly-main-<DISTRIBUTION> main
    deb-src [signed-by=/usr/share/keyrings/deb.torproject.org-keyring.gpg] https://deb.torproject.org/torproject.org tor-nightly-main-<DISTRIBUTION> main
    

Step 4: Add the GPG Key for Tor Packages

+++ title = “How To Begin Looking At Web Design” menu = “Blog” date = “2024-10-30” +++

Installing a Tor Relay

To ensure package integrity, download and add the GPG key used to sign Tor packages:

# wget -qO- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --dearmor | tee /usr/share/keyrings/deb.torproject.org-keyring.gpg >/dev/null

Step 5: Update Package List and Install Tor

Now that the repository is set up, update your package list and install Tor along with the Tor Debian keyring package:

# apt update
# apt install tor deb.torproject.org-keyring

Troubleshooting Common Issues

Warning: You may encounter an error message when updating if the repository doesn’t support your architecture:

Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://deb.torproject.org/torproject.org focal InRelease' doesn't support architecture 'i386'

To fix this, ensure that you’re using the correct architecture and repository settings.


By following these steps, you’ll be set up to receive secure, up-to-date Tor packages directly from the Tor project on your Debian-based system. This setup ensures you’re always using the latest secure version of Tor for your privacy needs.

Setting Up a Tor Relay on Debian-Based Systems

Setting up a Tor relay enhances online privacy and helps support the Tor network. Follow this guide to create a Tor relay on a Debian-based system. This tutorial includes setting up automatic system updates for security, installing Tor, configuring the relay, and monitoring traffic.


Part 1: Setting Up Unattended Upgrades

Enabling unattended upgrades will keep your system updated with minimal effort, ensuring you receive critical security patches automatically.

Step 1: Update Repositories and Install unattended-upgrades

First, update your repositories and install the required packages:

apt update
apt-get install unattended-upgrades apt-listchanges

Step 2: Configure Unattended Upgrades

Open the configuration file to customize the upgrade settings:

nano /etc/apt/apt.conf.d/50unattended-upgrades

Remove This Remove any unnecessary configuration, then add the following settings:

Unattended-Upgrade::Allowed-Origins {
    "${distro_id}:${distro_codename}-security";
    "TorProject:${distro_codename}";
};
Unattended-Upgrade::Package-Blacklist {
};
Unattended-Upgrade::Automatic-Reboot "true";

This configuration ensures that security updates and Tor packages are automatically upgraded.

Step 3: Test Unattended Upgrades

Run a test to confirm the settings are working:

unattended-upgrade --debug

Part 2: Installing Tor

Installing Tor requires adding the official Tor repositories and GPG keys.

Step 1: Add Official Tor Repositories

Install the HTTPS transport package for secure access to the repository:

apt install apt-transport-https

Check your Debian version:

cat /etc/debian_version

Create a new source file for Tor:

nano /etc/apt/sources.list.d/tor.list

Add the following lines to the file, replacing {yourdistro} with your Debian version:

deb [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] https://deb.torproject.org/torproject.org {yourdistro} main
deb-src [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] https://deb.torproject.org/torproject.org {yourdistro} main

Step 2: Add the GPG Key

To authenticate Tor packages, add the Tor project’s GPG key:

wget -qO- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --dearmor | sudo tee /usr/share/keyrings/tor-archive-keyring.gpg >/dev/null

Step 3: Install Tor

Update your package list and install Tor:

apt update
apt install tor deb.torproject.org-keyring

Part 3: Configuring Tor

With Tor installed, configure it to function as a relay.

Step 1: Open the Tor Configuration File

Edit the Tor configuration file:

nano /etc/tor/torrc

Step 2: Add the Relay Configuration

Add the following configuration to the file:

## BASE CONFIG
Nickname YourRelayNickname
ContactInfo your@e-mail
ORPort 443
ExitRelay 0
SocksPort 0

## BANDWIDTH
# Sets a monthly bandwidth limit (up/down) of 800GB, starting on the 1st at midnight.
AccountingMax 800 GB
AccountingStart month 1 0:00

## MONITORING
ControlPort 9051
CookieAuthentication 1

Replace YourRelayNickname and your@e-mail with your chosen relay name and email address.

Step 3: Enable and Restart Tor

To apply the changes, enable Tor at startup and restart the service:

systemctl enable tor
systemctl restart tor

Part 4: Monitoring Tor with Nyx

Nyx is a command-line monitoring tool for Tor relays that provides real-time statistics.

Step 1: Install Nyx

Install Nyx with:

apt install nyx

Step 2: Run Nyx

Launch Nyx to start monitoring your Tor relay:

nyx

Setting up a Tor relay on a Debian-based system is a great way to contribute to internet privacy. With unattended upgrades configured, your system will remain secure with minimal maintenance. Additionally, Nyx provides essential insights into relay performance, helping you monitor and maintain your relay efficiently.


V e r i f 🐐 🐐 🐐 🐐 🐐 🐐 🐐 y S A I I C S M S e d m n o e a y t d p s n t i s o t f n t V C U 🐐 🐐 🐐 🐐 T 🐐 🐐 🐐 r 🐐 a 🐐 🐐 i 🐐 🐐 🐐 U 🐐 🐐 t 🐐 🐐 🐐 🐐 e e o p o t l g p e m r n U I C T r I C A C l U I u O A E I R n R M E C i f U p n o e n h d G o p n r p d n M n u a e o n h R f i n d s n s R s e d P m T d s e e d a o s n n g n s e e y r a a C t C f A t C e t C c C R G m o a C t C n C D b C n t C C c u i u c q m t t o a o i d o p a o k o T e a r t o a o T o R e l o i a o N o e l t r k u C t e m l m g d C m o l m m o p K n e m l m o C m e f e m t l m y m a o e i P r e m l m u : o m s l m D m r l e d m l m r o m l i m o l m x m T r r f r U o n R a a r n a i a e a a y : P a a n a a n & a r a a i l A o e o d e n U n e A f n t P n b n R c a n T n R f n y e n i N n f n p y L d r m a t e p d n d l i d o r d i d e e c d o d e i d R d n y d o d s o e e r d o : a : A l g : r e : a : p k : r : l g : C N e : g x : r : C g q T n c p s t u o u i r n o ` a a u o i s h s u o t h r U i ` t ` t w r ` e e ` ` s { g ` a ` y r ` n c t ` w ` M ` e a r s i i p t a e a o e a u s q a V c y e a n a a n f k a s i a o n c f t t v g o p n p - d t n u p e a i o s p d p t a i n r y t p n y k o e U e i r r t d t U i a i t r t n u t t i n g a t s h t i x r p c l a i e - p O o t s s r K o o u m t t ` R B d t e d e u d g g r n t i i i ` d u e i n r e T e N i o e E a a u g e s p e r i e t n e / i p y n / a , o m y n r l r n t r e s d U t a g n e s n t e s d r s F e t r c x s i a r d e e s a p d i d s t c t t a i t i t i C t t n y o w s t g i e n e a / c r t n a l c o S l a g r i i a e r n s s d l d / o e g l e n n e l P s d P s r ` a s - l e a } ` l t t r e l e t e e d t i a u b p ` o a v n r h r s e a n n p a i t t r c i a n f i u a s l d g p a / w o / t c b y o A o p v l ` r t n s i r t I e l x r v d p a / R a - _ o t o n e ` m a i o i u e e d t v u h d r f a i c r l n t b e r e r e r o t n l a t a a c a r c D b c , o c a l e b t o n s e e . ` r e b l d l t a t - s i s b t O i y e e p d p o . i o R & w l ( n t O e o n l a r P & i i a d / p b r ` i n p o t t m e a t u t s r r s h y d d p i g - t v o t y 6 - t o ` h . e j , s N 4 u . n t d r e t y , p c s t / s c A e x g o p t i t c m a r n s o o . c c r a f ` r n o o t m d . . r u l 6 e d l n g n 4 s / i a - t r , 5 s m k i e a 0 t e e n s o p u ` y g t r t n r M a - a i a r i l t n x t 3 i t g , 8 s e ` t 6 t n e o ) c d t r h e c ` a d . n - g u e p s g ` r a d e s `