Debian Repository

Yes, deb.torproject.org is also served via an Onion Service: http://apow7mjfryruh65chtdydfmqfpj5btws7nbocgtaovhvezgccyjazpqd.onion/

To use Apt over Tor, the apt transport needs to be installed:

sudo apt install apt-transport-tor -y

Then you need to add the repository:

For the stable version:

printf "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/tor-project-keyring.gpg] tor+http://apow7mjfryruh65chtdydfmqfpj5btws7nbocgtaovhvezgccyjazpqd.onion/torproject.org $(lsb_release -c) main" | sudo tee -a /etc/apt/sources.list.d/tor-project.list
printf "deb-src [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/tor-project-keyring.gpg] tor+http://apow7mjfryruh65chtdydfmqfpj5btws7nbocgtaovhvezgccyjazpqd.onion/torproject.org $(lsb_release -c) main" | sudo tee -a /etc/apt/sources.list.d/tor-project.list

For the experimental builds: printf "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/tor-project-keyring.gpg] tor+http://apow7mjfryruh65chtdydfmqfpj5btws7nbocgtaovhvezgccyjazpqd.onion/torproject.org tor-experimental-$(lsb_release -c) main" | sudo tee -a /etc/apt/sources.list.d/tor-project.list printf "deb-src [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/tor-project-keyring.gpg] tor+http://apow7mjfryruh65chtdydfmqfpj5btws7nbocgtaovhvezgccyjazpqd.onion/torproject.org tor-experimental-$(lsb_release -c) main" | sudo tee -a /etc/apt/sources.list.d/tor-project.list


For the nightly builds:

printf "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/tor-project-keyring.gpg] tor+http://apow7mjfryruh65chtdydfmqfpj5btws7nbocgtaovhvezgccyjazpqd.onion/torproject.org tor-nightly-main-$(lsb_release -c) main" | sudo tee -a /etc/apt/sources.list.d/tor-project.list printf "deb-src [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/tor-project-keyring.gpg] tor+http://apow7mjfryruh65chtdydfmqfpj5btws7nbocgtaovhvezgccyjazpqd.onion/torproject.org tor-nightly-main-$(lsb_release -c) main" | sudo tee -a /etc/apt/sources.list.d/tor-project.list


Since Debian 12 bookworm you can also use the more modern deb822-style:

echo -e "Types: deb deb-src\nComponents: main\nSuites: bookworm\nURIs: tor+http://apow7mjfryruh65chtdydfmqfpj5btws7nbocgtaovhvezgccyjazpqd.onion/torproject.org\nArchitectures: amd64 arm64 i386\nSigned-By: /usr/share/keyrings/tor-project-keyring.gpg" | sudo tee /etc/apt/sources.list.d/tor-project.sources ```

The Tor Project maintains its own Debian package repository. Since Debian provides the LTS version of Tor, this might not always give you the latest stable Tor version. Therefore, it's recommended to install tor from our repository.

Here's how you can enable Tor Package Repository in Debian based distributions:

Note: The symbol # refers to running the code as root. This means you should have access to a user account with system administration privileges, i.e. your user should be in the sudo group.

Prerequisite: Verify the CPU architecture

The package repository offers amd64, arm64, and i386 binaries. Verify your operating system is capable of running the binary by inspecting the output of the following command:

  # dpkg --print-architecture

It should output either amd64, arm64, or i386. The repository does not support other CPU architectures.

Note: The package repository does not offer 32-bit ARM architecture (armhf) images (yet). You should either install the version Debian offers (make sure to check out Debian backports, too, as that one has often a more up-to-date Tor package), or build Tor from source.

1. Install apt-transport-https

To enable all package managers using the libapt-pkg library to access metadata and packages available in sources accessible over https (Hypertext Transfer Protocol Secure).

   # apt install apt-transport-https

2. Create a new file in /etc/apt/sources.list.d/ named tor.list. Add the following 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

If you want to try experimental packages, add these in addition to the lines from above:

   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

Or 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

Replace <DISTRIBUTION> with your Operating System codename. Run lsb_release -c or cat /etc/debian_version to check the Operating System version.

Note: Ubuntu Focal dropped support for 32-bit, so instead use:

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

Replace <ARCHITECTURE> with your system architecture (you found it earlier by writing dpkg --print-architecture).

Warning symptom, when running sudo apt update:

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

3. Then add the gpg key used to sign the packages by running the following command at your command prompt:

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

4. Install tor and tor debian keyring

We provide a Debian package to help you keep our signing key current. It is recommended you use it. Install it with the following commands:

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

No. Do not use the packages in Ubuntu's universe. In the past they have not been reliably updated. That means you could be missing stability and security fixes. Instead, please use Tor Debian repository.