# Regarding GatewayST Setup

**URL:** <https://forum.storj.io/t/regarding-gatewayst-setup/21572>\
**Category:** troubleshooting\
**Tags:** s3-gateway\
**Created:** [February 25, 2023, 1:37am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572 "2023-02-25T01:37:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mitexleo](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mitexleo/32/1132_2.png) [@mitexleo](https://forum.storj.io/u/mitexleo)\
**Post date:** [February 25, 2023, 1:37am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/1 "2023-02-25T01:37:57Z")

</div>

Hi,  
I’m migrating my pixelfed instance to a new server. As a part of the migration process I’m setting up GatewayST on my new server.

I generated an api key and followed exact same steps mentioned in the docs.

Gateway is running without any issues.

But the problem occured when I tried to created a systemd service and run the gateway in website mode.

Here’s my config:

 ![SmartSelect_20230225-072438_Termux](https://storj-s3.bcdn.literatehosting.net/original/2X/1/1f6a7602d50d4eb730e0139c5052d57cd1111ae5.jpeg)

Here’s what I get after “systemctl status gateway”:

 ![SmartSelect_20230225-072816_Termux](https://storj-s3.bcdn.literatehosting.net/original/2X/1/12a59ef501a4c44f90f907b663d0c79c8546df68.jpeg)

And.

 ![SmartSelect_20230225-072802_Termux](https://storj-s3.bcdn.literatehosting.net/original/2X/f/fbd21bf869be343534d7d0b77102a1c8ab6e05c0.jpeg)

I was using the default access found in the config.yaml …

Regarding access grants…  
Can I use my own access grant (generated by me) in the config.yaml ?

Or I have to generate the key from satellite UI ?

 ![SmartSelect_20230225-073855_Vivaldi Browser](https://storj-s3.bcdn.literatehosting.net/original/2X/7/791d32800bce879e28c56b363fce5e54998b4152.jpeg)

I dont understand this part.

Thanks 😊

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [February 25, 2023, 4:46am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/2 "2023-02-25T04:46:18Z")

</div>

You need to setup your gateway anyway.  
For example, like this:

```auto
$ gateway setup --non-interactive --access 1cCYertoijhgoiogtjgfhtrhmrohjbokgfmnvbortmbrtkhjriotobmjiotyhbt....

```

After that you can run it:

```auto
$ gateway run

```

and you will see the access key and secret key in the log output.

For root, you just need to do that as root.  
The needed file is `~/.local/share/storj/gateway/config.yaml` (for `root` it will be `/root/.local/share/storj/gateway/config.yaml`), which contain

```auto
# the serialized access, or name of the access to use
access: 1cCYertoijhgoiogtjgfhtrhmrohjbokgfmnvbortmbrtkhjriotobmjiotyhbt....

```

If you do not plan to change the access grant too often, you may just setup it once and hardcode resulted S3 creds in your app.

---

<div class="post-metadata">

**Author:** ![mitexleo](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mitexleo/32/1132_2.png) [@mitexleo](https://forum.storj.io/u/mitexleo)\
**Post date:** [February 25, 2023, 6:10am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/3 "2023-02-25T06:10:24Z")

</div>

Is there any problem with the interactive setup ? I followed that !  
Do I need to revert back ?

/root/.local/share/storj/gateway/

I’m not seeing any config file here …

---

<div class="post-metadata">

**Author:** ![mitexleo](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mitexleo/32/1132_2.png) [@mitexleo](https://forum.storj.io/u/mitexleo)\
**Post date:** [February 25, 2023, 7:07am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/4 "2023-02-25T07:07:02Z")

</div>

> [@Alexey](#):
>
> For example, like this:
> 
> ```auto
> $ gateway setup --non-interactive --access 1cCYertoijhgoiogtjgfhtrhmrohjbokgfmnvbortmbrtkhjriotobmjiotyhbt....
> 
> ```

Am I supposed to use the access key from my previous setup ?

---

<div class="post-metadata">

**Author:** ![mitexleo](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mitexleo/32/1132_2.png) [@mitexleo](https://forum.storj.io/u/mitexleo)\
**Post date:** [February 25, 2023, 9:11am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/5 "2023-02-25T09:11:32Z")

</div>

I have backed up my previous access grant that was generated while setting up GatewayST (Interactive)

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [February 25, 2023, 9:18am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/6 "2023-02-25T09:18:28Z")

</div>

You may reuse it of course, just run a setup as root (or copy your config to the root home folder, or provide a path to the config file in the `gateway run` command with `--config-dir` option).  
Just `gateway run` uses parameters from `config.yaml` and seems ignore your `--access` option…

---

<div class="post-metadata">

**Author:** ![mitexleo](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mitexleo/32/1132_2.png) [@mitexleo](https://forum.storj.io/u/mitexleo)\
**Post date:** [February 25, 2023, 9:26am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/7 "2023-02-25T09:26:14Z")

</div>

Got it ! Created a new access grant from satellite dashboard and ran gateway setup as root user (sudo). Now I can see the config file in both location.

---

<div class="post-metadata">

**Author:** ![mitexleo](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mitexleo/32/1132_2.png) [@mitexleo](https://forum.storj.io/u/mitexleo)\
**Post date:** [February 25, 2023, 9:27am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/8 "2023-02-25T09:27:13Z")

</div>

By the way, I see telemetry is enabled. What information does it collect ? How can I disable telemetry?

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [February 25, 2023, 9:34am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/9 "2023-02-25T09:34:04Z")

</div>

It collect the usage statistics (not personalized), you may disable it with option `tracing.enabled: false` in your `config.yaml` (root one, if you run it as root), or with an argument `--tracing.enabled=false` in your `gateway run` command.

---

<div class="post-metadata">

**Author:** ![mitexleo](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mitexleo/32/1132_2.png) [@mitexleo](https://forum.storj.io/u/mitexleo)\
**Post date:** [February 25, 2023, 9:35am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/10 "2023-02-25T09:35:33Z")

</div>

![SmartSelect_20230225-153403_Termux](https://storj-s3.bcdn.literatehosting.net/original/2X/d/d8b4725bdb05a007804e125c9ac0c6bb640ca845.jpeg)

Is the first one a error message ?

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [February 25, 2023, 9:37am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/11 "2023-02-25T09:37:10Z")

</div>

no. More like a warning - usually you should not run anything as `root`, it’s not safe.  
It’s better to use a special limited user for that, especially when the service is not require any root access (like in this case).

---

<div class="post-metadata">

**Author:** ![mitexleo](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mitexleo/32/1132_2.png) [@mitexleo](https://forum.storj.io/u/mitexleo)\
**Post date:** [February 25, 2023, 9:44am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/12 "2023-02-25T09:44:23Z")

</div>

But if i dont run gateway as root. I get insecure-dev-key error

 ![SmartSelect_20230225-154438_Termux](https://storj-s3.bcdn.literatehosting.net/original/2X/2/22f008d94c03fb3b422d92d26922c82a84c63e7f.jpeg)

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [February 25, 2023, 9:49am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/13 "2023-02-25T09:49:20Z")

</div>

Because you need to have `config.yaml` for this user 🙂

---

<div class="post-metadata">

**Author:** ![mitexleo](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mitexleo/32/1132_2.png) [@mitexleo](https://forum.storj.io/u/mitexleo)\
**Post date:** [February 25, 2023, 9:54am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/14 "2023-02-25T09:54:22Z")

</div>

Got it … There was a config file. It was created previously. I’m just gonna update the access key. Wont it work ?

---

<div class="post-metadata">

**Author:** ![mitexleo](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mitexleo/32/1132_2.png) [@mitexleo](https://forum.storj.io/u/mitexleo)\
**Post date:** [February 25, 2023, 10:05am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/15 "2023-02-25T10:05:22Z")

</div>

I updated config.yaml for that user. But still getting that error. I think i have to run as root user (using sudo )

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [February 25, 2023, 10:05am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/16 "2023-02-25T10:05:46Z")

</div>

It will work even if you just copy the `config.yaml` file (just apply needed permissions).

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [February 25, 2023, 10:08am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/17 "2023-02-25T10:08:04Z")

</div>

This is not possible, if you did it correctly and this user has an access to this file, remember - it’s looking for `~/.local/share/storj/gateway/config.yaml`  
So, if the user is `USER`, the path would be `/home/USER/.local/share/storj/gateway/config.yaml`  
However, if you use `sudo`, it will looking for config for the `root`, i.e. `/root/.local/share/storj/gateway/config.yaml`

You can see, what is home dir for the used user:

```auto
sudo -iu USER echo "$HOME"

```

---

<div class="post-metadata">

**Author:** ![mitexleo](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mitexleo/32/1132_2.png) [@mitexleo](https://forum.storj.io/u/mitexleo)\
**Post date:** [February 25, 2023, 10:12am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/18 "2023-02-25T10:12:07Z")

</div>

Everything seems to be okay 👍… Dunno what went wrong 😕

---

<div class="post-metadata">

**Author:** ![mitexleo](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mitexleo/32/1132_2.png) [@mitexleo](https://forum.storj.io/u/mitexleo)\
**Post date:** [February 25, 2023, 10:13am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/19 "2023-02-25T10:13:45Z")

</div>

![SmartSelect_20230225-161320_Termux](https://storj-s3.bcdn.literatehosting.net/original/2X/7/7a797aa80ca6adf41bc945317061f71e6b72c82f.jpeg)

Is this okay ?

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [February 25, 2023, 10:18am UTC](https://forum.storj.io/t/regarding-gatewayst-setup/21572/20 "2023-02-25T10:18:19Z")

</div>

I think yes. Especially if it’s running 🙂

[Next page](https://forum.storj.io/t/regarding-gatewayst-setup/21572.md?page=2)
