• Open Terminal
sudo apt update && sudo apt install wget -y && sudo wget https://clients.luckycloud.de/sync-client/linux/install_luckycloud_sync_client.sh && sudo bash install_luckycloud_sync_client.sh && sudo rm install_luckycloud_sync_client.sh
• Install the Sync Client without a graphical user interface
sudo apt install lcs-cli
Initialize and start the Sync Client:
# choose a folder where to store the luckycloud client settings e.g ~/luckycloud-client
mkdir ~/luckycloud-client # create the settings folder
lcs-cli init -d ~/luckycloud-client # initialise luckycloud client with this folder
lcs-cli start
Download and synchronize a directory from the server.
lcs-cli download -l "the id of the directory" -s "https://storage.luckycloud.de + port of server" -d "the folder where the directory folder will be downloaded" -u "username on server" [-p "password"]
lcs-cli status # check status of ongoing downloads
# Name Status Progress
# Apps downloading 9984/10367, 9216.1KB/s
Note: If you do not specify the password parameter in the command, it will be prompted later, which is more secure. Example:
Example:
lcs-cli download -l 0536c006-8a43-449e-8718-39f12111620d -s https://storage.luckycloud.de -d /tmp -u demo@luckycloud.de
The above command creates a new folder with the same name as the directory under the specified folder.
You can also synchronize a directory with an existing folder on your local computer. The existing files in the local folder will then be merged with the files in the directory.
lcs-cli sync -l "the id of the directory" -s "https://storage.luckycloud.de + port of server" -d "the folder which the directory will be synced with" -u "username on server" [-p "password"]
After executing the download or sync command, the local folder will automatically be synchronized with the directory.
lcs-cli is the command line interface for the luckycloud Client.
Subcommands:
When you run lcs-cli -h, the above help will be displayed. For each subcommand, you can also use the -h option to get help, e.g., lcs-cli download -h.
The luckycloud Client stores all its configuration information in a configuration directory. The default directory is ~/.ccnet. All following commands accept the -c option.
This command initializes the configuration directory.
It also creates subdirectories luckycloud-client and luckycloud under the parent directory. luckycloud-client is used to store internal data, while luckycloud is used as the default location for downloaded directories.
lcs-cli init [-c <config-dir>] -d <parent-dir>
# .e.g
lcs-cli init -d ~/luckycloud-client
A file named luckycloud.ini is created under ~/.ccnet to record the location of the luckycloud-client directory.
If you want to run multiple instances of the luckycloud Client on the same machine, you can specify different config-dir and parent-dir when initializing the different client instances.
Then the instances can run without affecting each other.
When starting the instances, simply specify the ccnet configuration directories with the -c option.
Starts the luckycloud Client.
This command starts lcs-daemon, the file synchronization engine for the luckycloud Client.
lcs-cli start [-c <config-dir>]
Stops the luckycloud Client.
lcs-cli stop [-c <config-dir>]
Download a directory from the luckycloud server and synchronize it.
A new folder with the same name as the directory is created under the parent folder.
The download-by-name command works similarly but saves you the trouble of finding the directory ID.
It only works if the directory name on the server is unique.
lcs-cli download -l <directory-id> -s <luckycloud-server-url> -d <parent-directory> -u <username> [-p <password>]
Synchronizes a directory with an existing folder. The existing files in the local folder are merged with the files in the directory.
lcs-cli sync -l <directory-id> -s <luckycloud-server-url> -d <existing-folder> -u <username> [-p <password>]
Desynchronize a directory from the luckycloud server. After executing this command, the local folder will no longer be synchronized with the server.
lcs-cli desync -d <existing-folder>
Create a new directory on the server.
lcs-cli create [-h] -n directory-name -t description [-e directory-password] -s server -u username -p password
Lists information about synchronized directories.
The information includes the directory name, directory ID, and the local folder path for the directory.
lcs-cli list [-c <config-dir>] [--json]
Lists information about accessible directories on the server.
The information includes directory names and IDs.
lcs-cli list-remote -s <luckycloud-server-url> -u <username> [-p <password>] [-c <config-dir>] [--json]
List the synchronization status of directories.
This returns the name, synchronization status, and progress information of all local directories.
lcs-cli status
Status | Meaning |
---|---|
synchronized | Local folder matches the remote directory. |
committing | Files in the local folder are being indexed. |
initializing | Retrieving synchronization information from the server. |
downloading file list | File list is being downloaded from the server. Progress is displayed. |
downloading files | Downloading files from the server. Progress is displayed. |
uploading | Uploading files to the server. Progress is displayed. |
error | Error message is displayed in the progress column. |
If you want to use a self-signed certificate on the server, you should ask the Sync Client to skip the certificate verification.
lcs-cli config -k disable_verify_certificate -v true
Set the upload speed limit to 1MB/s:
lcs-cli config -k upload_limit -v 1000000
Set the download speed limit to 1MB/s:
lcs-cli config -k download_limit -v 1000000
lcs-cli supports two-factor authentication.
If you want to use this feature, you should add the --tfa argument to all lcs-cli commands.
For example:
lcs-cli download -l "4b11d9d4-e3b1-4394-be85-9d4a80f626fa" -s "https://storage.luckycloud.de" -d "testst" -u "abc@abc.com" -p "abc" --tfa 002755
If your server uses SSO (Single Sign-on) for login, you cannot use a password for login via the CLI.
To enable the use of CLI in such cases, we offer an option to authenticate with an API token.
You should be able to obtain your API token from the profile page in the web interface. (You should use an 8.0.6 server for this.)
Use the "-T token" option instead of "-p password" to authenticate with the following commands:
lcs-cli create
lcs-cli download
lcs-cli sync
lcs-cli list-remote