website logo
Create accountLogin
Home
DCS
Node
Resources
Help center
Navigate through spaces
Home
DCS
Node
Resources
Help center
⌘K
Storj DCS
Get Started
AWS CLI and Hosted Gateway MT
AWS SDK and Hosted Gateway MT
Uplink CLI
Satellite Admin Console
Object Browser
Downloads
Download Uplink CLI
Download Self-hosted S3 Compatible Gateway
Download Storj Client Libraries
SDKs & Reference
Tutorial
How-to Guides
Concepts
Support
Support Overview
FAQ
Community Forum
Status Page
Help Desk
Billing, Payment & Accounts
Resources
Moved Documents
Docs powered by archbee 
26min

Gateway ST Advanced Usage

Advanced usage for the single-tenant Gateway

Configuration options

  1. Adding Access Grants

Adding Access Grants

You can add several access grants to the config.yaml. using this format:

Terminal
|

You can see the path to the default config file config.yaml with this command:

Windows
Linux
macOS
Terminal
|

Running options

  1. Run Gateway ST with an Access Grant
  2. Run Gateway ST to host a static website
  3. Run Gateway ST to host a static website with cache

You can run a gateway with specifying the access grant (or its name) with the option --access, for example:

Windows
Linux
macOS
Docker
Terminal
|

or with the name of the access grant from your config (see Add multiple Access Grants)

Terminal
|

Running Gateway ST to host a static website

You can also run a gateway to handle a bucket as a static website. Make sure to limit the access to the exposed buckets.

Windows
Linux
macOS
Docker
Terminal
|

or with the name of the access grant from your config (see Add multiple Access Grants)

Terminal
|

Now you can navigate to http://localhost:7777/site/ to see the bucket site as XML or to http://localhost:7777/site/index.html to see a static page, uploaded to the bucket site.

You can publish this page to the internet, but in this case, you should run your gateway with the option --server.address local_IP:local_Port (replacelocal_IPwith the local IP of your PC andlocal_Port with the port you want to expose).

If you uselocalhost or 127.0.0.1 as your local_IP, you will not be able to publish it directly (via port forwarding for example), instead, you will have to use a reverse proxy here.

Running Gateway ST to host a static website with cache

You can use the Minio caching technology in conjunction with the hosting of a static website.

The following example uses /mnt/drive1, /mnt/drive2 ,/mnt/cache1 ... /mnt/cache3 for caching, while excluding all objects under bucket mybucket and all objects with '.pdf' extensions on a S3 Gateway setup. Objects are cached if they have been accessed three times or more. Cache max usage is restricted to 80% of disk capacity in this example. Garbage collection is triggered when the high watermark is reached (i.e. at 72% of cache disk usage) and will clear the least recently accessed entries until the disk usage drops to the low watermark - i.e. cache disk usage drops to 56% (70% of 80% quota).

Export the environment variables before running the Gateway:

Windows
Linux
macOS
Docker

Cache disks are not supported, because caching requires the atime function to be enabled.

Terminal
|

Setting MINIO_BROWSER=off env variable would disable the Minio browser. This would make sense if running the gateway as a static website in production.

Then run the gateway with static site enabled.

Updated 01 Sep 2022
Did this page help you?
Yes
No
UP NEXT
Linksharing Service
Docs powered by archbee 
TABLE OF CONTENTS
Configuration options
Adding Access Grants
Running options
Running Gateway ST to host a static website
Running Gateway ST to host a static website with cache