Skip to content

Commit

Permalink
Updated uplink share docs to with --tls info (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferristocrat authored Oct 24, 2023
1 parent 96b2113 commit 153f32c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
7 changes: 5 additions & 2 deletions app/dcs/code/static-site-hosting/custom-domains/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The following placeholders should be replaced in the sample code provided below:

- **_\<bucket>_**: The bucket you want to share

- **_\<prefix>_**: `optional` The path to the specific folder you want to share (this is known as a prefix)
- **_\<prefix>_** (optional): The path to the specific folder you want to share (this is known as a prefix)

{% tabs %}
{% tab label="Windows" %}
Expand Down Expand Up @@ -97,14 +97,17 @@ uplink share --dns <hostname> sj://<bucket>/<prefix> --base-url <linkshare url>

Anything shared with `--dns` will be _readonly_ and available _publicly_ (no secret key needed).

The command above prints a zone file with the information needed to create 3 DNS records. Your CNAME should match the linkshare service domain (`link.storjshare.io` by default).
For securing your domain with TLS you can add the `--tls` flag, which returns an additional TXT record to secure your domain (Pro Accounts only).

The command above prints a zone file with the information needed to create 3 DNS records (4 if `--tls` was used). Your CNAME should match the linkshare service domain (`link.storjshare.io` by default).

```shell
$ORIGIN example.com.
$TTL 3600
<hostname> IN CNAME link.storjshare.io.
txt-<hostname> IN TXT storj-root:<bucket>/<prefix>
txt-<hostname> IN TXT storj-access:<access key>
txt-<hostname> IN TXT storj-tls:true
```

## Setting up a custom domain
Expand Down
13 changes: 8 additions & 5 deletions app/dcs/code/static-site-hosting/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,30 @@ You can use your own domain name and host your own static website on Storj

1. Download the uplink binary ([](docId:h3RyJymEIi4gf2S9wVJg8)) and upload your static site files to Storj DCS. You may also upload your files in any other manner, but you will need the Uplink CLI for the remaining steps.

2. Share the bucket or object prefix (not individual objects) that will be the root of your website/subdomain. At the root, name your home page`index.html`. The website will serve the index.html file automatically e.g.`http://www.example.test` and `http://www.example.test/index.html`will serve the same content. Anything shared with `--dns` will be _readonly_ and available _publicly_ (no secret key needed). You can optionally specify your preferred linkshare endpoint with `--base-url`
2. Share the bucket or object prefix (not individual objects) that will be the root of your website/subdomain. At the root, name your home page `index.html`. The website will serve the index.html file automatically e.g. `http://www.example.test` and `http://www.example.test/index.html` will serve the same content. Anything shared with `--dns` will be _readonly_ and available _publicly_ (no secret key needed).
3. Finally, you can optionally add the `--tls` flag in order to return an additional DNS entry used for securing your domain with TLS.

{% tabs %}
{% tab label="Windows" %}

```Text
./uplink.exe share --dns <hostname> sj://<bucket>/<prefix> --base-url <linkshare url>
./uplink.exe share --dns <hostname> sj://<bucket>/<prefix> --base-url <linkshare url> --tls
```

{% /tab %}

{% tab label="Linux" %}

```Text
uplink share --dns <hostname> sj://<bucket>/<prefix> --base-url <linkshare url>
uplink share --dns <hostname> sj://<bucket>/<prefix> --base-url <linkshare url> --tls
```

{% /tab %}

{% tab label="macOS" %}

```Text
uplink share --dns <hostname> sj://<bucket>/<prefix> --base-url <linkshare url>
uplink share --dns <hostname> sj://<bucket>/<prefix> --base-url <linkshare url> --tls
```

{% /tab %}
Expand All @@ -59,6 +60,7 @@ $TTL 3600
<hostname> IN CNAME link.storjshare.io.
txt-<hostname> IN TXT storj-root:<bucket>/<prefix>
txt-<hostname> IN TXT storj-access:<access key>
txt-<hostname> IN TXT storj-tls:true
```

Remember to update the `$ORIGIN` from `example.com` to your domain name (keep the trailing `.`). You may also change the DNS `$TTL`.
Expand All @@ -76,7 +78,8 @@ $ORIGIN example.com.
$TTL 3600
www.example.com IN CNAME link.storjshare.io.
txt-www.example.com IN TXT storj-root:bucket/prefix
txt-www.example.com IN TXT storj-access:jqaz8xihdea93jfbaks8324jrhq1
txt-www.example.com IN TXT storj-access:abcdefghijklmnopqrstuvwxzy
txt-www.example.com IN TXT storj-tls:true
```

## Part 2: DNS Provider
Expand Down

0 comments on commit 153f32c

Please sign in to comment.