From 669b592319fb398fb416dfbce696fb9e5f9f7a12 Mon Sep 17 00:00:00 2001 From: "Alexey A. Leonov" Date: Wed, 22 Apr 2026 11:07:19 +0700 Subject: [PATCH 1/6] Refactor gateway setup instructions with tabs Updated code blocks to use tabs for different operating systems and Docker. --- app/(docs)/learn/self-host/gateway-st/page.md | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/app/(docs)/learn/self-host/gateway-st/page.md b/app/(docs)/learn/self-host/gateway-st/page.md index 8bdeb2806..df56f07b8 100644 --- a/app/(docs)/learn/self-host/gateway-st/page.md +++ b/app/(docs)/learn/self-host/gateway-st/page.md @@ -207,25 +207,29 @@ You can use two methods to obtain an Access Grant: Now we got our access grant and can configure the gateway as follows: -{% code-group %} - -```windows +{% tabs %} +{% tab label="Windows" %} +```powershell ./gateway setup --access 14aV.... --non-interactive ``` - -```linux +{% /tab %} +{% tab label="Linux" %} +```bash gateway setup --access 14aV.... --non-interactive ``` - -```macos +{% /tab %} +{% tab label="macOS" %} +```shell gateway setup --access 14aV.... --non-interactive ``` +{% /tab %} +{% tab label="Docker" %} -```dockerfile +```shell docker run -it --rm --mount type=bind,source=/path/to/gateway-config-dir/,destination=/root/.local/share/storj/gateway/ --name gateway storjlabs/gateway setup --access 14aV.... --non-interactive ``` - -{% /code-group %} +{% /tab %} +{% /tabs %} This command will register the provided access as the default access in the gateway config file. From 6406cf25541a68d3f2152355cdf1b635875c3298 Mon Sep 17 00:00:00 2001 From: "Alexey A. Leonov" Date: Wed, 22 Apr 2026 12:20:53 +0700 Subject: [PATCH 2/6] moved php code example to a proper section --- app/{ => (docs)}/dcs/code/aws/php/page.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/{ => (docs)}/dcs/code/aws/php/page.md (100%) diff --git a/app/dcs/code/aws/php/page.md b/app/(docs)/dcs/code/aws/php/page.md similarity index 100% rename from app/dcs/code/aws/php/page.md rename to app/(docs)/dcs/code/aws/php/page.md From 305c81f25caf079ff5a90b91d4bcb1731daca585 Mon Sep 17 00:00:00 2001 From: "Alexey A. Leonov" Date: Wed, 22 Apr 2026 12:21:18 +0700 Subject: [PATCH 3/6] replaced Text code blocks with shell --- app/(docs)/learn/self-host/gateway-st/page.md | 68 ++++++++++--------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/app/(docs)/learn/self-host/gateway-st/page.md b/app/(docs)/learn/self-host/gateway-st/page.md index df56f07b8..d9c4f2f65 100644 --- a/app/(docs)/learn/self-host/gateway-st/page.md +++ b/app/(docs)/learn/self-host/gateway-st/page.md @@ -100,7 +100,7 @@ Direct Download {% tab label="macOS" %} Curl Download -```Text +```shell curl -L https://github.com/storj/gateway-st/releases/latest/download/gateway_darwin_amd64.zip -O && unzip gateway_darwin_amd64.zip chmod 755 gateway sudo mv gateway /usr/local/bin/gateway @@ -113,7 +113,7 @@ Direct Download {% tab label="Docker" %} -```Text +```shell docker pull storjlabs/gateway ``` @@ -162,7 +162,7 @@ gateway setup {% tab label="Docker" %} -```dockerfile +```shell docker run -it --rm --mount type=bind,source=/path/to/gateway-config-dir/,destination=/root/.local/share/storj/gateway/ --name gateway storjlabs/gateway setup ``` @@ -240,7 +240,7 @@ The gateway functions as a daemon. Start it and leave it running. {% tabs %} {% tab label="Windows" %} -```Text +```powershell ./gateway.exe run ``` @@ -248,7 +248,7 @@ The gateway functions as a daemon. Start it and leave it running. {% tab label="Linux" %} -```Text +```shell gateway run ``` @@ -256,7 +256,7 @@ gateway run {% tab label="macOS" %} -```Text +```shell gateway run ``` @@ -264,7 +264,7 @@ gateway run {% tab label="Docker" %} -```Text +```shell docker run -it --rm -p 127.0.0.1:7777:7777 --mount type=bind,source=/path/to/gateway-config-dir/,destination=/root/.local/share/storj/gateway/ --name gateway storjlabs/gateway run ``` @@ -286,14 +286,16 @@ Please make sure you have [AWS S3 CLI installed](https://docs.aws.amazon.com/cli Once you do, in a new terminal session, configure it with your Gateway's credentials: -```Text -$ aws configure +```shell +# terminal +aws configure +# /terminal --- AWS Access Key ID: [Enter your Gateway's Access Key] AWS Secret Access Key: [Enter your Gateway's Secret Key] Default region name: [null] Default output format: [null] - +# terminal $ aws configure set default.s3.multipart_threshold 64MB ``` @@ -307,31 +309,31 @@ See also [](docId:20zlQyfMD9gmHJOUPx3jh) ### Create a bucket -```none +```shell aws s3 --endpoint=http://localhost:7777 mb s3://bucket-name ``` ### Upload an object -```none +```shell aws s3 --endpoint=http://localhost:7777 cp your-large-file.mp4 s3://bucket-name/your-large-file.mp4 ``` ### List objects in a bucket -```none +```shell aws s3 --endpoint=http://localhost:7777 ls s3://bucket-name/ ``` ### Download an object -```none +```shell aws s3 --endpoint=http://localhost:7777 cp s3://bucket-name/your-large-file.mp4 ~/Downloads/your-large-file.mp4 ``` ### Generate a URL for an object -```none +```shell aws s3 --endpoint=http://localhost:7777 presign s3://bucket-name/your-large-file.mp4 ``` @@ -339,7 +341,7 @@ aws s3 --endpoint=http://localhost:7777 presign s3://bucket-name/your-large-file ### Delete an object -```none +```shell aws s3 --endpoint=http://localhost:7777 rm s3://bucket-name/your-large-file.mp4 ``` @@ -371,7 +373,7 @@ Advanced usage for the single-tenant Gateway You can add several access grants to the `config.yaml`, using this format: -```Text +```shell access: 14aV.... # default Access accesses.site: 26NBm..... # the Access with name "site" ``` @@ -381,7 +383,7 @@ You can see the path to the default config file `config.yaml` with this command: {% tabs %} {% tab label="Windows" %} -```Text +```shell ./gateway help ``` @@ -389,7 +391,7 @@ You can see the path to the default config file `config.yaml` with this command: {% tab label="Linux" %} -```Text +```shell gateway help ``` @@ -397,7 +399,7 @@ gateway help {% tab label="macOS" %} -```Text +```shell gateway help ``` @@ -411,7 +413,7 @@ You can run a gateway with specifying the access grant (or its name for example {% tabs %} {% tab label="Windows" %} -```Text +```shell ./gateway run --access 14aV.... ``` @@ -419,7 +421,7 @@ You can run a gateway with specifying the access grant (or its name for example {% tab label="Linux" %} -```Text +```shell gateway run --access 14aV.... ``` @@ -427,7 +429,7 @@ gateway run --access 14aV.... {% tab label="macOS" %} -```Text +```shell gateway run --access 14aV.... ``` @@ -435,7 +437,7 @@ gateway run --access 14aV.... {% tab label="Docker" %} -```Text +```shell docker run -it --rm -p 127.0.0.1:7777:7777 --mount type=bind,source=/path/to/gateway-config-dir/,destination=/root/.local/share/storj/gateway/ --name gateway storjlabs/gateway run --access 14aV.... ``` @@ -449,7 +451,7 @@ You can also run a gateway to handle a bucket as a static website. {% tabs %} {% tab label="Windows" %} -```Text +```shell ./gateway run --access 14aV.... --website ``` @@ -457,7 +459,7 @@ You can also run a gateway to handle a bucket as a static website. {% tab label="Linux" %} -```Text +```shell gateway run --access 14aV.... --website ``` @@ -465,7 +467,7 @@ gateway run --access 14aV.... --website {% tab label="macOS" %} -```Text +```shell gateway run --access 14aV.... --website ``` @@ -473,7 +475,7 @@ gateway run --access 14aV.... --website {% tab label="Docker" %} -```Text +```shell docker run -it --rm -p 127.0.0.1:7777:7777 --mount type=bind,source=/path/to/gateway-config-dir/,destination=/root/.local/share/storj/gateway/ --name gateway storjlabs/gateway run --access 14aV.... --website ``` @@ -500,7 +502,7 @@ Export the environment variables before running the Gateway: {% tab label="Windows" %} Cache disks are not supported, because caching requires the [`atime`](https://kerolasa.github.io/filetimes.html) function to be enabled. -```Text +```powershell $env:MINIO_CACHE="on" $env:MINIO_CACHE_EXCLUDE="*.pdf,mybucket/*" $env:MINIO_CACHE_QUOTA=80 @@ -513,7 +515,7 @@ $env:MINIO_CACHE_WATERMARK_HIGH=90 {% tab label="Linux" %} -```Text +```shell export MINIO_CACHE="on" export MINIO_CACHE_DRIVES="/mnt/drive1,/mnt/drive2,/mnt/cache{1...3}" export MINIO_CACHE_EXCLUDE="*.pdf,mybucket/*" @@ -527,7 +529,7 @@ export MINIO_CACHE_WATERMARK_HIGH=90 {% tab label="macOS" %} -```Text +```shell export MINIO_CACHE="on" export MINIO_CACHE_DRIVES="/mnt/drive1,/mnt/drive2,/mnt/cache{1...3}" export MINIO_CACHE_EXCLUDE="*.pdf,mybucket/*" @@ -542,7 +544,7 @@ export MINIO_CACHE_WATERMARK_HIGH=90 {% tab label="Docker" %} You can create a file with environment variables, for example - `minio_vars` with such content: -```Text +```shell MINIO_CACHE="on" MINIO_CACHE_DRIVES="/mnt/drive1,/mnt/drive2,/mnt/cache{1...3}" MINIO_CACHE_EXCLUDE="*.pdf,mybucket/*" @@ -556,7 +558,7 @@ For Windows, the option `-e MINIO_CACHE_DRIVES` is useless due to the lack of an Then add parameters `--env-file ./minio_vars --mount type=bind,src=/mnt/drive1,dst=/mnt/drive1 --mount type=bind,src=/mnt/drive2,dst=/mnt/drive2 --mount type=bind,src=/mnt/cache1,dst=/mnt/cache1 --mount type=bind,src=/mnt/cache2,dst=/mnt/cache2 --mount type=bind,src=/mnt/cache3,dst=/mnt/cache3` to the `docker run` section, for example: -```Text +```shell docker run -it --rm -p 127.0.0.1:7777:7777 --env-file ./minio_vars --mount type=bind,src=/mnt/drive1,dst=/mnt/drive1 --mount type=bind,src=/mnt/drive2,dst=/mnt/drive2 --mount type=bind,src=/mnt/cache1,dst=/mnt/cache1 --mount type=bind,src=/mnt/cache2,dst=/mnt/cache2 --mount type=bind,src=/mnt/cache3,dst=/mnt/cache3 --mount type=bind,source=/path/to/gateway-config-dir/,destination=/root/.local/share/storj/gateway/ --name gateway storjlabs/gateway run --access site --website ``` From 7afca2a6a65ab3f37a2bccbe6bc22423d172d78c Mon Sep 17 00:00:00 2001 From: "Alexey A. Leonov" Date: Wed, 22 Apr 2026 12:26:59 +0700 Subject: [PATCH 4/6] fixed shell handle --- app/(docs)/learn/self-host/gateway-st/page.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/(docs)/learn/self-host/gateway-st/page.md b/app/(docs)/learn/self-host/gateway-st/page.md index d9c4f2f65..0f7d4d7cd 100644 --- a/app/(docs)/learn/self-host/gateway-st/page.md +++ b/app/(docs)/learn/self-host/gateway-st/page.md @@ -248,7 +248,7 @@ The gateway functions as a daemon. Start it and leave it running. {% tab label="Linux" %} -```shell +```bash gateway run ``` @@ -289,14 +289,13 @@ Once you do, in a new terminal session, configure it with your Gateway's credent ```shell # terminal aws configure -# /terminal --- AWS Access Key ID: [Enter your Gateway's Access Key] AWS Secret Access Key: [Enter your Gateway's Secret Key] Default region name: [null] Default output format: [null] # terminal -$ aws configure set default.s3.multipart_threshold 64MB +aws configure set default.s3.multipart_threshold 64MB ``` Then, test out some AWS S3 CLI commands! From 6411387f3be7a5473f0648cd8ecdce847a680542 Mon Sep 17 00:00:00 2001 From: "Alexey A. Leonov" Date: Wed, 22 Apr 2026 12:32:46 +0700 Subject: [PATCH 5/6] separated shell handles for a convenient copy-paste --- app/(docs)/learn/self-host/gateway-st/page.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/(docs)/learn/self-host/gateway-st/page.md b/app/(docs)/learn/self-host/gateway-st/page.md index 0f7d4d7cd..915c879db 100644 --- a/app/(docs)/learn/self-host/gateway-st/page.md +++ b/app/(docs)/learn/self-host/gateway-st/page.md @@ -294,6 +294,8 @@ AWS Access Key ID: [Enter your Gateway's Access Key] AWS Secret Access Key: [Enter your Gateway's Secret Key] Default region name: [null] Default output format: [null] +``` +```shell # terminal aws configure set default.s3.multipart_threshold 64MB ``` From 364ef9fcdf2560de4db19d8cba85681b9cc69eb7 Mon Sep 17 00:00:00 2001 From: "Alexey A. Leonov" Date: Wed, 22 Apr 2026 12:41:58 +0700 Subject: [PATCH 6/6] shell handles for two commands works without splitting --- app/(docs)/learn/self-host/gateway-st/page.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/(docs)/learn/self-host/gateway-st/page.md b/app/(docs)/learn/self-host/gateway-st/page.md index 915c879db..0f7d4d7cd 100644 --- a/app/(docs)/learn/self-host/gateway-st/page.md +++ b/app/(docs)/learn/self-host/gateway-st/page.md @@ -294,8 +294,6 @@ AWS Access Key ID: [Enter your Gateway's Access Key] AWS Secret Access Key: [Enter your Gateway's Secret Key] Default region name: [null] Default output format: [null] -``` -```shell # terminal aws configure set default.s3.multipart_threshold 64MB ```