# How to use google cloud storage instead of s3?

**URL:** https://meta.discourse.org/t/how-to-use-google-cloud-storage-instead-of-s3/15418
**Category:** Self-hosting
**Tags:** hosting
**Created:** [5월 7, 2014, 9:07오후 UTC](https://meta.discourse.org/t/how-to-use-google-cloud-storage-instead-of-s3/15418 "2014-05-07T21:07:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dccohen](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@dccohen](https://meta.discourse.org/u/dccohen)
#### Post date: [5월 7, 2014, 9:07오후 UTC](https://meta.discourse.org/t/how-to-use-google-cloud-storage-instead-of-s3/15418/1 "2014-05-07T21:07:31Z")

</div>

Discourse seems to use the fog gem, which supports many cloud services, including google cloud storage. But, is discourse currently just written to work with s3 as te cloud storage, or can it be already used with google cloud storage?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [5월 7, 2014, 10:27오후 UTC](https://meta.discourse.org/t/how-to-use-google-cloud-storage-instead-of-s3/15418/2 "2014-05-07T22:27:41Z")

</div>

Right now for simplicity we are focusing on S3. So either you store stuff locally, on your server, or you store it on Amazon S3.

---

<div class="post-metadata">

### Author: ![dccohen](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@dccohen](https://meta.discourse.org/u/dccohen)
#### Post date: [5월 7, 2014, 10:43오후 UTC](https://meta.discourse.org/t/how-to-use-google-cloud-storage-instead-of-s3/15418/3 "2014-05-07T22:43:50Z")

</div>

Apart from this:

> <https://github.com/discourse/discourse/blob/542d54e6bfef6672ff732d3d5d4661fac53a5064/lib/file_store/s3_store.rb#L105>

is there any other s3-specific parts? (Seems like onebox doe snot render the right code line).

If not, all we need is `Fog::Storage.new(gcs_options)` instead of `Fog::Storage.new(s3_options)`. The rest is handled by fog.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [5월 7, 2014, 10:45오후 UTC](https://meta.discourse.org/t/how-to-use-google-cloud-storage-instead-of-s3/15418/4 "2014-05-07T22:45:31Z")

</div>

Nothing prevents you from writing your own custom `google_cloud_storage_store`. And yes, you should probably use the `s3_store` as a starting point.
