Page 1 of 1
How to create a portable version of Firefox
Posted: 26 Mar 2025, 16:34
by Kulle
How to create a portable version of Firefox
Download the Linux version of Firefox (tar.xz) from the Mozilla website:
https://download.mozilla.org/?product=f ... os=linux64
Create a new folder, for example, firefox-portable.
Create a subfolder named profilordner inside the newly created folder.
Extract the downloaded archive into the firefox-portable folder to get the firefox folder.
Create a new file named loader.sh in the firefox-portable folder with the following content:
Code: Select all
#!/bin/sh
"$PWD/firefox/firefox" -no-remote -profile "$PWD/profilordner"
Make the loader.sh file executable: chmod +x ~/firefox-portable/loader.sh
To start the portable Firefox, execute the loader.sh script.
You can move the firefox-portable folder to any location, even a USB stick.
Important notes: Do not run ~/firefox-portable/firefox/firefox directly.
Firefox updates itself if configured to do so in the settings.
All settings, bookmarks, etc., are preserved.
Bookmarks and settings are stored in the profile folder, ensuring persistence.
Using this same principle, derivatives can also be made portable.
Works for forks like Librewolf (privacy-focused Firefox) as they share the same core structure.
The loader.sh script and profile folder method remain identical.
Portable versions inherit the parent project’s update behavior (manual/auto).
This page served as the basis:
https://wiki.ubuntuusers.de/Portable_Firefox/
How to create a portable version of Firefox
Posted: 28 Mar 2025, 12:07
by nanZor
Kulle, that is GREAT! I just tried it and your great doc worked fantastic! Thank You!
What is interesting is that it seems like it might be self-updating capable - that is, when one does an "Help > About" you can see it checks itself for updates (or I guess will happen if you have that set internally.) I'll be interested to see if that self-update works in this portable mode.
Check this out - I'm in Nemesis right now, and although I've Pmodd'ed browsers and so forth, Netsurf comes with the distribution. So I fired up Netsurf and went to mozilla.org. Yeah, not the best display, but it was easy enough to navigate to the special Linux download area, and Netsurf worked downloading Firefox. Sometimes downloading was a problem in earlier versions.
Now just do the portable version as you described here. I suppose one can make it a launcher or command prompt.. I usually follow loader.sh with an ampersand to free up the terminal... usual stuff.
What a treat man! Really great for all the Porteus family, and elsewhere. Thank you for sharing.
Update: This works in the same way for Thunderbird too! Danke my friend!
How to create a portable version of Firefox
Posted: 24 May 2025, 23:10
by nanZor
Aside from being portable, this could be a hardware/disk saver.
Given that most hardware these days don't run from spinning hard drives, but from SSD's, emmc, thumbdrives etc, and writing little files over and over is eventually detrimental. Of course Porteus and family reduce that with things like EXIT: and copy2ram etc.
BUT, for sharing the browser amongst various installation types, (ie scatter disk) which is mostly ssd's and so forth, perhaps the great thing about this portable setup for Firefox is that you can put it on a DEDICATED "sacrificial" good usb stick. USB3 preferred, AND format it with a filesystem appropriate for small files. EXT2 of course comes to mind, but there are other modern types to consider too.
Many larger distros have automated installations which just slam EXT4 across the SSD, but if you create the portable Firefox version as a separate entity, on a sacrificial stick, this would help keep the writes down on internal drives you can't get to. Soldered-on internal emmc drives in particular!
Thanks again Kulle, this may be significant to keep cheaper boxes a little bit more healthy in a super-easy way to implement. In fact, I might make it a combo "tmp" and "portable firefox" thing.
How to create a portable version of Firefox
Posted: 17 Jun 2025, 13:28
by Kulle
Following the above principle, you can also create a
portable Firedragon
(About Firedragon look here:
https://flathub.org/apps/org.garudalinux.firedragon)
Download the Firedragon AppImage from the official Garuda Linux releases page:
https://gitlab.com/garuda-linux/firedra ... v11.26.1-1
Extract the AppImage to obtain the squashfs-root folder by running:
Code: Select all
./firedragon-*.AppImage --appimage-extract
Create a new folder, for example, firedragon-portable.
Inside the firedragon-portable folder, create a subfolder named profilordner to hold the profile data.
Move the extracted squashfs-root folder into firedragon-portable and rename it to firedragon for clarity.
Create a new file named loader.sh inside the firedragon-portable folder with the following content:
Code: Select all
#!/bin/sh
"$PWD/firedragon/firedragon" -no-remote -profile "$PWD/profilordner"
Make the loader.sh script executable:
Code: Select all
chmod +x firedragon-portable/loader.sh
To run the portable Firedragon browser, execute the loader.sh script.
You can move the firedragon-portable folder to any location, including a USB stick.
All your settings, bookmarks, and extensions are saved inside the profilordner folder.
How to create a portable version of Firefox
Posted: 11 Jul 2025, 23:19
by Triatominae
Kulle,
Great Job!

How to create a portable version of Firefox
Posted: 19 May 2026, 09:02
by nanZor
Tip: If you are using this portable version on a usb-stick especially, I've confirmed what I've read elsewhere about disabling the FF disk-cache and just streaming directly instead.
The usual warning applies after initiating this in the url bar:
Search for "
browser.cache.disk.enable"
Toggle that to "
false".
I've noticed that by default, Librewolf sets this to false. When I run FF, I double-check this option. After testing, I think it's a keeper.
How to create a portable version of Firefox
Posted: 20 May 2026, 08:49
by rych
nanZor wrote: ↑19 May 2026, 09:02
by default, Librewolf sets this to false
Doesn't it results in frequent re-downloading of images, scripts, and media? Or are they going to be stored in RAM instead? Do we need to increase the browser.cache.memory.capacity beyond it's typical 256/512MB in this scenario? I remember when I wanted to minimize Firefox writing on my USB all the time I went 2 ways: making a tmp folder on the fast system SSD (a red flag with administrators as they'd rather my USB Porteus didn't have write access to the Windows system disks at all) ... or eventually upgrading my USB stick to the equally fast SSD inside a USB3 enclosure.
How to create a portable version of Firefox
Posted: 20 May 2026, 22:58
by nanZor
Yes, I want the cache, but only in ram, not being stored and retrieved on a slow usb stick. This seems to be slower than any possible re-downloading of media, and maybe even the reduction of write-amplification on sticks and ssd's.
Librewolf might be disabling it for privacy reasons, but it so happens it might be additionally useful for us using slow media.
I saw a mozilla reference here:
https://support.mozilla.org/en-US/questions/1313570
There might be other tweaks beneficial, but I see those confusing disabling cache vs disabling it just on disk with a thousand knob turns. I avoid those, so for now, just this alone seems ok. I'll let others turn more knobs - it would be great to find out.
Also you can check the cache with:
in the url bar.
How to create a portable version of Firefox
Posted: 21 May 2026, 11:55
by Kulle
Hi,
I used the following settings:
Code: Select all
browser.cache.disk.enable → false
browser.cache.memory.enable → true
browser.cache.memory.capacity → -1 (automatic)
browser.sessionstore.interval → 60000
How to create a portable version of Firefox
Posted: 22 May 2026, 14:17
by M. Eerie
nanZor wrote: ↑20 May 2026, 22:58
I want the cache, but only in ram, not being stored and retrieved on a slow usb stick.
If like me, you happen to be using the great method described in this thread by
Kulle, you might find this script useful. I use it to keep Firefox updated along with your settings in a single module. It doesn't prevent the cache from being used while it's active, but it does prevent it from being stored. If you use it in combination with
zram, it can be a good way to save write operations to the USB drive.
* Please note that my portable Firefox is located in
/home/guest/firefox-portable and the target module is saved in
porteus/base/005-fx-portable-YYYY-MM-DD.xzm (lz4 compressed)
Code: Select all
#!/usr/bin/env bash
#
# update-fx-portable v.2025-03
#
set -e
profile="firefox-portable"
#comp_method="-comp xz -Xbcj x86"
#comp_method="-comp zstd" ### -Xcompression-level 22
comp_method="-comp lz4"
module="/tmp/005-fx-portable-$(date +%Y%m%d).xzm"
exclude_patterns=(
"*backups"
"cache*"
"data.safe.bin"
"*dumps"
"*popen*"
"*rash*"
"*report*"
"staged/*"
"*storage"
)
cmd="sudo mksquashfs $HOME/$profile $module $comp_method -b 1M -noappend -no-strip -wildcards"
cmd+=$(printf " -e '... %s'" "${exclude_patterns[@]}")
if eval $cmd; then
tput bold
cp -a "$module" "$PORTDIR/base" 2>/dev/null
tput setaf 2; echo "Module copied and ready to be activated at next boot"
else
tput setaf 1; echo "Something went wrong"
exit 1
fi
exit 0
How to create a portable version of Firefox
Posted: 12 Jul 2026, 08:28
by dreadbird
Will give this a go I usually use chromium ungoogled with neverdecafe to install extensions. But do use firefox as it seems to have a better video popout (opera I had to abandon because it wouldnt popout on my tv provider browser). its convenient how they have a release you can just download.
firedragon is a cool name what if they named it flydragon which is a play on dragonfly