Breadcrumbs

How to Integrate Filecloud with Storj

Administrators can change the FileCloud storage type after FileCloud has been installed but before any data has been stored. 

  • When changing the storage type from local to Storj S3-Compatible Object Storage, the files and folders that have been already stored in local storage will not be automatically moved to S3 storage.

  • In this case, the administrator must manually export files and folders from local storage before changing the storage type, and then manually import them after changing the storage type.


  • Only change the FileCloud storage type for new installations.

  • Do not change the FileCloud storage type if FileCloud has been in use and data is already stored.

  • Be careful when changing the storage path; If done improperly it could lead to data loss. 

  • Storj S3-Compatible Object Storage should NEVER be modified outside of FileCloud.

  • Do not add, edit, or modify files directly using  Storj tools. Doing so will destabilize your FileCloud installation.

To change the FileCloud storage path from LOCAL to Storj:

1. Enable Storj S3-Compatible Object Storage

NOTES:

Although FileCloud does not have an explicit connector for Storj, the Amazon S3 connector can be used.

In this step you will need to access WWWROOT. It is typically located at: 

Windows

Linux

c:\xampp\htdocs

/var/www/html

To enable Storj as backend storage:

  1.  To ensure that your server's time does not vary, set it up to be synchronized.

    1. Configure an authoritative time server in Windows Server

    2. Synchronize Time with NTP in Linux

  2. Open the following file for editing:

    WWWROOT/config/cloudconfig.php
    
  3. Find the following line:

    define("TONIDOCLOUD_STORAGE_IMPLEMENTATION", "local");
    
  4. Change it to:

    define("TONIDOCLOUD_STORAGE_IMPLEMENTATION", "amazons3");
    
  5. Save and close the file.

  6. Find the following file:

    WWWROOT/config/amazons3storageconfig-sample.php
    
  7. Rename it to:

    WWWROOT/config/amazons3storageconfig.php
    

https://fileclouddocs.atlassian.net/wiki/s/1623602073/6452/05f502871a457750e4d6a5e1f585bce5603b62b2/_/images/icons/emoticons/lightbulb_on.png  Nothing needs to be added or edited in amazons3storageconfig.php

2. Configure Credentials

To configure FileCloud to access the Storj S3 bucket:

  1. In the FileCloud admin portal's left navigation bar, scroll down and click Settings. Then, on the Settings navigation page, click Storage  StorageIcon.png .
    The Managed Storage settings page opens by default.

  2. Enter the settings for your environment. See the following table for information about each setting.

    StorjSettings.png
  3. Click Save S3 Settings.

Field

Description

S3 Key

Your Storj authentication key.

S3 Secret

Your Storj authentication secret.

Use IAM role

Do not check; this option is not supported in Storj.

S3 Bucket Name

Provide a bucket name. The bucket should be new (in some circumstances, a previously used bucket in FileCloud can be used).

It is important that the S3 bucket is never modified outside of the FileCloud subsystem.

The bucket name is case sensitive; make sure you are using the exact name of the bucket.

S3 Storage Folder

Leave blank. Not supported in Storj.

S3 Region

US1, EU1, or AP1

S3 End Point URL

https://gateway.storjshare.io

Number of old versions to keep for each file

Storj has a beta feature supporting versioning. See  https://docs.storj.io/dcs/buckets/object-versioning for more information. 

In FileCloud, when a user uploads a new version of a file, it is saved, and the latest Number of old versions to keep for each file are kept. When set to -1, each upload of a file overwrites the previous one, and no versions are saved.

S3 Encryption

Select No Encryption or Amazon S3-Managed Key Encryption. See https://docs.storj.io/learn/concepts/encryption-key for more information. 

  1. To fill in the remainder of the settings, see Setting up FileCloud Managed S3 Storage.