# Longhorn S3 credentials

**URL:** <https://forums.suse.com/t/longhorn-s3-credentials/10692>\
**Category:** SUSE Storage\
**Created:** [June 7, 2018, 9:35pm UTC](https://forums.suse.com/t/longhorn-s3-credentials/10692 "2018-06-07T21:35:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![spatialy](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/spatialy/32/2664_2.png) [@spatialy](https://forums.suse.com/u/spatialy)\
**Post date:** [June 7, 2018, 9:35pm UTC](https://forums.suse.com/t/longhorn-s3-credentials/10692/1 "2018-06-07T21:35:36Z")

</div>

Hi all

Any light on configure and pass AWS credentials to Longhorn for backup to S3?

Best

---

<div class="post-metadata">

**Author:** ![yasker](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/yasker/32/137_2.png) [@yasker](https://forums.suse.com/u/yasker)\
**Post date:** [June 12, 2018, 6:51pm UTC](https://forums.suse.com/t/longhorn-s3-credentials/10692/2 "2018-06-12T18:51:36Z")

</div>

Hi @spatialy

We just added s3 support in our development branch. If you want try to use it, please using this commit:

> **[GitHub - longhorn/longhorn-manager at 55726ed1ca1e1d8612de1e4ff1408a2845c1b10a](https://github.com/longhorn/longhorn-manager/tree/55726ed1ca1e1d8612de1e4ff1408a2845c1b10a)**
>
> 55726ed1ca1e1d8612de1e4ff1408a2845c1b10a

Notice no upgrade to this version (a.k.a don’t use existing data with it).

You can use:

```auto
kubectl create -Rf deploy

```

to install the dev version.

In order to use S3:

1. Create a Kubernetes secret in your Longhorn (`longhorn-system` by default) namespace, name it e.g. `s3-secret`. Then put `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` as data in it.
2. In Longhorn UI, specify the name of secret (`s3-secret`) in Longhorn setting: `Backup Target Credential Secret`.
3. Specify the Backup Target to be e.g. `s3://backupbucket@us-east-1/xxx/longhorn/backupstore`
4. Try the `Backup` tab in the Longhorn UI, it shouldn’t report error. An empty list is expected.

You can refer to [longhorn-tests/test.yaml at master · longhorn/longhorn-tests · GitHub](https://github.com/rancher/longhorn-tests/blob/master/manager/integration/deploy/test.yaml) as example. We’re using Minio in testing.

---

<div class="post-metadata">

**Author:** ![spatialy](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/spatialy/32/2664_2.png) [@spatialy](https://forums.suse.com/u/spatialy)\
**Post date:** [June 13, 2018, 4:16am UTC](https://forums.suse.com/t/longhorn-s3-credentials/10692/3 "2018-06-13T04:16:56Z")

</div>

Hi @yasker, thanks for the help … let me use the dev branch in a dev environment and let you know how work

best

---

<div class="post-metadata">

**Author:** ![Teknologist](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/teknologist/32/3058_2.png) [@Teknologist](https://forums.suse.com/u/Teknologist)\
**Post date:** [June 25, 2018, 4:46pm UTC](https://forums.suse.com/t/longhorn-s3-credentials/10692/4 "2018-06-25T16:46:49Z")

</div>

Hi @yasker,

I am trying this on atest server running rancher 2.0.3.

volume creation from Longhorn UI, snapshots and S3 backups work fine .

But when I try to install mongo-replicaset from rancher catalog library, the pods fail to acquire the volumes:

The error in longhorn manager is:

`Error: "unable to create volume pvc-50bc9cd6-788d-11e8-ad6d-f23c91fd079e: &{OwnerID: Size:4294967296 Frontend: FromBackup: NumberOfReplicas:3 StaleReplicaTimeout:30 NodeID: EngineImage: RecurringJobs:[]}: invalid volume frontend specified: "`

Many thanks!

---

<div class="post-metadata">

**Author:** ![yasker](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/yasker/32/137_2.png) [@yasker](https://forums.suse.com/u/yasker)\
**Post date:** [June 25, 2018, 8:46pm UTC](https://forums.suse.com/t/longhorn-s3-credentials/10692/5 "2018-06-25T20:46:03Z")

</div>

@Teknologist

It’s a bug in the development branch. We’ve just fixed it. If you’re using the latest master, can you try if using `yasker/longhorn-manager:dd69b3c` solves your problem? Just run the commands below in the `longhorn-manager` directory.

```auto
sed -i "s/rancher\/longhorn-manager:885b53a/yasker\/longhorn-manager:dd69b3c/g" deploy/02-components/01-manager.yaml
kubectl delete -f deploy/02-components/01-manager.yaml
kubectl create -f deploy/02-components/01-manager.yaml

```

---

<div class="post-metadata">

**Author:** ![Teknologist](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/teknologist/32/3058_2.png) [@Teknologist](https://forums.suse.com/u/Teknologist)\
**Post date:** [June 26, 2018, 1:52am UTC](https://forums.suse.com/t/longhorn-s3-credentials/10692/6 "2018-06-26T01:52:49Z")

</div>

@yasker Thanks! this is brilliant.  
Works great. ANd that was fast 🙂

I have tried so far a mongdb replicaset with 3 memebers and pvc, as well as prometheus/grafana.

All pvcs went through fine except for the grafana one, but creating it manually via kubectl/yaml and killing the pod solved the issue.

As I will be testing longhorn extensively where is the best place to give you feedback / file issues ?

Many thanks!

Eric

---

<div class="post-metadata">

**Author:** ![yasker](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/yasker/32/137_2.png) [@yasker](https://forums.suse.com/u/yasker)\
**Post date:** [June 26, 2018, 2:11am UTC](https://forums.suse.com/t/longhorn-s3-credentials/10692/7 "2018-06-26T02:11:05Z")

</div>

@Teknologist

Glad it works!

In the future, you can fill the issues at: [https://github.com/rancher/longhorn/issues](https://github.com/rancher/longhorn/issues)

Thanks!
