Add questions about Tor package repository in Debian
Why and how I can enable Tor Package Repository in Debian?
The Tor Project maintains its own Debian package repository. Since Debian provides the LTS version of Tor that this might not always give you the latest stable Tor version. It's recommended and advised to install Tor from Tor Project Package repository, then the entire Tor network will benefits from newer versions.
Here's how you can enable Tor Package Repository in Debian based OS:
apt-transport-httpsto 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
- Add the following entries to
/etc/apt/sources.listor a new file in
deb https://deb.torproject.org/torproject.org <DISTRIBUTION> main deb-src https://deb.torproject.org/torproject.org <DISTRIBUTION> main
If you want to try experimental packages:
deb https://deb.torproject.org/torproject.org tor-experimental-0.3.4.x-<DISTRIBUTION> main deb-src https://deb.torproject.org/torproject.org tor-experimental-0.3.4.x-<DISTRIBUTION> main
Or if you want to try nightly builds:
deb https://deb.torproject.org/torproject.org tor-nightly-master-<DISTRIBUTION> main deb-src https://deb.torproject.org/torproject.org tor-nightly-master-<DISTRIBUTION> main
<DISTRIBUTION> with your Operating System codename. If you don't know, you can run in a terminal
lsb_release -c or
cat /etc/debian_version to discover.
- Then add the gpg key used to sign the packages by running the following commands at your command prompt:
# curl https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import # gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
- 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
Can I use tor from Ubuntu's repository?
No. Do not use the packages in Ubuntu's universe. In the past they have not reliably been updated. That means you could be missing stability and security fixes. Please, use Tor official repository.
Can I use APT over Tor?
deb.torproject.org is also served through via an Onion Service: http://sdscoq7snqtznauu.onion/
To use Apt with Tor, the apt transport needs to be installed:
# apt install apt-transport-tor
Then replace the address in the lines added before with, for example:
# For the stable version. deb tor://sdscoq7snqtznauu.onion/torproject.org <DISTRIBUTION> main # For the unstable version. deb tor://sdscoq7snqtznauu.onion/torproject.org tor-nightly-master-<DISTRIBUTION> main
Now refresh your sources and try if it's still possible to install tor:
# apt update # apt install tor
See onion.torproject.org for all torproject.org onion addresses.
We could go fancy and have a dropdown menu to choose your distribution and tor version, like this: https://2019.www.torproject.org/docs/debian.html.en
Feel free to improve this text.