[Solved] SQLite database directory `data` does not exist or is not a directory

I have been using LXC from ttech for over a year. Now suddenly I am presented with the following error

alpine-vaultwarden:~# vaultwarden
/--------------------------------------------------------------------
| Starting Vaultwarden |

Version 1.32.7-r0
This is an unofficial Bitwarden implementation, DO NOT use the
official channels to report bugs/features, regardless of client.
Send usage/configuration questions or feature requests to:
--------------------------------------------------------------------/
Error loading config:
SQLite database directory data does not exist or is not a directory

I have not touched the LXC in that year. To make things worse, the backups failed too. Is there z way to fix this or at least retrieve the data?

Thank you kindly

For those reading. I figured it out with Gemini 2.5
All files of the ttech install were located at /var/lib/vaultwarden .
Our solution for this specific problem was:

  • Realizing that the default installation (or how it was being launched) was looking for data in data (relative to the executable) or /root/.local/share/vaultwarden, but your existing data was in /var/lib/vaultwarden.
  • Modifying the OpenRC init script (/etc/init.d/vaultwarden) to explicitly set the command_args="--data-folder /var/lib/vaultwarden" and directory="${DATA_FOLDER:-/var/lib/vaultwarden}" to point Vaultwarden to your actual data.

Next there was another issue with the WEB_VAULT.

  • Downloading the Correct Web Vault Files:
  • We obtained the official web vault build for the version of Vaultwarden you were running. You provided v2025.5.0 as the target version.
  • Command: wget https://github.com/dani-garcia/bw_web_builds/archive/refs/tags/v2025.5.0.zip
  • Preparing the Directory:
  • To ensure a clean installation and avoid conflicts with any existing, corrupted, or incomplete files, we removed the problematic web-vault directory.
  • Command: rm -rf web-vault (executed from within /mnt/lxc_root/var/lib/vaultwarden/)
  • Unzipping the Web Vault Files:
  • We extracted the downloaded .zip archive into a new web-vault directory.
  • Command: unzip v2025.5.0.zip -d web-vault
  • Initial hiccup: We first had to install unzip on your Proxmox host because it wasn’t available:
    • apt update
    • apt install unzip
  • Correcting the Directory Structure (Crucial Step):
  • A common issue with these bw_web_builds zips is that they often extract into an extra subdirectory (e.g., web-vault/bw_web_builds-2025.5.0/...). Vaultwarden expects the web vault files directly within web-vault/.
  • Commands:
    • mv web-vault/bw_web_builds-2025.5.0/* web-vault/ (to move the contents one level up)
    • rm -rf web-vault/bw_web_builds-2025.5.0/ (to remove the now-empty, extra directory)
  • Setting Correct Permissions and Ownership:
  • Files copied from the Proxmox host (as root) had incorrect ownership and permissions for the vaultwarden user inside the LXC. This would prevent Vaultwarden from reading them.
  • We determined the correct shifted UID/GID for the vaultwarden user (which was 100101:100102 in your unprivileged LXC).
  • Commands:
    • chown -R 100101:100102 web-vault
    • chmod -R 755 web-vault

perhaps it helps someone in the future