Skip to main content

Dropbox-like file server with modern web interface

Project description

Web File Storage

The Python package installs a cista executable. Use hatch shell to initiate and install in a virtual environment, or pip install it on your system. Alternatively hatch run cista may be used to skip the shell step but stay virtual. pip install hatch first if needed.

Create your user account:

cista --user admin --privileged

Running the server

Serve your files on localhost:8000:

cista -l :8000 /path/to/files

The Git repository does not contain a frontend build, so you should first do that...

Build frontend

Frontend needs to be built before using and after any frontend changes:

cd frontend
npm install
npm run build

This will place the front in cista/wwwroot from where the backend server delivers it, and that also gets included in the Python package built via hatch build.

Development setup

For rapid turnaround during development, you should run npm run dev Vite development server on the Vue frontend. While that is running, start the backend on another terminal hatch run cista --dev -l :8000 and connect to the frontend.

The backend and the frontend will each reload automatically at any code or config changes.

System deployment

Clone the repository to /srv/cista/cista-storage or other suitable location accessible to the storage user account you plan to use. sudo -u storage -s and build the frontend if you hadn't already.

Create /etc/systemd/system/cista@.service:

[Unit]
Description=Cista storage %i

[Service]
User=storage
WorkingDirectory=/srv/cista/cista-storage
ExecStart=hatch run cista -c /srv/cista/%i -l /srv/cista/%i/socket /media/storage/@%i/
TimeoutStopSec=2
Restart=always

[Install]
WantedBy=multi-user.target

This assumes you may want to run multiple separate storages, each having their files under /media/storage/<domain> and configuration under /srv/cista/<domain>/. Instead of numeric ports, we use UNIX sockets for convenience.

systemctl daemon-reload
systemctl enable --now cista@foo.example.com
systemctl enable --now cista@bar.example.com

Exposing this publicly online is the most convenient using the Caddy web server but you can of course use Nginx or others as well. Or even run the server with -l domain.example.com given TLS certificates in the config folder.

/etc/caddy/Caddyfile:

foo.example.com, bar.example.com {
    reverse_proxy unix//srv/cista/{host}/socket
}

Using the {host} placeholder we can just put all the domains on the same block. That's the full server configuration you need. systemctl enable --now caddy or systemctl restart caddy for the config to take effect.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cista-0.4.0.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

cista-0.4.0-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

Details for the file cista-0.4.0.tar.gz.

File metadata

  • Download URL: cista-0.4.0.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.3

File hashes

Hashes for cista-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c8b1f582a9df3f21c89c2267928a9457da0417395b246cc42831e454326e0594
MD5 d1b5efed518ce72ff56e4121cbd14ea2
BLAKE2b-256 f98537605c1a14d96580fa07862b19a46ee10a37a6b6aa9f802fe2f969a4cb20

See more details on using hashes here.

Provenance

File details

Details for the file cista-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: cista-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.3

File hashes

Hashes for cista-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3aa5e16dc0b82ff672a62973af9849a60c86442e426235f70c5d8d37a6b702e6
MD5 6567d74c1159707c88e65f17cc1bda2b
BLAKE2b-256 e79c129c906937a12101e4198e4c2d96e96eadfcb431818d6804b0d65dc9d708

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page