<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Thomas Grant Bennett on Medium]]></title>
        <description><![CDATA[Stories by Thomas Grant Bennett on Medium]]></description>
        <link>https://medium.com/@tbenz9?source=rss-d214c8ebb434------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*RjIF4Ip3twBiryl1.</url>
            <title>Stories by Thomas Grant Bennett on Medium</title>
            <link>https://medium.com/@tbenz9?source=rss-d214c8ebb434------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 16:44:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tbenz9/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introducing sia_exporter, a lightweight and flexible exporter to send Sia metrics to Prometheus]]></title>
            <link>https://medium.com/@tbenz9/introducing-sia-exporter-a-lightweight-and-flexible-exporter-to-send-sia-metrics-to-prometheus-6bb3efd47704?source=rss-d214c8ebb434------2</link>
            <guid isPermaLink="false">https://medium.com/p/6bb3efd47704</guid>
            <category><![CDATA[ia]]></category>
            <category><![CDATA[cloud-storage]]></category>
            <category><![CDATA[grafana]]></category>
            <category><![CDATA[prometheus]]></category>
            <dc:creator><![CDATA[Thomas Grant Bennett]]></dc:creator>
            <pubDate>Thu, 31 Oct 2019 17:14:54 GMT</pubDate>
            <atom:updated>2019-10-31T17:27:55.818Z</atom:updated>
            <content:encoded><![CDATA[<p>Introducing <strong>sia_exporter</strong> a lightweight and flexible metrics exporter to send Sia metrics to Prometheus for analysis and Grafana for graphing and alerting. <strong>Sia_exporter</strong> makes it easy to monitor one or many Sia instances using Prometheus, Grafana, and other tools.</p><p>tl;dr: sia_exporter lets anyone create custom Sia graphs, alerts, and dashboards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*B92RQnbUB7J1l2tSsX6K8Q.png" /><figcaption>Sample Grafana Dashboard generated using sia_exporter</figcaption></figure><h3>What on Earth is Prometheus?</h3><p><a href="https://prometheus.io/">Prometheus</a> is an extremely popular metric gathering and monitoring solution. Prometheus server scrapes HTTP endpoints at regular intervals and stores that scraped data in a super-efficient database. The result is a highly performant repository of time-series metrics representing whatever data is served by the exporters. Prometheus then presents this data for analysis and display to a variety of other tools such as Grafana.</p><h3>What on Earth is Grafana?</h3><p><a href="https://grafana.com/">Grafana</a> is an extremely popular vizualization tool that interfaces with various types of databases, including Prometheus. Here’s how they describe themselves.</p><blockquote>Grafana allows you to query, visualize, alert on and <strong>understand</strong> your metrics no matter where they are stored. Create, explore, and share dashboards with your team and foster a <strong>data driven culture</strong>.</blockquote><h3>What exactly does sia_exporter do?</h3><p>Sia_exporter queries Sia’s API and gathers data (metrics), then serves it over HTTP for Prometheus to consume and Grafana to graph. Prometheus consumes the data, organizes it into time-series values, which Grafana can then query and graph. The whole workflow can be broken down into 3step.</p><p>1: Sia_exporter queries the Sia API and generates a set of metrics for Prometheus to scrape. By default, this happens every 5 minutes.</p><p>2: Prometheus server scrapes the metrics from sia_exporter and saves the data into its internal database. The scrape interval can be customized, but I recommend the same 5 minutes that the sia_exporter is being updated.</p><p>3: Grafana queries Prometheus for the data, then graphs it in customizable, beautiful graphs. Grafana can also generate alerts, such as emails, when certain conditions are met.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*wNpoSJx0_KZF0cKlrsuSGA.png" /><figcaption>Sample Allowance graphs</figcaption></figure><h3>How do I get sia_exporter?</h3><p>Sia_exporter can be found on <a href="https://github.com/tbenz9/sia_exporter">GitHub here</a>. Simply download the binary for your Operating System and run it on the same system as your Sia instance.</p><p>Sia_exporter, Prometheus, and Grafana all work on virtually all operating systems and architectures. Whether you’re a Windows, Mac, or Linux user running on just about any hardware platform there should be a binary that works for you.</p><h3>How do I use sia_exporter?</h3><p>Sia_exporter is a command-line tool and should be ready to use straight out of the box for most users.</p><pre>$&gt; ./sia_exporter<br>INFO[0000] Beginning to metrics at http://&lt;your ip address&gt;:9983/metrics</pre><p>Once you’ve got sia_exporter running you can start adding metrics to Grafana. Metrics are organized by Sia modules. Adding charts, graphs, and alerts are as simple as point and click!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*_bD613quPNz0rVBwXUpevA.png" /><figcaption>Metrics are organized by Sia modules</figcaption></figure><p>For more advanced users sia_exporter does have a number of command-line flags to turn functionality on/off, adjust options, and access a remote Sia instance.</p><pre>$&gt; ./sia_exporter -h<br>Usage of ./sia_exporter:<br>  -address string<br>        Sia&#39;s API address (default &quot;127.0.0.1:9980&quot;)<br>  -agent string<br>        Sia agent (default &quot;Sia-Agent&quot;)<br>  -debug<br>        Enable debug mode. Warning: generates a lot of output.<br>  -modules string<br>        Sia Modules to monitor (default &quot;cghmrtw&quot;)<br>  -port int<br>        Port to serve Prometheus Metrics on (default 9983)<br>  -refresh int<br>        Frequency to get Metrics from Sia (minutes) (default 5)</pre><h3>Troubleshooting and installation details</h3><p>Verify that sia_exporter is gathering metrics and serving them over HTTP. This step verifies that sia_exporter is working as expected. Make sure you enter your private IP address of the node running sia_exporter wherever &lt;your ip address&gt; is shown.</p><pre>$&gt; curl -s <a href="http://localhost:9983/metrics">http://&lt;your ip address&gt;:9983/metrics</a><br># HELP consensus_difficulty Consensus difficulty<br># TYPE consensus_difficulty gauge<br>consensus_difficulty 1.8213302339204035e+18<br># HELP consensus_height Consensus block height<br># TYPE consensus_height gauge<br>consensus_height 229577<br># HELP consensus_module_loaded Is the consensus module loaded. 0=not loaded.  1=loaded<br># TYPE consensus_module_loaded gauge<br>consensus_module_loaded 1<br># HELP consensus_synced Consensus sync status, 0=not synced.  1=synced<br># TYPE consensus_synced gauge<br>consensus_synced 1<br><br>... truncated</pre><p>This guide does not cover installing <a href="https://prometheus.io/docs/introduction/first_steps/">Prometheus</a> or <a href="https://grafana.com/grafana/download">Grafana</a> but both projects have excellent installation guides on their websites. The rest of the instructions assume you have Prometheus and Grafana installed and working.</p><p>Configure your prometheus.yaml file to scrape the new sia_exporter metrics. Below is a sample prometheus.yaml file scraping a single sia_exporter endpoint. Don’t forget to change the IP address to the IP address of the node running sia_exporter.</p><pre>$&gt; cat /etc/prometheus/prometheus.yaml<br>global:<br>        scrape_interval: 300s</pre><pre>scrape_configs:<br>        - job_name: &#39;sia_exporter&#39;<br>          metrics_path: /metrics<br>          static_configs:<br>                  - targets: [&#39;&lt;your ip address&gt;:9983&#39;]</pre><p>Now log in to the Prometheus and verify its successfully scraping the sia_exporter metrics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0pgYKj9dGG1Ca3xJn74PrQ.png" /><figcaption>Prometheus is successfully scraping sia_exporter</figcaption></figure><p>Now log in to Grafana and start creating panels, dashboards, alerts, and acting on your new Sia metrics!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3jvd0yPWxeT5lXqsvRUO7g.png" /><figcaption>An example Wallet Dashboard</figcaption></figure><h3>Example use cases</h3><p>Prometheus is designed to scrape thousands of endpoints quickly if you have multiple Sia instances running in your network you can install sia_exporter on each of them and scrape them from a single Prometheus server. For example, suppose you manage 10 Sia wallets, you could easily graph the balance of all 10 wallets on a single chart, and send an email alert when the balance gets too low on any single wallet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*reCxMRMa_tAu16r7yLDEVw.png" /><figcaption>Alert Example, send me an email when Wallet balance is below 1000 SC</figcaption></figure><p>Suppose you have 100 Sia instances and want to ensure they all have the correct block height, simply set up sia_exporter for all 100 Sia instances and graph the block height. Turn the chart red or send an alert if one of the block heights is different than the others.</p><p>Grafana also integrates seamlessly with alerting tools such as PagerDuty, and AlertManager for more advanced alert use cases. It also offers cool features such as “kiosk” mode to keep your favorite dashboards on display in a public way. Got an extra tablet lying around, set it up to display your Sia status, wallet balance, free space, number of uploaded files, etc.</p><h3>Like what you see? Want to see more?</h3><p>Contribute by <a href="https://github.com/tbenz9/sia_exporter/issues/new">opening a ticket</a> or <a href="https://github.com/tbenz9/sia_exporter/pulls">pull request</a>, letting me know in the comments section below, on reddit at /u/tbenz9 or mentioning me in the <a href="https://discord.gg/sia">Sia Discord</a> at @tbenz9#2796.</p><p>Huge thanks to Discord user GuzmanPintos for helping me create the Grafana Dashboards!</p><p>Beer money — Siacoin: f63f6c5663efd3dcee50eb28ba520661b1cd68c3fe3e09bb16355d0c11523eebef454689d8cf</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AEjhSf6fboPC9ySWwUG3Vw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6bb3efd47704" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Siasync Version 1.0.1-beta release]]></title>
            <link>https://medium.com/@tbenz9/siasync-version-1-0-1-beta-release-2b8de793547a?source=rss-d214c8ebb434------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b8de793547a</guid>
            <category><![CDATA[decentralization]]></category>
            <category><![CDATA[siacoin]]></category>
            <category><![CDATA[ia]]></category>
            <category><![CDATA[cloud-storage]]></category>
            <dc:creator><![CDATA[Thomas Grant Bennett]]></dc:creator>
            <pubDate>Wed, 21 Aug 2019 14:16:01 GMT</pubDate>
            <atom:updated>2019-08-21T14:16:01.228Z</atom:updated>
            <content:encoded><![CDATA[<p>Siasync is a utility that will monitor a folder and synchronize its contents to the Sia network. As new files are created or removed it will keep Sia in sync with the local source folder. Siasync also supports more advanced features like only syncing certain file extensions, or excluding certain file extensions, or archive mode which won’t delete files from Sia even if they are deleted locally. Best of all, it works on Windows, MacOS, and Linux.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-vMCbCqYaAEk7tE10-djSA.png" /><figcaption>Siasync Logo</figcaption></figure><h3>What’s new?</h3><p>The new -sync-only flag allows you to perform a one-time sync of a folder and close Siasync when completed. Previously, Siasync would continue to monitor a folder indefinitely for changes. The default behavior is still to monitor a folder for changes, please let me know in the comments below if you&#39;d like to see this default behavior changed.</p><p>When Siasync runs it performs a checksum of each file it’s monitoring, this checksumming can take a long time and consume a lot of CPU power if you have many or large files. Now you can skip the checksum and tell Siasync to compare filenames and filesizes only. Use the -size-only flag to compare files base on filename and file size instead of checksum value.</p><p>The -dry-run flag was added. This allows you to view what Siasync would do, without actually making any changes to Sia or incurring any costs associated with uploading files.</p><p>The -data-pieces and -parity-pieces flags were added allowing you to manually specify the reed-solomon breakdown of files and modify the file redundancy on the Sia network. This feature was technically released with v1.0.0-beta.2 but was not documented until now.</p><p>The -debug flag now gives much better debug messages that can hopefully help you troubleshoot issues or generate better support tickets.</p><p>Siasync will now delete files from the Sia network is they are not present in the local folder. This behavior can be overwritten with the -archive flag which tells Sia not to delete anything, ever. If you’re not sure how this affects your use case I encourage you to try the -dry-run flag to see exactly what Siasync will do. Siasync will never delete files that are on your local computer, but it may delete files on the Sia network if it detects they were deleted locally and the -archive flag is not used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dVeMZ6CSteLoEb4XqLxecA.gif" /></figure><h3>Where do I get Siasync and how do I use it?</h3><p>Siasync Binaries can be found on <a href="https://github.com/tbenz9/siasync/releases">Github</a>. Simply download the relevant binary, rename it to Siasync (Siasync.exe for Windows) and execute it in your operating systems’ command line utility.</p><p>More detailed usage instructions can be found on my <a href="https://medium.com/@tbenz9/introducing-siasync-27452e90682f">Introducing Siasync</a> blog post!</p><h3>Thanks to the GitHub contributors!</h3><p>The vast majority of these changes and updates are the hard work of GitHub user opendba who implemented them without payment, recognition, or being asked. This release would not have been possible without you!</p><p>Also, special thanks to Sia team member Luke Champine who implemented the data-pieces and parity-pieces flags in response to a community request for the feature.</p><p>Feature requests, suggestions, and comments are welcome! Please reach out to me if you’d like to get involved or have any ideas on how to make Siasync more useful.</p><h3>Like what you see? Want to see more?</h3><p>Contribute by <a href="https://github.com/tbenz9/siasync/issues">opening a ticket</a> or pull request, letting me know in the comments section below, on reddit at /u/tbenz9 or mentioning me in the Sia Discord at @tbenz9#2796.</p><p>Beer money — Siacoin: f63f6c5663efd3dcee50eb28ba520661b1cd68c3fe3e09bb16355d0c11523eebef454689d8cf</p><p><em>Originally published at </em><a href="https://gist.github.com/eb2f719208eff23011e8ee8c28b9f14e"><em>http://github.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b8de793547a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Siasync By Example]]></title>
            <link>https://medium.com/@tbenz9/siasync-by-example-de364eefc266?source=rss-d214c8ebb434------2</link>
            <guid isPermaLink="false">https://medium.com/p/de364eefc266</guid>
            <category><![CDATA[ia]]></category>
            <category><![CDATA[cloud-storage]]></category>
            <category><![CDATA[siacoin]]></category>
            <dc:creator><![CDATA[Thomas Grant Bennett]]></dc:creator>
            <pubDate>Wed, 29 May 2019 15:01:02 GMT</pubDate>
            <atom:updated>2019-05-29T15:01:02.348Z</atom:updated>
            <content:encoded><![CDATA[<p>Siasync is a new utility that will monitor a folder and synchronize its contents to the <a href="https://sia.tech/">Sia</a> network. As new files are created or removed it will keep Sia in sync with the local source folder. Siasync also supports more advanced features like only syncing certain file extensions, or excluding certain file extensions, or archive mode which won’t delete files from Sia even if they are deleted locally. Siasync works on Windows, MacOS, and Linux.</p><p>Read more about Siasync <a href="https://medium.com/@tbenz9/introducing-siasync-27452e90682f">here</a>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P1B5HV5Wsx473IBOLQe8Vg.gif" /><figcaption>Siasync doing its thing!</figcaption></figure><h3>Logrotate Use Case</h3><p>One of my favorite use cases for Siasync is to use it in tandem with Linux’s Log Rotate utility. <strong>Logrotate</strong> is a utility designed for administrators who manage servers producing a high volume of log files to help them save some disk space as well as to avoid a potential risk making a system unresponsive due to the lack of disk space. Logrotate is excellent, but what if you need to archive your logs for a long time. Siasync to the rescue!</p><pre>#&gt; Siasync -archive -include gz,zip,1, -subfolder logs /var/log/</pre><p>Once a log file gets large, Logrotate will zip it up into a gz archive creating filenames like syslog.2.gz and auth.log.3.gz. By using the -include gz flag with Siasync we can tell Siasync to only upload zipped logs to Sia. This way we aren’t constantly uploading active log files to Sia, only once they’ve been zipped and compressed by Logrotate do we upload them.</p><p>The -archive flag tells Siasync that even if the archived logs are deleted from the server, keep them on Sia. We’ve now created a secure, distributed and inexpensive indefinite term Logrotate solution on Sia!</p><p><em>Note: By default Logrotate will often reuse filenames as it rotates logs, this can sometimes cause problems on Sia, I recommend you attach a timestamp to each log file so it has a unique filename.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cBhqqJ8nOxsAcs41vIch3w.gif" /></figure><h3>Security Camera Footage Use Case</h3><p>A few weeks ago <a href="https://www.reddit.com/r/siacoin/comments/brr0xs/a_rudimentary_guide_how_to_automatically_store/">I published an example</a> of how I record the camera feed from the security cameras in my house into 15 minute chunks and upload them to Sia. This solution required that Sia be active and running if I wanted my footage to be uploaded to Sia. With Siasync I can now have my camera footage saved locally, and synced to Sia, providing a more robust, performant backup solution.</p><pre>#&gt; Siasync -archive -include mp4 -subfolder camfootage /tmp/cam1</pre><p>Siasync will automatically detect any new mp4 files saved in /tmp/cam1 or its subfolders and upload them into a folder named “camfootage” on Sia. Using this method I could run Siasync once a week and have it upload the last weeks footage to Sia for archiving.</p><h3>Media Backups Use Case</h3><p>Of course Siasync can be used to keep a local folder 100% in sync with Sia. Suppose you wanted to backup your photos to Sia, but as you delete bad photos you want them to also be deleted from Sia. This is super simple with Siasync.</p><pre>#&gt; Siasync -subfolder photos /home/tbenz9/photos/</pre><p>Siasync will upload any new files as they appear, and delete any files from Sia when they are removed. The -subfolder flag is optional and simply tells Siasync what folder to use on the Sia network. If -subfolder isn’t set, it will upload the files into the “siasync” folder.</p><h3>Conclusion</h3><p>This is just a few ideas of how I’m using Siasync today, please let me know in the comments below how you plan to use Siasync and what your experience has been!</p><h3>Like what you see? Want to see more?</h3><p>Contribute by <a href="https://github.com/tbenz9/siasync/issues">opening a ticket</a> or <a href="https://github.com/tbenz9/siasync/pulls">pull request</a>, letting me know in the comments section below, on reddit at /u/tbenz9 or mentioning me in the <a href="https://discord.gg/sia">Sia Discord</a> at @tbenz9#2796.</p><p>Beer money — Siacoin: f63f6c5663efd3dcee50eb28ba520661b1cd68c3fe3e09bb16355d0c11523eebef454689d8cf</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tIHMwmPIwC-vCzNJCWtWCQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de364eefc266" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Siasync]]></title>
            <link>https://medium.com/@tbenz9/introducing-siasync-27452e90682f?source=rss-d214c8ebb434------2</link>
            <guid isPermaLink="false">https://medium.com/p/27452e90682f</guid>
            <category><![CDATA[cloud-storage]]></category>
            <category><![CDATA[siacoin]]></category>
            <category><![CDATA[ia]]></category>
            <dc:creator><![CDATA[Thomas Grant Bennett]]></dc:creator>
            <pubDate>Wed, 29 May 2019 15:01:02 GMT</pubDate>
            <atom:updated>2019-06-22T19:07:29.273Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tIHMwmPIwC-vCzNJCWtWCQ.png" /><figcaption>Siasync Logo — in all its glory</figcaption></figure><p><a href="https://github.com/tbenz9/siasync">Siasync</a> is a new utility that will monitor a folder and synchronize its contents to the Sia network. As new files are created or removed it will keep Sia in sync with the local source folder. Siasync also supports more advanced features like only syncing certain file extensions, or excluding certain file extensions, or archive mode which won’t delete files from Sia even if they are deleted locally. Best of all, it works on Windows, MacOS, and Linux.</p><h3>Sounds Awesome, where do I get it?</h3><figure><a href="https://github.com/tbenz9/siasync/releases/download/1.0.0-beta.2/Siasync-windows-amd64.exe"><img alt="" src="https://cdn-images-1.medium.com/max/128/1*6tnFx95LDwO5nNpNQ5MvGw.png" /></a></figure><figure><a href="https://github.com/tbenz9/siasync/releases/download/1.0.0-beta.2/Siasync-darwin-amd64"><img alt="" src="https://cdn-images-1.medium.com/max/128/1*yzFpZ3yxUQga-ktBkdqApw.png" /></a></figure><figure><a href="https://github.com/tbenz9/siasync/releases/download/1.0.0-beta.2/Siasync-linux-amd64"><img alt="" src="https://cdn-images-1.medium.com/max/128/1*1h4vKblWDIiwWkoPDb9Aaw.png" /></a></figure><p>Siasync binaries can be found on <a href="https://github.com/tbenz9/siasync/releases">Github</a> or by <strong>clicking the icon to the left</strong>. To install, just download the binary for your operating system and run it in your preferred command line utility.</p><p>Siasync works on Windows, MacOS, and Linux, but it is a command line only tool, you’ll have to run it from your operating systems’ command line. That’s the <em>command prompt</em> for you Windows people, and Terminal for you MacOS and Linux wizards. Simply download the Binary by clicking on your operating system icon above and rename the file to Siasync or Siasync.exe (if you’re on Windows).</p><h3>Siasync Usage</h3><p><em>Siasync assumes that you already have a running </em><em>siad daemon and are ready to upload files. Siasync does some basic checking of the allowance and contracts to ensure it can upload, but it does not resolve any issues it finds with your wallet or contracts. If you’re not sure how to run Sia and form storage contracts check out </em><a href="https://blog.sia.tech/a-guide-to-sia-ui-v1-4-0-7ec3dfcae35a"><em>this blog post</em></a><em>.</em></p><p>The most basic way to use Siasync is to have it stay 100% in sync with a local folder.</p><pre>#&gt; Siasync /tmp/foo</pre><p>That will keep the local folder /tmp/foo synced to Sia. As new files and folders are created they will be uploaded to Sia, as files and folders are deleted they will be removed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZT_k-7-dFtSmSJ772vR4LQ.gif" /></figure><p>Now let’s get fancy!</p><pre>#&gt; Siasync -include jpg,jpeg,gif,png,raw -archive true -address 127.0.0.1:4280 -subfolder demo -password &lt;your-api-password&gt; /tmp/foo/</pre><p>Let’s break down this command one argument at a time:</p><p>-include jpg,jpeg,gif,png,raw — Only files with jpg, jpeg, gif, png, or raw file extensions will be synced. All other files will be ignored. More information on this flag and the -exclude flag can be found in this <a href="https://medium.com/@tbenz9/crazy-log-retention-rules-siasync-saves-the-day-again-de364eefc266">Siasync case study</a>.</p><p>-archive true — Never delete files from Sia, even if they are deleted locally.</p><p>-address 127.0.0.1:4280 — Use the Sia daemon running at 127.0.0.1:4280 instead of the default 127.0.0.1:9980.</p><p>-subfolder demo — Sync the files to the “demo” folder on Sia, instead of the default “siasync” folder. Siasync will create the “demo” folder if it doesn’t exist. You can see the files with siac renter ls /demo/.</p><p>-password &lt;your-api-password&gt; — Use your API password instead of whatever API password Siasync was able to find. Siasync checks the default Sia locations and environment variables for API passwords.</p><p>/tmp/foo/ — The local folder you want synced to Sia.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fe2r-jWu2AfhYPv9ujcVgg.gif" /></figure><h3>What? Even More Features?</h3><p>Yup, Siasync has a few more features, and a few Easter Eggs for you to find. You can view the complete list of flags from Siasync itself.</p><pre>#&gt; Siasync -h<br>usage: siasync &lt;flags&gt; &lt;directory-to-sync&gt;<br>  for example: ./siasync -password abcd123 /tmp/sync/to/sia</pre><pre>-address string<br>        Sia&#39;s API address (default &quot;127.0.0.1:9980&quot;)<br>  -agent string<br>        Sia agent (default &quot;Sia-Agent&quot;)<br>  -archive<br>        Files will not be removed from Sia, even if they are deleted locally<br>  -exclude string<br>        Comma separated list of file extensions to skip, all other files will be copied.<br>  -include string<br>        Comma separated list of file extensions to copy, all other files will be ignored.<br>  -password string<br>        Sia&#39;s API password<br>  -subfolder string<br>        Folder on Sia to sync files too (default &quot;siasync&quot;)</pre><p>Think Siasync is missing a feature? Feel free to <a href="https://github.com/tbenz9/siasync/issues">open a ticket</a> or <a href="https://github.com/tbenz9/siasync/pulls">pull request</a>. You can also reach me on the <a href="https://discord.gg/sia">Sia Discord</a> with @tbenz9#2796.</p><h3>Wasn’t Siasync already a thing?</h3><p>Eh, sorta, but not like this. Siasync was once a project maintained by Sia core developer Ava Howell. Unfortunately, <a href="https://github.com/avahowell/siasync">Ava’s version of Siasync</a> hasn’t been maintained for 2 years, doesn’t work with current versions of Sia, and doesn’t have any of the wicked-awesome features this one has. It was time to fork, renew, and improve the Siasync code; which is precisely what I’ve done. Thanks to Ava for giving me an excellent foundation to build something awesome!</p><h3>Like what you see? Want to see more?</h3><p>Contribute by <a href="https://github.com/tbenz9/siasync/issues">opening a ticket</a> or <a href="https://github.com/tbenz9/siasync/pulls">pull request</a>, letting me know in the comments section below, on reddit at /u/tbenz9 or mentioning me in the <a href="https://discord.gg/sia">Sia Discord</a> at @tbenz9#2796.</p><p>Beer money — Siacoin: f63f6c5663efd3dcee50eb28ba520661b1cd68c3fe3e09bb16355d0c11523eebef454689d8cf</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tIHMwmPIwC-vCzNJCWtWCQ.png" /><figcaption>Yup, same image as before</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27452e90682f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Securing Sia wallets, renter, and hosts]]></title>
            <link>https://medium.com/@tbenz9/securing-sia-wallets-renter-and-hosts-17a020d8b86b?source=rss-d214c8ebb434------2</link>
            <guid isPermaLink="false">https://medium.com/p/17a020d8b86b</guid>
            <category><![CDATA[siacoin]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Thomas Grant Bennett]]></dc:creator>
            <pubDate>Tue, 09 Apr 2019 21:24:44 GMT</pubDate>
            <atom:updated>2019-04-10T17:26:13.579Z</atom:updated>
            <content:encoded><![CDATA[<h3>Securing Sia wallets, renters, and hosts</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y-oV73k0tpiSAg-eZUY2Hw.jpeg" /></figure><h3>How to run a secure Sia wallet and renter:</h3><p><em>The default configuration for Sia is secure</em>. <em>As long as your seed and wallet-unlock password are secure, Sia, in its default configuration, is considered secure as well.</em></p><p>In some cases Sia will use a randomly generated API password. The API password is meant for different types of programs (such as Duplicati, siac, and Sia-UI) to interact securely with the Sia daemon. If you’re using Sia-UI this is completely automatic and secure, no additional configuration is required.</p><p>Running siad with the --authenticate-api=false flag is less secure, but still a pretty small attack surface since siad, by default, only responds to commands from localhost. This flag tells siad to accept any valid command from localhost, even if they don’t have the API password.</p><p>Running siad with the authenticate-api=false and --disable-api-security is considered <strong>DANGEROUS</strong>. This means that any host who can communicate with siad can start passing it instructions. A malicious user could attempt to brute-force your seed, upload files, download files, and change some settings on your renter or host. If the malicious user still does not know your seed they cannot unlock your wallet, or performs any actions requiring an unlocked wallet such as transferring Siacoin or Siafunds.</p><p>Sia needs an unlocked wallet to perform many renting and hosting actions such as renewing contracts and paying collateral. Since an unlocked (a.k.a hot) wallet is more risky than a locked wallet it’s best practice to keep only as much Siacoin as needed in an unlocked wallet. All other Siacoin should go in a wallet that stays locked and only transferred into the hot wallet when needed.</p><p><em>Keep your seed safe! And when in doubt keep Sia running in its default configuration.</em></p><h3>How to run a secure Sia host:</h3><p>Running a Sia host requires additional configuration and therefore is inherently more risky. Most host configurations require you to open 2 ports on your firewall (or port-forward if you’re behind a NAT).</p><p>Port <strong>9981</strong> is the gateway port. It’s used to connect with other Sia peers in a peer-to-peer decentralized way.</p><p>Port <strong>9982</strong> is the host port. It’s used to accept host related RPC calls such as form contract, scan host, etc.</p><p><strong>Warning</strong>: Port <strong>9980</strong> is the API port and under most circumstances should <strong>NOT</strong> be open (or forwarded). This port exists for other applications (such as siac) to communicate with siad on the same localhost. <em>Do not open this port unless you have a specific, valid, reason for doing so.</em></p><p>Since each user’s process for configuring their firewall and/or router is different I won’t go into details here, but feel free to reach out via the <a href="https://discordapp.com/invite/sia">Sia Discord</a> if you need help with any particular aspect of securing your host.</p><p>As usual, it’s best practice to run your Sia host with traditional security considerations in mind. Remember that Sia can read, write and execute files on your filesystem. Use traditional security measures such as file permissions, limited user accounts, and antivirus software to limit the attack surface Sia has exposed.</p><h3>How to run a super secure, offline Sia wallet:</h3><p>1: Sia has an unofficial cold-wallet that can be used to generate a new seed, and wallet addresses. You can send Siacoin and Siafunds to this wallet without ever connecting to the Internet or syncing the blockchain.</p><p><a href="https://github.com/avahowell/sia-coldstorage/releases">avahowell/sia-coldstorage</a></p><p>2: Sia supports the Ledger Nano S hardware wallet. <a href="https://support.sia.tech/article/1tteqxvgh0-sia-ledger">https://support.sia.tech/article/1tteqxvgh0-sia-ledger</a></p><h3>Donations:</h3><ul><li>Tbenz9 Siacoin address: f63f6c5663efd3dcee50eb28ba520661b1cd68c3fe3e09bb16355d0c11523eebef454689d8cf</li><li>Sia developers Siacoin address: e68b2c8e7a1e1c28782f70a62630bb8d1b480b49dbce422eafbb338de17eb00453918618bbd3</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17a020d8b86b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sia version 1.4.0 at a glance]]></title>
            <link>https://archive.sia.tech/sia-version-1-4-0-at-a-glance-fe07d1b216b9?source=rss-d214c8ebb434------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe07d1b216b9</guid>
            <category><![CDATA[cloud-storage]]></category>
            <category><![CDATA[ia]]></category>
            <category><![CDATA[siacoin]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Thomas Grant Bennett]]></dc:creator>
            <pubDate>Tue, 12 Mar 2019 04:08:13 GMT</pubDate>
            <atom:updated>2019-04-02T22:45:11.617Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Note from the Sia Team: this is a guest post from </em><a href="https://medium.com/u/d214c8ebb434">Thomas Grant Bennett</a>, <em>a Sia community contributor. Thank you Thomas for your contribution!</em></p><p>Sia version 1.4.0 is the most significant release since Sia’s public launch in 2015. It is significant in terms of lines of code added, removed, and modified, the number of community contributions, API changes, and new features introduced. This article is focusing on some of the front-end and back-end changes, why they are important, and how they fit into the greater Sia vision. This is not a deep dive into any specific feature, and should not be considered a comprehensive list of all changes introduced in the Sia v1.4.0 release. Let’s get started!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*GzZCkDx3hVlk9pHQKgRwzw.png" /><figcaption>The Official Sia 1.4.0 (Draco) Logo</figcaption></figure><h3>New .sia file format</h3><p>The new .sia file format is a monumental change in the Sia code. This new file format is the first step to eliminating many of Sia’s roadblocks to incredibly important features such as seed-based file recovery, sharing of files, partial uploads and downloads, scaling past 5TB of user data, scaling to tens of thousands of files/user, improved upload and download bandwidth, reduced RAM usage, and more. The full effect of the new .sia file format will be proven in future releases, but Sia version 1.4.0 sets the stage for these features to become a reality.</p><p>The new .sia file format uses binary blobs to store metadata about a user’s files that have been uploaded to the Sia network. Historically, the .sia files used simple JSON encoding of the metadata; while this made it very easy to manage, it had many limiting consequences. When a change is made to a JSON file the entire file has to be read, modified, and written to disk. The I/O requirements of opening, reading, and re-writing the JSON files became a major bottleneck in Sia’s performance. By using binary blobs Sia can now update portions of the .sia files without reading and writing the entire file. This new workflow dramatically reduces the I/O requirements for modifying .sia files.</p><p>By reducing the I/O requirements of reading, writing, and modifying the .sia files Sia can do things more efficiently. It can repair files faster, fetch files faster, get portions of files (important for things such as seeking in a video stream), handle more simultaneous uploads and downloads, and reduce the system load. The reduced I/O requirements will enable Sia to scale much larger than previously possible. Exactly how high Sia will scale remains to be proven, but I’m sure the “<a href="https://www.reddit.com/r/siacoin/comments/8ujl4n/introducing_the_sia_test_app_community/">Sia Test App Community</a>” (STAC) will be running version 1.4.0 through its test suite giving us some basic benchmarks.</p><p>The new .sia file format introduces new metadata fields. Sia can now keep track of created, modified, and accessed timestamps in addition to filesize on files uploaded to the Sia network similar to a what you might expect from a Linux stat command.</p><p>The new .sia file format enables Threefish cipher support. Threefish is an encryption cipher that is significantly less CPU intensive than Twofish, which Sia used prior to 1.4.0. This means that users who have historically been CPU bound while uploading and downloading files will see much better performance in the 1.4.0 release. Threefish also enables uploaded files to be partially modified without re-uploading the entire file. The uploaded file modification feature will be released sometime after 1.4.0 but the groundwork for that feature is available with the 1.4.0 release.</p><p>Sia now stores its .sia files in a new directory tree, which cleans up the Sia installation directory, this has no impact to most end-users but makes the entire Sia installation cleaner. Sia no longer stores any .sia files in memory. This should cut down on .sia file corruption during unexpected power loss, and reduce the memory requirements for running Sia with a large number of files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kqJ7IIdwVMCEgPcG3TuhkQ.png" /><figcaption>Sia 1.4.x“Draco” release fan art</figcaption></figure><h3>Host blacklist and whitelist feature</h3><p>Sia version 1.4.0 introduces host blacklist and whitelist features. This enables a user to pass Sia a list of hosts to use (whitelist), or avoid (blacklist). This is significant because it will enable users to restrict their data to a set of specified hosts instead of letting Sia decide which hosts to use. One possible use case for this feature is to keep your data on the Sia network within a specific geographic region. For example, if you want your data to only use hosts within North America you could whitelist all available hosts located in North America. With the 1.4.0 release, this feature is only available through the API, although several community developers are working on interfaces to make the host blacklist and whitelist features more accessible to non-technical users and help with the host selection and API commands. More information and use cases about this feature will be coming out in the coming weeks.</p><h3>Better directory support</h3><p>Sia version 1.4.0 introduces new directory functionality. Users can now create empty directories, query Sia for the contents of an individual directory, and delete entire directory trees in a single command. As users scale to thousands of files they will be able to manage them while maintaining performance given the new directory tree hierarchy. Additional features with directory level support will also be added in upcoming releases.</p><p>In addition to the user-facing improvements of better directory support, the Sia daemon will also manage file repairs on a directory level and report file health at the directory level. This will enable more efficient file repairs, and allow a user to more easily see which files are being repaired at any time.</p><h3>Contract recovery</h3><p>Sia users can now restore their files from a backup of the renter folder. This release marks the first step towards a true seed based file recovery which has long been touted as the biggest feature missing in Sia. More information will be posted as this feature matures.</p><p>New API endpoints and siac commands have been added to facilitate easy backups of the renter folder and contract recovery from the consensus. With Sia’s new contract and renter folder backup functionality it should be trivial to back up and restore files automatically in the event of hardware failure.</p><p>One possible use case would be to keep Sia’s renter folder backed up to a flash drive, in the event your computer stopped working you would be able to restore all your files with just your seed and the flash drive backup. In a future release, Sia will automatically back up the renter folder to the Sia network enabling seed based file recovery.</p><h3>Host score improvements</h3><p>Many aspects of the host score have changed, I’ll mention a few of the key pieces here. The host scoring algorithm is now simplified and centralized in the Sia code. Historically a host was scored slightly differently depending on where in the code it was being accessed. Now there is a single point at which the host receives its score and that score is preserved and passed throughout the rest of the Sia modules.</p><p>The host scoring algorithm itself has changed, host collateral now weighs more heavily in the host score, and a host’s IP address now has weight in the host score. Multiple hosts with the same IP address will be penalized thereby reducing the effectiveness of “hosting farms” and dramatically reducing the chance of a <a href="https://en.wikipedia.org/wiki/Sybil_attack">Sybil attack</a> against the Sia network. The host’s age has less weight, and the minimum storage requirements have been relaxed.</p><h3>New RPC structure</h3><p>The RPC (remote procedure call) structure in Sia has been revamped. Sia uses RPCs to facilitate communication between renters and hosts making RPCs a critical piece of the Sia code. Most users won’t notice a difference on this back-end functionality but I thought it was important to mention since it makes Sia more performant, secure, and is necessary for some important new features. All necessary RPC calls are now encrypted, simplified, and optimized for performance. In addition to being more secure and performant, Sia also added new RPC calls that will enable new features such as partial file downloads (more about that in the next section) and seed based file recovery (expected in version 1.4.2).</p><h3>File streaming</h3><p>Sia has supported some rudimentary download streaming (most commonly used in video streaming) since the 1.3.5 release. With 1.4.0 Sia now supports more robust download streaming (aka partial downloads) and host upload streaming.</p><p>Partial downloads are being released in 2 steps:</p><ul><li>Step 1: Hosts will need to install version <strong>1.4.0</strong> which includes the RPCs required for hosts to support partial downloads.</li><li>Step 2: Renters will be able to take advantage of partial downloads starting with version <strong>1.4.1</strong>. This two-step rollout is required so that renters are not trying to perform partial downloads from hosts that do not have the required RPCs.</li></ul><p>Upload streaming will enable developers to be more efficient about uploading data to the Sia network. One possible use case for upload streaming is to stream a security camera feed to the Sia network for safekeeping without having to split the feed into individual files before upload.</p><p>More details and demonstrations will be released with 1.4.1 since that is when most users will be able to take advantage of the streaming improvements.</p><h3>Revamped User Interface</h3><p>The Sia-UI has been completely revamped by the Sia team. Users of the UI will notice a much cleaner interface that adheres to the Sia branding. New animations, bug fixes, and some new functionality have been added as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p07dFzR7wNkd9KpFZs1keQ.png" /><figcaption>Screenshot of the new Sia-UI</figcaption></figure><p>Sia-UI is intended to be an easy to use implementation of Sia that supports most common use cases. The Sia API offers more advanced Sia functionality and greater control over how Sia handles your files.</p><h3>Miscellaneous improvements</h3><ul><li>Audit of bootstrap nodes: All Sia bootstrap nodes are now on version 1.3.7 or higher.</li><li>Revamped API documentation: Official API documentation now lives at <a href="https://sia.tech/docs">https://sia.tech/docs</a>.</li><li><a href="http://support.sia.tech/article/1tteqxvgh0-sia-ledger">Ledger Nano S Support</a>: Sia released an official Ledger Nano S app.</li><li><a href="https://sia.tech/docs/#gateway-post">Gateway rate limit</a>: You can now control the rate at which the gateway module serves data to its peers.</li><li><a href="https://www.reddit.com/r/siacoin/comments/9vmvff/introducing_the_new_verifyseed_feature_in_sia_for/">Seed sanity checks</a>: If your seed fails Sia will attempt to tell you what is wrong with it.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe07d1b216b9" width="1" height="1" alt=""><hr><p><a href="https://archive.sia.tech/sia-version-1-4-0-at-a-glance-fe07d1b216b9">Sia version 1.4.0 at a glance</a> was originally published in <a href="https://archive.sia.tech/">The Sia Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>