(This is a repost of an article written by one of our customers first appearing on Medium.com)
Use a blockchain solution to store your data via an S3 compatible service.
In this article i’m going to explain how to configure your FreeNAS NAS box to use Filebase.com’s blockchain decentralized storage platform.
Filebase uses the Sia blockchain for data storage. It is known to be a very secure way for you to store data on the cloud. Filebase implements an S3 Compatible model to expose their storage API to the public so there a many apps out there to help you sync and backup your data to Filebase but for this article i will be using FreeNAS and its inbuilt tools. For more information on Filebase and how their system is implemented, refer to filebase.com.
Configuring your Filebase Account
Login to your Filebase portal and click to create a new bucket. Note that S3 buckets cannot have any capital letters or spaces and must be unique across ALL users of the platform.
Now visit the settings page by clicking the gear icon on the top right and confirm you have an S3 API Access Key ID and a S3 Secret Access ID. Keep these details safe, preferably don’t make any copies as they are always available securely via SSL right there on the settings page.
Configuring your FreeNAS Box
Login to your Freenas box. In this example i am using FreeNAS 11.2.
First we need to setup the credentials we are going to use for Filebase. From the menu select “System”, then “Cloud Credentials”. this is where FreeNAS stores the login details to various cloud resources so they can be reused.
Click “Add” to add a new cloud credentials set.
Give the credentials set a name, choose Amazon S3 as the provider type, enter in your keys and click “Advanced Settings”. In the advanced section we need to tell FreeNAS to use the specific endpoint URL for Filebase which you can find as part of your Filebase credentials in the Filebase settings page. Also click to disable endpoint regions, as i found this to be more reliable and give less errors. Click save.
Next, we need to configure the cloud sync task. This is the task that runs and schedules the cloud sync via the RClone backend.
From the FreeNAS menu select “Tasks” and then “Cloud Sync Tasks”. Click “Add” to add a new cloud sync task.
Give the task a name and keep the default direction as “PUSH”. Now select your cloud credential from the credential list. Once you select the credential, FreeNAS will automatically login, and evaluate the available buckets and drop them in the buckets list. Select the bucket you want to use for your sync.
The next selection called “Folder” refers to the folder within the cloud bucket. This is optional as you can sync straight to the bucket root. “DirectoryFiles” refers to the folder on the FreeNAS that you want to sync. This folder and all subs will be synced to Filebase. leave the transfer mode as “SYNC”. Select encryption if that is up your alley. I won’t cover that as part of this guide.
Next select a schedule for the sync. Select a predefined schedule such as daily or weekly, or select a custom schedule per below.
In the above custom schedule i have used the “Daily” preset, and added some tweaks. I have set the task to run at 6 minutes past midnight, on the 10th, 18th and 26th of Sept, Oct and Dec as well as every Monday which is also limited to my month restriction of Sept, Oct and Dec.
Make sure the task is enabled and click “Save”
Monitoring the Task
To force the task to run independently of the schedule go to your cloud sync task list, and (you may have to scroll sideways) click the task options dots and select “Run Now”
You can view the task’s status in the task list window. “Running 3/5” means 3 files out of 5 in total have synced.
As a side note there is a lack of clear documentation on this status however if you notice the total file count growing i had found that to mean there were errors and the retried files get added to the total count.
Once the task has completed you will be notified. Click the “Status” and you will see a slightly more detailed log.
Click “Download Logs” for a complete log which i found to be very verbose.
Filebase is the world’s first object storage platform powered by multiple decentralized storage networks. Filebase helps customers save over 90% compared to traditional cloud providers. Additionally, Filebase’s proprietary edge caching technology helps customers achieve industry-leading storage performance when fetching data from decentralized networks.
Filebase was awarded the “Most Exciting Data Storage And Sharing Project” in HackerNoon’s 2020 Noonies Awards and was a finalist in Storage Magazine’s 2019 Product of the Year Awards.