profile-sync-daemon(1)

πŸ’– NAME πŸ’–

Profile-sync-daemon β€” bestie, what it does is symlink and sync browser profiles to RAM (tmpfs), which means fewer HDD/SSD calls and faster browsers. periodt. ✨


🌸 DESCRIPTION 🌸

Profile-sync-daemon (everyone calls it psd) is a tiny pseudo-daemon whose whole job is managing your browser profile/profiles in tmpfs and periodically syncing back to the physical disk (HDD/SSD). How, you ask? An innovative use of rsync to maintain synchronization between a tmpfs copy and a media-bound backup of the browser profile/profiles. And on top of that, psd features several crash-recovery features. she's versatile. πŸ’…

Design goals of psd, the vibe check:

  • Completely transparent user experience.
  • Speed.

Since the profile/profiles, browser cache*, etc. get relocated into tmpfs (RAM disk), the corresponding I/O that comes with using the browser is also redirected from the physical disk to the RAM β€” thus improving browser responsiveness during read/writes to profiles. it's giving speed. πŸ¦‹

*Quick note: some browsers like Chrome/Chromium, Firefox, Midori, and Rekonq actually keep their cache directories separate from their browser profile directory. Changing that behavior is not within the scope of Profile-sync-daemon; if you wanna relocate that directory, there's a url with several work-arounds right here: https://wiki.archlinux.org/index.php/Chromium_Tips_and_Tweaks#Cache_in_tmpfs


πŸ› οΈ SETUP πŸ› οΈ

$XDG_CONFIG_HOME/psd/psd.conf (from here on referred to as "the config file") contains all user managed settings. all of them. πŸ’…

NOTE: edits made to the config file while psd is active will be applied only after the service has been restarted. so restart it, bestie, don't just sit there refreshing. 😭
  • With the release of v7.00 of psd, overlayfs mode is the only supported option. It improves sync speed and offers a smaller memory footprint. πŸ‘‘
  • Optionally define which browsers are to be managed in the BROWSERS array. If none are defined, the default is all detected browsers.
  • Optionally disable the use of crash-recovery snapshots (not recommended, pls don't). Do this in the USE_BACKUPS variable.
  • Optionally define the number of crash-recovery snapshots to keep. Do this in the BACKUP_LIMIT variable.
NOTE: occasionally, updates/changes are made to the default config file (/usr/share/psd/psd.conf) upstream. Your user copy ($XDG_CONFIG_HOME/psd/psd.conf) will need to be diffed against it. yeah. sorry. πŸ™ˆ

πŸš€ RUNNING PSD πŸš€

πŸ‘€ PREVIEW MODE πŸ‘€

The preview option can be called to show users exactly what psd will do/is doing based on the entries in the config file. It also hands over useful information like profile size, paths, and whether any recovery snapshots have been created. iconic, honestly.

% Profile-sync-daemon v7.00

systemd service: active
resync-timer:    active

Psd will manage the following per /home/facade/.config/psd/.psd.conf:

browser/psname:  chromium/chromium
owner/group id:  facade/100
sync target:     /home/facade/.config/chromium
tmpfs dir:       /run/user/1000/psd/facade-chromium
profile size:    110M
overlayfs size:  64M
recovery dirs:   none

browser/psname:  firefox/firefox
owner/group id:  facade/100
sync target:     /home/facade/.config/mozilla/firefox/z0pauair.default
tmpfs dir:       /run/user/1000/psd/facade-firefox-z0pauair.default
profile size:    4.0K
overlayfs size:  0
recovery dirs:   none

browser/psname:  firefox/firefox
owner/group id:  facade/100
sync target:     /home/facade/.config/mozilla/firefox/kgtk05jp.default-release
tmpfs dir:       /run/user/1000/psd/facade-firefox-kgtk05jp.default-release
profile size:    20M
overlayfs size:  19M
recovery dirs:   none

▢️ START AND STOP PSD ⏹️

Psd ships with a systemd user service to start or stop it (psd.service).

Also, a provided resync-timer will run an hourly resync from tmpfs back to the disk. The resync-timer is started automatically with psd.service, so there is literally no need to start the timer yourself β€” only start psd.service. that's it, that's the whole assignment. πŸ’–

Of course, the frequency of the resync can be adjusted with a systemd drop-in. For example, to trigger the resync every 15 minutes:

% systemctl --user edit psd-resync.timer
[Timer]
OnCalendar=*:0/15

% systemctl --user [option] psd.service

🧼 CLEAN MODE 🧼

Clean mode will delete ALL recovery snapshots that have accumulated. Only run it when you're sure these are no longer needed. like, sure sure. 🫢

% psd c

Profile-sync-daemon v7.00

Deleting 2 crashrecovery dirs for profile /home/facade/.config/chromium
 /home/facade/.config/chromium-backup-crashrecovery-20260209_171359
 /home/facade/.config/chromium-backup-crashrecovery-20260209_112204

🌈 SUPPORTED BROWSERS 🌈

Psd's infrastructure can work in principal with any browser that uses a generic chrome or mozilla, etc. format. User supplied profiles are provided in /usr/share/psd/contrib/ and can be manually copied to /usr/share/psd/browsers/ if one wishes to sync that particular browser β€” just make a corresponding entry in the BROWSERS array within the config file. Heads up though: support for these is unsupported. πŸ’€


πŸ”— NOTE ON SYMLINKED PROFILES πŸ”—

Currently, psd does not support symlinked profiles and will refuse to sync if one is detected. example: your firefox profile is ~/.mozilla/firefox/f8cv8bfu.default but you have moved that directory to /foo/bar/f8cv8bfu.default and replaced it with a symlink:

% ls -l ~/.mozilla/firefox
lrwxrwxrwx 1 facade users  26 Oct  1 17:02 f8cv8bfu.default -> /foo/bar/f8cv8bfu.default

Running psd in preview mode will end in an error informing you of this:

% psd p

Warning!
/home/facade/.mozilla/firefox/f8cv8bfu.default appears to be a symlink but these are not supported.
Please make the browser profile a live directory and try again. Exiting.

A proper work around for firefox is to simply edit ~/.mozilla/firefox/profiles.ini defining the canonical path there. One also needs to adjust the IsRelative flag like so:

[Profile0]
Name=default
IsRelative=0
Path=/foo/bar/f8cv8bfu.default

Other solutions may exist for other browsers but documenting them all here is out of scope. 🧚


🐧 SUPPORTED DISTROS 🐧

Since psd is just a bash script with a systemd service, it should run on any flavor of Linux running systemd. Several distros provide an official package or user-maintained option to install psd. One can also build psd from source. See the official website for available packages, dependencies, and installation instructions.


πŸ’¬ FAQ πŸ’¬

Q1: Why do I have another browser profile directory "foo-back-ovfs" when I enable overlayfs?

A1: The way overlayfs works is to mount a read-only base copy (so-called lower dir) of the profile, and manage the new data on top of that. In order to avoid resyncing to the read-only filesystem, a copy is used instead. So using overlayfs is a trade-off: faster initial sync times and less memory usage vs. disk space in the home dir. pick your fave, bestie. βš–οΈ

Q2: I need more memory to accommodate my profile/profiles in /run/user/xxxx. How can I allocate more?

A2: The standard way of controlling the size of /run/user/ is the RuntimeDirectorySize directive in logind.conf (see the man page for logind.conf for more). By default, 10% of physical memory is used but one can increase it safely. Remember that tmpfs only consumes what is actually used; the number specified here is just a maximum allowed. so like, it's a ceiling, not a reservation. πŸŽ€

Q3: My system crashed for some reason and psd didn't sync back. What do I do?

A3: The "last good" backup of the browser profile/profiles should be the filesystem. Upon restarting psd (on a reboot for example), a check is performed to see if the symlink to the tmpfs copy of the profile is invalid. If it is invalid, psd will snapshot the "last good" backup before it rotates it back into place. This is more for a sanity check that psd did no harm and that any data loss was a function of something else. 🫑

Q4: Where can I find this snapshot?

A4: It depends on the browser. The snapshot will be located in the same directory as the browser profile and it will contain a date-time-stamp that corresponds to the time at which the recovery took place. For example, a chromium snapshot will be ~/.config/chromium-backup-crashrecovery-20130912_153310 -- of course, the date_time suffix will be different.

Q5: How can I restore the snapshot?

A5: Follow these steps:

  1. Stop psd.
  2. Move the "bad" copy of the profile to a backup (don't blindly delete anything).
  3. Copy the snapshot directory to the name that browser expects.

Example using chromium:

  1. systemctl --user stop psd.service
  2. mv ~/.config/chromium ~/.config/chromium-bad
  3. cp -a ~/.config/chromium-backup-crashrecovery-20130912_153310 ~/.config/chromium

At this point, launch chromium which will use the backup snapshot just copied into place. If all is well, it is safe to delete ~/.config/chromium-bad and the snapshot. Remember, to start psd, no browsers must be open (or psd will refuse to start). πŸ”₯

Q6: Can psd delete the snapshots automatically?

A6: Yes, run psd with the "clean" switch to delete snapshots. ✨


πŸ«‚ CONTRIBUTE πŸ«‚

Users wishing to contribute to this project, should fork it and send a pull request. Source is freely available on github. come join, we'd love to have you. πŸ₯Ή


πŸ› BUGS πŸ›

Discovered a bug? Please open an issue. πŸ™

  • Several cases of data loss have been reported when using eCryptFS and psd, therefore until this issue is flushed out, users of eCryptFS are encouraged not to use psd unless willing to help troubleshoot suspected browser corruption. See: https://github.com/graysky2/profile-sync-daemon/issues/158
okay this one is serious bestie β€” data loss is not a vibe. read it twice. πŸ’€

🌐 ONLINE 🌐


πŸ‘‘ AUTHOR πŸ‘‘

graysky (therealgraysky AT proton DOT me)


and that's the whole page, bestie!! πŸ’– this is the profile-sync-daemon(1) manual, dated 22 March 2026 β€” go forth and let your browser live rent-free in RAM. slay. πŸŒˆβ­πŸ’…

πŸ“¦ where this page comes from