Skip to content

Latest commit

 

History

History
100 lines (76 loc) · 3.07 KB

README.org

File metadata and controls

100 lines (76 loc) · 3.07 KB

Cloud

Cloud is a web app that aims to simplify secure file sharing for self hosted users. Main goals of the project are to be simple to setup, secure and have support for ARM devices.

Screenshots:

Getting started

Cloud is a golang application and you are going to need golang toolchain to compile the app.

To install or update run:

go get -u github.com/ap4y/cloud/cmd/cloud

Web UI is implemented using react and is pre-bundled into golang app. To setup local development environment for react app you will need node.js with either npm or yarn.

To pull react app dependecies run:

cd app
npm install

To start local development setup:

cd app
npm start

This will start creat-react web server on a port 3000, you can proxy local cloud app to it using -devURL argument.

Configuration

Cloud uses json config files to setup authentication and necessary paths. Sample config:

{
  "jwt_secret": "secret",
  "modules": ["gallery"],
  "users": {
    "ap4y": "$2b$10$fEWhY87kzeaV3hUEB6phTuyWjpv73V5m.YcqTxHXnvqEGIou1tXGO"
  },
  "share": {
    "path": "./"
  },
  "gallery": {
    "path": "/mnt/media/Photos/Export/",
    "cache": "/tmp/cloud/"
  },
  "files": {
    "path": "/mnt/media/Photos/Export/"
  }
}

Configuration fields:

  • jwt_secret is a secret used for JWT (HS256 algorithm) related operations.
  • modules defines enabled modules.
  • users defines bcrypt hashes for user credentials, you can use mkpasswd to hash your passwords.
  • share setups a share storage. path defines storage location for a disk share storage.
  • gallery defines necessary paths for the gallery module. path is a gallery source folder and cache is a thumbnail cache folder.
  • files defines necessary paths for the files module. path is a source folder for this module.

Additionally following command line arguments are supported:

  • -config cloud.json - path to a config file.
  • -addr :8080 - address to listen on.
  • -devURL - enables proxy mode for a local react development server.

Gallery

Gallery provides common image gallery features: image grid, thumbnails and full screen previews. Gallery traverses provided path on a disk and exposes folders with images as shareable galleries. Thumbnails are generated on the fly and cached for subsequent use.

Files

Files provides file viewer interface with a basic management features. Files module traverses provided path on a disk and construct a tree, parts of the tree can be individually shared.