
Installing Newer Tor Versions

Introduction
It is possible to install newer Tor versions from either:
- Tor Project APT repositories; or
- Tor Project source code.
Note that a later Tor version will not always be installed from The Tor Project APT repository -- in the recent past, the Debian buster
repositories for packages.debian.org
and deb.torproject.org
had identical Tor versions. In general, as the Debian stable release ages, the likelihood of receiving a newer Tor version from deb.torproject.org
increases.
The Tor Project APT Repository
If you wish to proceed despite the risk, two steps are required:
- The
deb.torproject.org
repository must be enabled. - The
anon-shared-build-apt-sources-tpo
package must be installed, since it enables The Tor Project's APT signing key and installs the apt source torproject.list [3]
1. In Kicksecure (kicksecure-17
), update the package lists.
Click = Copy Copied to clipboard!
2. Install anon-shared-build-apt-sources-tpo
.
Click = Copy Copied to clipboard!
3. Optional: select an alternative Tor Project distribution for the Tor package.
Open file /etc/apt/sources.list.d/torproject.list
in an editor with root rights.
Kicksecure
See Open File with Root Rights for detailed instructions on why to use
sudoedit
for better security and how to use it.
Note: Mousepad (or the chosen text editor) must be closed before running the sudoedit
command.
Click = Copy Copied to clipboard!
Kicksecure for Qubes
NOTES:
- When using Kicksecure-Qubes, this needs to be done inside the Template.
Click = Copy Copied to clipboard!
- After applying this change, shutdown the Template.
- All App Qubes based on the Template need to be restarted if they were already running.
- This is a general procedure required for Qubes and unspecific to Kicksecure for Qubes.
Others and Alternatives
- This is just an example. Other tools could achieve the same goal.
- If this example does not work for you or if you are not using Kicksecure, please refer to this link.
Click = Copy Copied to clipboard!
Comment out deb tor+https://deb.torproject.org/torproject.org
by adding a hash ( bookworm main
#
) in front of it. Comment in a different distribution by removing the hash in front of it or by adding a newer
deb
URI line.
Save the file.
4. Refresh the package lists. [4]
Click = Copy Copied to clipboard!
5. Install the (potentially) newer version of the tor
package.
This step also installs the deb.torproject.org-keyring
package which keeps the Tor Project repository apt key up-to-date.
Click = Copy Copied to clipboard!
Onionize Tor Project APT Repository
Only follow these instructions if Newer Tor versions from The Tor Project Repository was configured. Note that The Tor Project deb apt signing key must be added first (see the prior link), or error messages will appear when completing these steps.
Kicksecure
This procedure works in both Kicksecure and Kicksecure-Qubes.
Run the following commands in Kicksecure.
1. Create a torproject.list file using an editor.
Open file /etc/apt/sources.list.d/torproject.list
in an editor with root rights.
Kicksecure
See Open File with Root Rights for detailed instructions on why to use
sudoedit
for better security and how to use it.
Note: Mousepad (or the chosen text editor) must be closed before running the sudoedit
command.
Click = Copy Copied to clipboard!
Kicksecure for Qubes
NOTES:
- When using Kicksecure-Qubes, this needs to be done inside the Template.
Click = Copy Copied to clipboard!
- After applying this change, shutdown the Template.
- All App Qubes based on the Template need to be restarted if they were already running.
- This is a general procedure required for Qubes and unspecific to Kicksecure for Qubes.
Others and Alternatives
- This is just an example. Other tools could achieve the same goal.
- If this example does not work for you or if you are not using Kicksecure, please refer to this link.
Click = Copy Copied to clipboard!
2. Cut and paste the following text and comment out (#) the corresponding http repository.
Click = Copy Copied to clipboard!
Save and exit.
Qubes Debian Templates
As a workaround, the Tor apt singing key can be fetched from a (networked) kicksecure
App Qube, then copied over to kicksecure-17
in a text file.
1. Download and verify the Tor Project deb apt signing key.
Perform the following procedure either in kicksecure
or even better in a Kicksecure Disposable. [6]
Note:
- Examine the following key's fingerprint. Compare the fingerprint displayed in the terminal with the one listed at this link: Tor Project: Signing Keys
(.onion
).
- Instead of downloading with
scurl-download
from https it is even safer to download usingcurl-download
from Tor Project onion, assuming the user independently verified the onion really belongs to The Tor Project.- Click = Copy Copied to clipboard!
- Digital signatures are a tool enhancing download security. They are commonly used across the internet and nothing special to worry about.
- Optional, not required: Digital signatures are optional and not mandatory for using Kicksecure, but an extra security measure for advanced users. If you've never used them before, it might be overwhelming to look into them at this stage. Just ignore them for now.
- Learn more: Curious? If you are interested in becoming more familiar with advanced computer security concepts, you can learn more about digital signatures here digital software signatures.
Securely download the signing key.
Click = Copy Copied to clipboard!
Display the key's fingerprint.
Click = Copy Copied to clipboard!
Verify the fingerprint. It should show.
Note: Key fingerprints provided on the Kicksecure website are for convenience only. The Kicksecure project does not have the authorization or the resources to function as a certificate authority, and therefore cannot verify the identity or authenticity of key fingerprints. The ultimate responsibility for verifying the authenticity of the key fingerprint and correctness of the verification instructions rests with the user.
Key fingerprint = A3C4 F0F9 79CA A22C DBA8 F512 EE8C BC9E 886D DD89
The most important check is confirming the key fingerprint exactly matches the output above. [7]
Add the signing key.
Click = Copy Copied to clipboard!
2. Copy the Tor signing key to kicksecure-17
.
In kicksecure
, copy the A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc
text file over to kicksecure-17
.
Click = Copy Copied to clipboard!
If the following error appears, it can be safely ignored (hit "OK" when prompted).
qfile-agent: Fatal error: stat kicksecure-17-version (error type: No such file or directory)
3. Move the Tor signing key to the Template's home folder. [8]
Note: if using a Disposable the file path will be different.
Click = Copy Copied to clipboard!
4. Verify the Tor signing key again. [9]
The same verification command from step 1 can be used.
5. Add the Tor signing key to the list of trusted keys.
In kicksecure-17
, run.
Click = Copy Copied to clipboard!
Onionize the Sources File
1. To onionize Tor Project updates, first create a torproject.list file using an editor.
Open file /etc/apt/sources.list.d/torproject.list
in an editor with root rights.
Kicksecure
See Open File with Root Rights for detailed instructions on why to use
sudoedit
for better security and how to use it.
Note: Mousepad (or the chosen text editor) must be closed before running the sudoedit
command.
Click = Copy Copied to clipboard!
Kicksecure for Qubes
NOTES:
- When using Kicksecure-Qubes, this needs to be done inside the Template.
Click = Copy Copied to clipboard!
- After applying this change, shutdown the Template.
- All App Qubes based on the Template need to be restarted if they were already running.
- This is a general procedure required for Qubes and unspecific to Kicksecure for Qubes.
Others and Alternatives
- This is just an example. Other tools could achieve the same goal.
- If this example does not work for you or if you are not using Kicksecure, please refer to this link.
Click = Copy Copied to clipboard!
2. Next, cut and paste the following text and comment out (#) the corresponding http repository.
Click = Copy Copied to clipboard!
Save and exit.
Install Tor from Source Code
All steps should be performed inside Kicksecure (kicksecure
).
1. Add the Debian bookworm
source repository.
Click = Copy Copied to clipboard!
2. Update the package lists.
Click = Copy Copied to clipboard!
3. Install build dependencies for Tor.
Click = Copy Copied to clipboard!
4. Fetch the signing key. [10]
Click = Copy Copied to clipboard!
If the attempt fails, utilize the v3 onion service instead.
Click = Copy Copied to clipboard!
5. Download the Tor source code archive.
Note: Replace Tor version 0.4.6.5
with the actual Tor version to be downloaded. (Template:Tor upstream version)
Click = Copy Copied to clipboard!
6. Download and verify the Tor source code OpenPGP signature.
Click = Copy Copied to clipboard!
Click = Copy Copied to clipboard!
The output should look similar to the following.
gpg: assuming signed data in 'tor-0.4.6.5.tar.gz'
gpg: Signature made Mon 09 Dec 2019 06:21:51 PM UTC gpg: using RSA key 7A02B3521DC75C542BA015456AFEE6D49E92B601 gpg: Good signature from "Nick Mathewson <nickm@alum.mit.edu>" [unknown] gpg: aka "Nick Mathewson <nickm@wangafu.net>" [unknown] gpg: aka "Nick Mathewson <nickm@freehaven.net>" [unknown] gpg: aka "Nick Mathewson <nickm@torproject.org>" [unknown] gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 2133 BC60 0AB1 33E1 D826 D173 FE43 009C 4607 B1FB
Subkey fingerprint: 7A02 B352 1DC7 5C54 2BA0 1545 6AFE E6D4 9E92 B601
7. Extract the Tor source code archive.
Click = Copy Copied to clipboard!
8. Navigate to the Tor source code folder.
Click = Copy Copied to clipboard!
9. Run configure and build the binary package.
Click = Copy Copied to clipboard!
Click = Copy Copied to clipboard!
The build should now be finished.
10. Check the version of the built binary.
Click = Copy Copied to clipboard!
The output should show.
Tor version 0.4.6.5.
11. Template:Q project name only: copy the newly built binary to Kicksecure TemplateVM (whonix-gw-17
).
Click = Copy Copied to clipboard!
12. Stop Tor.
Click = Copy Copied to clipboard!
13. Copy the newly build Tor binary to the system.
Click = Copy Copied to clipboard!
Copy the binary again. [12]
Click = Copy Copied to clipboard!
14. Restart Tor.
Click = Copy Copied to clipboard!
The process of installing Tor from source code is now complete.
Footnotes
- ↑ One example in the recent past was a Tor release that contained AppArmor changes which were incompatible with one of Kicksecure (
kicksecure-17
)'s configuration files (anon-gw-anonymizer-config's /etc/apparmor.d/local/system_tor.anondist
) causing Tor's systemd unit to fail.
- ↑ Also, at the time of writing Tor v4.2.5 is non-functional in Kicksecure.
- ↑ Alternatively, The Tor Project's native instructions for Debian
can be used, but the manual steps are more difficult and involved. The verification of The Tor Project APT signing key is also harder. Since you already trust Kicksecure, the logical choice is to trust another Kicksecure package to install the right signing key.
- ↑ So the newly installed /etc/apt/sources.list.d/torproject.list takes effect.
- ↑ https://github.com/QubesOS/qubes-issues/issues/1854
- ↑
This can also be performed in a non-Kicksecure VM. However, then
scurl-download
and onion access will be unavailable unless the user sets that up, which is out of scope for this documentation. - ↑ Minor changes in the output such as new uids (email addresses) or newer expiration dates are inconsequential.
- ↑ This step is optional, but provides better usability. Advanced users can skip this step and adjust the file path.
- ↑
That is because the Template is more trusted than
kicksecure
and perhaps safer from malware. If using a Disposable, the added security might be negligible. - ↑
- ↑ https://forums.whonix.org/t/gpg-recv-keys-fails-no-longer-use-keyservers-for-anything/5607
- ↑
apt-file list tor
shows both locations/usr/bin/tor
and/usr/sbin/tor
.

We believe security software like Kicksecure needs to remain Open Source and independent. Would you help sustain and grow the project? Learn more about our 12 year success story and maybe DONATE!