# Using tardigrade with nextcloud as primary storage

**URL:** <https://forum.storj.io/t/using-tardigrade-with-nextcloud-as-primary-storage/5585>\
**Category:** DCS\
**Tags:** nextcloud\
**Created:** [April 2, 2020, 12:50pm UTC](https://forum.storj.io/t/using-tardigrade-with-nextcloud-as-primary-storage/5585 "2020-04-02T12:50:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![stuu](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/stuu/32/71_2.png) [@stuu](https://forum.storj.io/u/stuu)\
**Post date:** [April 2, 2020, 12:50pm UTC](https://forum.storj.io/t/using-tardigrade-with-nextcloud-as-primary-storage/5585/1 "2020-04-02T12:50:24Z")

</div>

Hello, I found [this article](https://documentation.tardigrade.io/how-tos/set-up-tardigrade-with-nextcloud-primary-storage).

Finally came the moment when after being from version v2 I will start using the cloud provided by Storj instead of just providing my infrastructure for it.  
Is it possible for my nextcloud on the VPS server to use the Tardigrade space fully? Can all data uploaded to nextcloud can be transferred to Tardigrade immediately and directly and my VPS doesn’t need space for it or maybe Tardigrade, in this case, can only be used for backups from NextCloud?

---

<div class="post-metadata">

**Author:** ![will.topping](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/will.topping/32/6387_2.png) [@will.topping](https://forum.storj.io/u/will.topping)\
**Post date:** [August 31, 2020, 6:45pm UTC](https://forum.storj.io/t/using-tardigrade-with-nextcloud-as-primary-storage/5585/2 "2020-08-31T18:45:01Z")

</div>

i searched the forum for exactly the answer to this same question but i see no one has commented ☹

@jocelyn are you able to help please?

the documentation refers to using tardigrade as a backup source, but we want to know if it can be used as the primary storage for next cloud please.

---

<div class="post-metadata">

**Author:** ![stefanbenten](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/stefanbenten/32/62_2.png) [@stefanbenten](https://forum.storj.io/u/stefanbenten)\
**Post date:** [August 31, 2020, 7:55pm UTC](https://forum.storj.io/t/using-tardigrade-with-nextcloud-as-primary-storage/5585/3 "2020-08-31T19:55:36Z")

</div>

I am currently working on using the builtin S3 swift adapter to switch out the local storage for S3 compliant storage.  
This would then mean you need to run an S3 Gateway on the same machine and point it towards it.

Once i have that up and running, i can post the How-To here.

---

<div class="post-metadata">

**Author:** ![Erikvv](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/erikvv/32/71_2.png) [@Erikvv](https://forum.storj.io/u/Erikvv)\
**Post date:** [September 2, 2020, 7:54am UTC](https://forum.storj.io/t/using-tardigrade-with-nextcloud-as-primary-storage/5585/4 "2020-09-02T07:54:57Z")

</div>

I have a proof-of-concept fork of nextcloud with [https://github.com/storj-thirdparty/uplink-php/tree/legacy-stream](https://github.com/storj-thirdparty/uplink-php/tree/legacy-stream) integrated.

With that setup you don’t need the S3 gateway.

It’s probably better to distribute it in the nextcloud app store which still requires some work.

---

<div class="post-metadata">

**Author:** ![stefanbenten](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/stefanbenten/32/62_2.png) [@stefanbenten](https://forum.storj.io/u/stefanbenten)\
**Post date:** [September 2, 2020, 6:08pm UTC](https://forum.storj.io/t/using-tardigrade-with-nextcloud-as-primary-storage/5585/5 "2020-09-02T18:08:16Z")

</div>

That really sounds promising and i am personally looking forward to it!

That said, i can report back how to enable full primary storage for nextcloud:

First of all its recommended to start without having your nextcloud being started, else you will lose access to all of your data that has been stored until that point using the previous storage method (likely local disk) and the DB state also gets inconsistent with whats in the new primary storage.

1. Create an instance of our S3 Gateway near your nextcloud instance (or on it depending on the load).
2. Add this to your config and make sure that the `use_path_style` flag is set to true

```auto
'objectstore' =>
    array (
        'class' => '\\OC\\Files\\ObjectStore\\S3',
        'arguments' =>
        array (
        'bucket' => 'nextcloud',
        'autocreate' => true,
        'key' => '<ACCESS_KEY_ID',
        'secret' => '<SECRET_KEY_ID',
        'hostname' => '<IP-OF-S3-GATEWAY>',
        'port' => 7777,
        'use_ssl' => false,
        'use_path_style' => true,
    ),
),

```

1. Start your nextcloud instance.
2. Give the instance a bit of time to sync the initial data structure over into the network.

This worked for our internal Nextcloud Instance just fine.

---

<div class="post-metadata">

**Author:** ![zuidbzue](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/zuidbzue/32/1131_2.png) [@zuidbzue](https://forum.storj.io/u/zuidbzue)\
**Post date:** [September 21, 2020, 12:59pm UTC](https://forum.storj.io/t/using-tardigrade-with-nextcloud-as-primary-storage/5585/6 "2020-09-21T12:59:52Z")

</div>

Are your aware of the issues with Nextcloud and the Gateway?

> <https://github.com/storj/gateway/issues/18>
>
> \# gateway version
> Release build
> Version: v1.1.6
> Build timestamp: 11 Aug 20 10:36 CEST
> Git commit: 4016671861a49f330a736f1740a65c7c9d253852

  

> <https://github.com/storj/gateway/issues/19>
>
> From syslog:
> 2020-08-27T00:58:37.296+0200#011INFO#011http: panic serving 10.1.0.2:63618: runtime error: invalid memory address or nil pointer dereference
> goroutine 1347533 \[running\]:
> net/http.(\*conn).serve.func1(0xc0012b3e00)
> \#011/usr/local/go/src/net/http/server.go:1767 +0x139
> panic(0x1b39d40, 0x30bae10)
> \#011/usr/local/go/src/runtime/panic.go:679 +0x1b2
> github.com/minio/minio/cmd.criticalErrorHandler.ServeHTTP.func1(0xc0004cb600, 0x22177a0, 0xc000728fc0)
> \#011/go/pkg/mod/github.com/minio/minio@v0.0.0-20200713165107-e7d7d5232c60/cmd/generic-handlers.go:757...
