Package: cista
Cista Web StorageCista takes its name from the ancientcistae, metal containers used by Greeks and Egyptians to safeguard valuable items. This modern application provides a browser interface for secure and accessible file storage, echoing the trust and reliability of its historical namesake.This is a cutting-edgefile and document serverdesigned for speed, efficiency, and unparalleled ease of use. Experiencelightning-fast browsing, thanks to the file list maintained directly in your browser and updated from server filesystem events, coupled with our highly optimized code. Fullykeyboard-navigableand with a responsive layout, Cista flawlessly adapts to your devices, providing a seamless experience wherever you are. Our powerfulinstant searchmeans you're always just a few keystrokes away from finding exactly what you need. Press1/2/3to switch ordering, navigate with all four arrow keys (+Shift to select). Or click your way around onbreadcrumbs that remember where you were.The Cista project started as an inevitable remake ofDroppywhich we used and loved despite its numerous bugs. Cista Storage stands out in handling even the most exotic filenames, ensuring a smooth experience where others falter.All of this is wrapped in an intuitive interface with automatic light and dark themes, making Cista Storage the ideal choice for anyone seeking a reliable, versatile, and quick file storage solution. Quickly setup your own Cista where your files are just a click away, safe, and always accessible.Experience Cista by visitingCista Demofor a test run and perhaps upload something...Getting StartedInstallationTo install the cista application, use:pip install cistaNote: Some Linux distributions might need--break-system-packagesto install Python packages, which are safely installed in the user's home folder. As an alternative to avoid installation, run it with commandpipx run cistaRunning the ServerCreate an account: (or run a public server without authentication)cista --user yourname --privilegedServe your files athttp://localhost:8000:cista -l :8000 /path/to/filesThe server remembers its settings in the config folder (default~/.local/share/cista/), including the listen port and directory, for future runs without arguments.Internet AccessTo use your own TLS certificates, place them in the config folder and run:cista -l cista.example.comMost admins instead find theCaddyweb server convenient for its auto TLS certificates and all. A proxy also allows running multiple web services or Cista instances on the same IP address but different (sub)domains./etc/caddy/Caddyfile:cista.example.com {
    reverse_proxy :8000
}Development setupFor rapid development, we use the Vite development server for the Vue frontend, while running the backend on port 8000 that Vite proxies backend requests to. Each server live reloads whenever its code or configuration are modified.cdfrontend
npm install
npm run devConcurrently, start the backend on another terminal:hatch shell
pip install -e'.[dev]'cista --dev -l :8000 /path/to/filesWe usehatch shellfor installing on a virtual environment, to avoid disturbing the rest of the system with our hacking.Vue is used to build files incista/wwwroot, included prebuilt in the Python package. Runninghatch buildbuilds the frontend and creates a NodeJS-independent Python package.System DeploymentThis setup allows easy addition of storages, each with its own domain, configuration, and files.Assuming a restricted user accountstoragefor serving files and that cista is installed system-wide or on this account (check withsudo -u storage -s). Alternatively, usepipx run cistaorhatch run cistaas the ExecStart command.Create/etc/systemd/system/cista@.service:[Unit]Description=Cista storage %i[Service]User=storageExecStart=cista -c /srv/cista/%i -l /srv/cista/%i/socket /media/storage/%iRestart=always[Install]WantedBy=multi-user.targetThis setup supports multiple storages, each under/media/storage/<domain>for files and/srv/cista/<domain>/for configuration. UNIX sockets are used instead of numeric ports for convenience.systemctl daemon-reload
systemctl enable --now cista@foo.example.com
systemctl enable --now cista@bar.example.comPublic exposure is easiest using the Caddy web server./etc/caddy/Caddyfile:foo.example.com, bar.example.com {
    reverse_proxy unix//srv/cista/{host}/socket
}