Some things to know about the Sia Skynet network.
This guide will help you get started on the Sia Skynet network. The guide is writting using Sia v1.4.8 with examples for Windows. The instructions provided should apply to the Sia-UI on all major operating systems. This guide mainly focuses on using Skynet through your own Sia-UI for uploading and pinning files, but it also contains information on using public Skynet Portals to upload files.
There are a few things you may want to know about before you utilize Skynet. If you haven't yet, we'd also recommend reading through our Skynet section to learn more about what Skynet is and the basics of how it works. It's important to understand Skylinks and Portals, and how they interact.
Ready to get started? Read on!
The following items may need to be completed before you can continue.
You must first install the Sia-UI Client, create a wallet, and wait for your client to fully synchronize. If you haven't done this yet, instructions on downloading the Sia-UI Client and setting up a wallet can be found in our Wallet Setup Guide.
You'll need some Siacoins to rent storage on the Sia (Skynet) network. Instructions on buying Siacoins can be found in our Guide to Buying Siacoins.
To upload or pin files to Skynet, you'll need to set up your Sia client as a renter. See our Guide to Renting on Sia and follow the directions. You only need to get through Step 4 of the renting guide, where contracts form and you're ready to upload data - then you can continue below to upload data via Skynet instead of as a normal renter.
Before you continue, make sure you've taken care of these steps first if they apply.
All set on the prerequisites? Let's get started!
If you're looking for a particular way to use Skynet, you can jump to a section using the buttons here. Otherwise, simply read through the entire guide to learn about the different ways to interact with Skynet.
You can use a local Sia client to upload new files to Skynet, and get Skylinks to share them with others.
Go To SectionYou can convert your existing Sia renter files to Skynet files, and get Skylinks to share them with others.
Go To SectionYou can use public Skynet Web Portals to upload files to Skynet for free.
Go To SectionYou can use a Skynet Web Portal to download the contents of a Skylink for free.
Go To SectionYou can re-pin existing Skynet files and Skylinks to make sure the content stays online.
Go To SectionYou can operate a Skynet Portal or Skynet Web Portal to ensure your content is accessible.
Go To SectionOne way to upload files to Skynet is from your own computer running a Sia client. Uploading files to Skynet from a local Sia client will negotiate Sia contracts with hosts like normal, so you will be charged storage and upload fees as a renter, and must have Siacoins available in your wallet for such a transation. The file is basically stored the same way as a normal Sia file as far as renting is concerned - however, you will receive a Skylink that you can share with others, who can then access your content via a Skynet Portal.
Your computer doesn't need to stay online once your file is uploaded - files on Sia and Skynet are stored on Sia hosts all over the world, and can therefore be accessed at any time. You should, however, open your local Sia client once a month or so in order to ensure that your Skynet uploads are still healthy and are stored on sufficient hosts. You also need to open your local Sia instance about once a month to make sure your file contracts renew if you want your Skynet files to stay online - this is all the same as being a regular renter on Sia. See our section about Renting on Sia if you wish to review the details of how renting on Sia works.
As we mentioned above in the introduction, unfortunately as of Sia v1.4.11 and March 2021 Skynet use is limited to command line options. Skynet features have not yet been incorporated into the Sia-UI, so there is no easy way to interact with Skynet for those that want a point-and-click interface. Some methods like using the Sia-UI Terminal also don't work great, as they have some minor bugs which break terminal functionality.
That being said, there are a few ways to upload new files to Skynet using a local Sia client - select a tab below for instructions on using that method.
Click on the Terminal (>) icon at the top of Sia-UI, and type clear
and press enter first. This will clear the help text from the Terminal and make it easier to see when our upload has finished. Then, enter the command skynet upload [source] [destination]
. Replace [source] with the path to the file or folder on your local machine, and [destination] with the path and filename you want to store the file as on Skynet. For example, we'll upload a file called STV.mp4 using skynet upload G:\STV.mp4 STV.mp4
:
Uploading a file to Skynet using the Sia-UI Terminal.
Note that once we enter our upload command, the Terminal will sit unresponsive until it spits out a bunch of text after everything is finished. Once the upload is done, we'll see a bunch of text - in the screenshot above, we scrolled to the top to see the beginning of the output. Below is the end of the output:
Our upload via the Sia-UI is complete.
We need to get our Skylink in order to be able to share our file - if you're not given one, type skynet ls
into the Terminal. This will show your uploaded Skynet files and their Skylinks:
Getting a list of our Skynet uploads in the Sia-UI Terminal.
We can now use our Skylink to access our file through a Portal, i.e.https://siasky.net/AAAw8hI5sYFWrwhqi4gALaZizrfY5SE_5kVRfabbVBeFHg, and share the link with others.
siac
siac
.
We can use siac
to upload a file to Skynet. Type siac skynet upload [source] [destination]
, replacing [source] with the path to the file or folder on your local machine, and [destination] with the path and filename you want to store the file as on Skynet. For example, we'll upload a file called Skynet Test Video.mp4 using siac skynet upload "G:\Skynet Test Video.mp4" "Skynet Test Video.mp4"
:
Uploading to Skynet using a system Command Prompt window and siac
.
We'll be able to see our upload progress, and after the upload is done, our file will be pinned - we'll see "pinning" with a little indicator showing that Sia is working on it. Once it's done, we'll get a message that our file was uploaded successfully. If siac
doesn't give us a Skylink, we can type siac skynet ls
to see our uploaded Skynet files and their Skylinks:
Getting our Skylink via siac
.
We also see the file we uploaded from the Sia-UI Terminal in the first tutorial tab above. We can now use our Skylink to access our file through a Portal, i.e. https://siasky.net/AAC_cqa6GUkfIwnDSdACcpMeLUm2Stc9QZlThp34qea3vw, and share the link with others.
The Sia Daemon API can be used to upload files using a utility like curl
and a POST call. See the API documentation for complete details. We'll upload our test video using the API and the Windows Command Prompt with curl
to demonstrate. You could also use this method to integrate Skynet uploads into your own application.
The Sia Daemon needs to be running in order to use the API, so we can either start siad
manually or we can just open Sia-UI and leave it running in the background. We like less work, so we chose the Sia-UI method. Once it's running and unlocked, we can open a Command Prompt or Terminal window on our operating system - on Windows, we can open the Start menu and start typing Command Prompt, and open it from the list of results.
Then, we can use curl
to upload a file to Skynet via the Sia Daemon's API and a POST call. The general format we'll use is shown in the API documentation, so for our demonstration to upload Skynet API Test Video.mp4, we'll use:
curl -A "Sia-Agent" -u "":[apipassword] "localhost:9980/skynet/skyfile/Skynet%20API%20Test%20Video.mp4?filename=Skynet%20API%20Test%20Video.mp4" --data-binary "@G:\Skynet API Test Video.mp4"
[apipassword] must be replaced with our API password for our Sia Daemon - see this FAQ topic for more information on API authentication and where to find the password on your machine. Note that inside the POST string, spaces in the path need to be replaced with %20 or +, which is standard URL encoding for a space character.
Uploading to Skynet using a system Command Prompt window and the Sia Daemon API.
There will be no progress shown while the upload occurs, but once it completes, we should be given a JSON return containing a Skylink to the file as shown above. If we don't get a Skylink, we can use siac skynet ls
to see our uploaded Skynet files and their Skylinks (see the tutorial section above on using siac
to find the path to it on your system):
Getting our Skylink via siac
.
Now we've got three files uploaded to Skynet from all of these tutorials. We can now use our Skylink to access our file through a Portal, i.e. https://siasky.net/AADd-pHf2LFMbRgILkrxlKGw4Y06wVkEUQaXs2rA-ZMT5A, and share the link with others.
Converting Sia renter files to Skynet files can't currently be accomplished using default renter upload settings. Renter file uploads need to be uploaded with 1-of-N redundancy in order to be converted to Skynet files, which requires changing special settings when uploading files as a renter. While we could do this, currently it's easier to just upload files to Skynet directly instead of trying to change renter upload settings and then convert files.
See the section above for information on uploading files to Skynet, and in the future we'll update this section when regular renter files with default settings can be converted. The ability to convert renter files with 10-of-30 redundancy is planned for a future release, though we don't know when it will happen.
A Skynet Web Portal is essentially a website running software to interface with the Sia network, which allows users to upload or download files without needing to run a full Sia installation. Nebulous, Sia's developers, have provided a basic Skynet Web Portal which anyone can launch - so there are several free and public Skynet Web Portals available for use which are run by Sia community members wishing to contribute to the Sia and Skynet projects. For more information on Portals in general, see our Skynet page.
The default Skynet Portal implementation provides a way to upload files through a Portal's public-facing web interface. Most Portals are currently configured this way. If you upload files via a Web Portal, the Portal operator assumes the costs for storing and transferring the file. This means that the Portal operator essentially owns your file on Skynet because they are the one paying to store it. As such, files uploaded through public Portals may be allowed to expire after a certain amount of time. You may need to upload the file again, or re-pin the file and assume responsibility for the storage costs yourself if you want the file to continue to be accessible.
Uploading a file via a Skynet Portal is like uploading a file anywhere, pretty much.
To upload a file via a Skynet Portal, see our list of current Skynet Web Portals to visit any Portal, and upload your file using the upload section on the Portal's front page if the option is available. If you don't see an Upload section, try a different Portal. Uploading may take a while depending on the size of your file. Once you upload your file, you'll be given a Skylink which you can then use to access your file or share it with other people.
Here's our Skylink after our upload is complete.
Share your Skylink with others and they'll be able to access your file. You can also share just the Skylink itself, i.e. AADWLu-Tvlq5l3UdNH_1L7pw9J4hykhbR9kFd654AweeJw
in our screenshot above, and it can be accessed at any public Skynet Web Portal, not just the Portal you uploaded the content at.
Remember, your file may be allowed to expire after some amount of time, so you may want to re-pin it yourself or upload files to Skynet via your own Sia-UI if you want to make sure they stay online. Portal operators may also blacklist any Skylink they see fit, such as copyrighted or illegal content - each Portal operator has discretion over how their Portal is used. If you really need to make sure your content stays online, the best way to do so is by uploading it via your own local Sia client or re-pinning your Skylink after uploading it at a public Skynet Web Portal, and running your own Skynet Web Portal for others to download the content through where your Skylinks won't be blocked.
When a file is uploaded to Skynet, an identifier called a Skylink is generated which can be used to retrieve the file through any Skynet Portal. The Skylink can be posted or given to others, and they can then access the content through a Portal as well. You could also use Skylinks in a URL format to embed content in a website, or even to serve an entire static web site, as Skylinks have directory support.
Skylinks are easy to use - they'll usually be provided in one of two formats:
AADWLu-Tvlq5l3UdNH_1L7pw9J4hykhbR9kFd654AweeJw
, where we can visit any Web Portal and enter the Skylink to view the contentsThe Skylink in this example is from our upload demonstrations earlier in this tutorial where we uploaded various video files to Skynet. If we click the link, it starts playing our uploaded video on the SiaSky.net Web Portal. We can also visit any of the public Skynet Portals and enter our Skylink manually. Either way, our video will start playing:
Playing our video through a Skynet portal. If you recognize it, now you've got a new way to use it!
For scripting use, any Skylink may be accessed using any Portal with a default configuration by entering the Skylink ID after a Portal domain, i.e. https://siasky.net/AADWLu-Tvlq5l3UdNH_1L7pw9J4hykhbR9kFd654AweeJw - the same way Skylinks are provided to us after uploading files using a public Web Portal. These links could be used to embed content on a website, or to provide links to make it easier for others to go directly to your shared content on Skynet through a specific Portal.
Content uploaded to Sia and Skynet does not necessarily stay online forever. File storage and bandwidth on the Sia network have to be paid for by somebody, and by default most contracts to store files are only good for 3 months. When content is uploaded to Skynet via a public Web Portal, the Portal operator assumes the costs for storing the file, and so they may let the file expire after a certain amount of time (i.e. the end of the default 3 month window, or maybe even sooner). If you've found content that someone else uploaded to Skynet that you enjoy and want to keep online, you also can't be sure that they'll continue to pay to store it on Skynet indefinitely, or that they won't delete it at some point.
To address this, anyone can re-pin a Skylink if they want to take responsibility for keeping it online. As long as at least one person continues to pin a Skylink before all other storage contracts run out on the file, the file will be available on Skynet indefinitely. Once you pin a file, contracts on that file will continue to renew the same as a normal Sia renter file, so it will stay online forever if you keep an allowance for renting and continue to open your Sia client in time to renew the contracts. See our section about Renting on Sia if you wish to review the details of how renting on Sia works.
Re-pinning a Skylink must be done from a local Sia client. Like uploading to Skynet from a local Sia client, re-pinning can also only be done via the Terminal or command line, as the Sia-UI does not yet have support to easily pin files. If you re-pin somebody else's Skylink, it will be copied to your Sia renter storage and you will assume the costs for storing the file just like a normal Sia file is stored as a renter. As such, you need to be set up as a renter on the Sia network prior to pinning a Skylink, which was covered in the prerequisites at the beginning of this guide. Re-pinning a file only applies to files already on Skynet which you did not originally upload - if you want to convert your own files you uploaded as a Sia renter to Skynet files, see the section on Converting Existing Sia Renter Files to Skynet.
Select a tab below for instructions on using each method to pin a Skylink:
Click on the Terminal (>) icon at the top of Sia-UI, and type clear
and press enter first. This will clear the help text from the Terminal and make it easier to see when our upload has finished. Then, enter the command skynet pin [skylink] [destination]
. Replace [skylink] with the Skylink you want to pin, and [destination] with the path and filename you want to store the file as in your local Sia renter storage. For example, we'll re-pin the file we uploaded using a public Skynet Web Portal earlier in this guide and call it SkynetPinTestVideo.mp4 using skynet pin AADWLu-Tvlq5l3UdNH_1L7pw9J4hykhbR9kFd654AweeJw SkynetPinTestVideo.mp4
:
Re-pinning a Skylink using the Sia-UI Terminal.
Note that once we enter our pin command, the Terminal will sit unresponsive until it spits out a bunch of text after everything is finished. Once the pinning is done, we'll see a confirmation that our file was pinned, along with the same Skylink the file originally had. Now the file will stay online as long as we remain an active Sia renter, and will be accessible using the same Skylink, i.e. https://siasky.net/AADWLu-Tvlq5l3UdNH_1L7pw9J4hykhbR9kFd654AweeJw.
siac
siac
.
Type siac skynet pin [skylink] [destination]
, replacing [skylink] with the Skylink you want to pin, and [destination] with the path and filename you want to store the file as in your local Sia renter storage. For example, we'll re-pin the file we uploaded using a public Skynet Web Portal earlier in this guide and call it "Skynet Pin Test Video.mp4" using siac skynet pin AADWLu-Tvlq5l3UdNH_1L7pw9J4hykhbR9kFd654AweeJw "Skynet Pin Test Video.mp4"
:
Re-pinning a Skylink using a system Command Prompt window and siac
.
No progress will be shown while our file is re-pinned, but once it's done, we'll get a message that our file was pinned successfully, along with the same Skylink the file originally had. Now the file will stay online as long as we remain an active Sia renter, and will be accessible using the same Skylink, i.e. https://siasky.net/AADWLu-Tvlq5l3UdNH_1L7pw9J4hykhbR9kFd654AweeJw.
The Sia Daemon API can be used to re-pin Skylinks using a utility like curl
and a POST call. See the API documentation for complete details. We'll re-pin our Portal upload test video using the API and the Windows Command Prompt with curl
to demonstrate. You could also use this method to integrate Skynet re-pinning into your own application.
The Sia Daemon needs to be running in order to use the API, so we can either start siad
manually or we can just open Sia-UI and leave it running in the background. We like less work, so we chose the Sia-UI method. Once it's running and unlocked, we can open a Command Prompt or Terminal window on our operating system - on Windows, we can open the Start menu and start typing Command Prompt, and open it from the list of results.
Then, we can use curl
to re-pin our Skylink via the Sia Daemon's API and a POST call. The general format we'll use is shown in the API documentation, so for our demonstration to re-pin the file we uploaded using a public Skynet Web Portal earlier in this guide as Skynet API Pin Test Video.mp4, we'll use:
curl -X POST -A "Sia-Agent" -u "":[apipassword] "localhost:9980/skynet/pin/AADWLu-Tvlq5l3UdNH_1L7pw9J4hykhbR9kFd654AweeJw?siapath=Skynet%20API%20Pin%20Test%20Video.mp4"
[apipassword] must be replaced with our API password for our Sia Daemon - see this FAQ topic for more information on API authentication and where to find the password on your machine. Note that inside the POST string, spaces in the path need to be replaced with %20, which is standard URL encoding for a space character.
Uploading to Skynet using a system Command Prompt window and the Sia Daemon API.
No progress will be shown while our file is re-pinned, or once it's done. However, if no error is presented, the file will stay online as long as we remain an active Sia renter, and will be accessible using the same Skylink, i.e. https://siasky.net/AADWLu-Tvlq5l3UdNH_1L7pw9J4hykhbR9kFd654AweeJw.
Anyone may become a Skynet Portal operator, however it is not necessary to operate a Portal in most cases if you simply want to upload or download data on Skynet. Users wishing to upload Skynet data without running a Portal can do so with a local Sia client as explained in Uploading to Skynet Via a Local Client above, and users can also upload or download data using one of the many available public Skynet Web Portals.
There are two ways to set up a Skynet Portal: privately, either with or without a web interface, or publicly, where others can see and use your Portal. Either way, running a Portal costs about $10 per month in additional transaction fees related to Skynet contracts being made with hosts on the Sia network in order for each Portal to be able to function.
You can run a private Portal and have access to Skynet content privately. This will allow you to view the contents of Skynet and download any public Skynet data without needing to go through a public Portal. You can do this by configuring a local Sia instance to operate as a Portal (such as for use in your own applications), and you can also run the full Web Portal interface privately if you want an easy way to interact with Skynet.
To configure a Sia node to act as a Portal, you first need to configure Sia as a renter, which requires a balance of Siacoins and a renting allowance. Details on this can be found in our Guide to Renting on Sia. Note that the Skynet Web Portal setup instructions recommend certain allowance settings, which can be seen here, though these settings assume your Portal is going to upload and store a lot of data, so you may want to adjust them to your needs. Then, you can use siac
to run the command siac renter setallowance --payment-contract-initial-funding 10SC
(see this FAQ topic if you need help finding the location of siac
). This command is what sets your Sia instance to act as a Portal (or a "viewnode"), and tells it to make contracts with as many Sia hosts as it can in order to be able to view all Skynet files stored on Sia hosts.
If you want to run the Web Portal frontend, you can follow the instructions to set it up in the Skynet Webportal GitHub. If you set the Web Portal up on a local machine, it will not normally be visible to others outside of your machine. If you set the web Portal up on a public web server, make sure to configure your Portal to be private and disallow access from the general public. Configuring your Portal to be private with such a setup will not be covered here because the process will vary based on your web server or hosting provider.
Remember that content uploaded via your Portal is still public by default, even if your Web Portal is set up to be private. If the Skylink to your content is discovered, the content can be accessed by others. Additionally, Skylinks accessed using other Web Portals can be viewed by those Portal operators, so don't rely on security through obscurity, because there is a non-zero chance that your Skylinks could be viewed by others, catalogued, or even posted publicly. If you want to store content on Sia privately, you would be better off doing so as a regular Sia renter and not on Skynet.
If you wish to set up your own public Skynet Web Portal, the software and basic installation instructions can be found at https://github.com/NebulousLabs/skynet-webPortal. If you intend to operate a public Portal, you should have moderate experience with Linux and managing web or other servers, as the setup and operation of a public Web Portal is a fairly technical task. Recommended Web Portal system requirements include:
As explained above for private Portals, running a Portal involves running a regular Sia instance, as well as the Web Portal software. As a Portal operator, if you allow free uploads and downloads for public visitors to your Portal under the standard configuration, you will also be responsible for bandwidth and storage costs of that data on the Sia network. For these reasons, you'll need to maintain a significant balance of Siacoins in order to run a public Web Portal. You will also have the costs of the actual server running the Portal.
Please note that running a public Portal is equivalent to acting as a web hosting provider, as you are functioning in the capacity of an intermediary between the Sia storage network and anonymous Internet users who are downloading (and possibly uploading) data on the Sia network. Your Portal will take a Skylink, retrieve the associated content from the Sia network, and deliver the content to the user. There may be legal considerations behind serving illegal content as a Portal operator, and you may be required to respond to takedown requests or deal with other legal actions as a result. It may be impossible to successfully operate as a legal Portal without implementing your own filters and controls over the data you serve, and who you serve it to. In other words, running a public Portal is likely to be a substantial responsibility, and may require a large amount of work and additional development of the base Portal software in order to operate your Portal legally.
Now that you're working with Skynet, here are a few tips.
Files uploaded to Skynet are stored publicly and in an unencrypted fashion. Hosts receive a full copy of your unencrypted file. As a result, you should either avoid storing sensitive data on Skynet, or encrypt it first before uploading. Additionally, even if you don't share your Skylink, if it is discovered by someone else, they can access your uploaded file. Keep this in mind when using Web Portals, as a Portal operator has the opportunity to save all Skylinks created by their Portal and do as they please with them. There is also an extremely small chance that your Skylink could be discovered randomly.
Normally, you can see your uploaded files under the Rent tab in the Sia-UI. Skynet files aren't yet shown in the Sia-UI - you can view them in the Terminal or with siac
by using the command skynet ls
. This will show your Skynet files and folders, as well as their Skylinks.
We know we've said this already, but it bears repeating once more - if you operate a public Portal, you're providing public access to the Sia network and any Skylinks contained within. You are also potentially offering to pay for and store content from strangers on the Internet. This could be likened to both operating a Tor exit node, and opening a free FTP or other storage server on your system on which anyone could store anything they want. If anything illegal transits your Portal, you may end up in serious legal trouble. Only operate a public Skynet Portal if you understand what you're doing, including the risks involved.
For more tips, visit our Skynet FAQs page.