# Need a how-to guide for using DigitalOcean Block Storage for image uploads

**URL:** https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535
**Category:** Support
**Created:** [1 september 2016 om 07:18 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535 "2016-09-01T07:18:26Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [6 april 2017 om 11:15 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/21 "2017-04-06T11:15:59Z")

</div>

> [@tehn](#):
>
> This worked, thank you all.
> 
> I haven’t noticed any performance issues.

What about backups — do they work just well?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [6 april 2017 om 12:14 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/22 "2017-04-06T12:14:41Z")

</div>

They should work the same way. There’s even less concern about performance for backups, obviously.

---

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [10 april 2017 om 03:43 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/23 "2017-04-10T03:43:47Z")

</div>

**Note: be careful when selecting the size of your block storage.**  
Once your reach its limits, resizing an existing block storage is [not a trivial process](https://www.digitalocean.com/community/tutorials/how-to-increase-the-size-of-a-digitalocean-block-storage-volume).

Specifically for image uploads though, I think an easier “resizing” would be to just create a new volume, reconfigure the your `.yml` file and copying images from the old volume to the new one. Then rebuilding your container again.

* * *

### Question

Is there any filesystem to format the partition with in terms of image storage? Will it make any different, or should we just use Ext4?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [10 april 2017 om 13:00 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/24 "2017-04-10T13:00:21Z")

</div>

I can’t imagine what difference it would make. I’d use ext4.

---

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [18 juli 2017 om 11:59 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/25 "2017-07-18T11:59:55Z")

</div>

So, I finally spent a few hours to implement all this, and it worked quite well as by the instructions above.

I had Discourse hosted in a region with no volumes support, so I also had to move to another region first.

Altogether:

1. Turned off the droplet.
2. Made a snapshot.
3. Moved the snapshot to the target region.
4. Created a new dropled from the given shapshot in the target region.
5. Attached a volume and did all the work as described in Digital Ocean.
6. Updated container as by Sam’s recommendation above:

> [@Need a how-to guide for using DigitalOcean Block Storage for image uploads](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digialocean-block-storage-for-image-uploads/49535/15):
>
> I would recommend against symlinking, instead, copy images and amend your container config to point /shared/uploads at the correct location.

7. Rebuilt the container  
8. Updated all API keys to work with the new IP. For example, I had my SparkPost API key locked to a particular IP address.

All done and worked like a charm.

References:

- [How to migrate snapshots between regions](https://www.digitalocean.com/community/tutorials/how-to-migrate-digitalocean-snapshots-between-regions).
- [How to use block storage with Digital Ocean](https://www.digitalocean.com/community/tutorials/how-to-use-block-storage-on-digitalocean).

---

<div class="post-metadata">

### Author: ![djensen47](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/djensen47/32/120547_2.png) [@djensen47](https://meta.discourse.org/u/djensen47)
#### Post date: [8 november 2017 om 21:06 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/26 "2017-11-08T21:06:18Z")

</div>

> [@sam](#):
>
> I would recommend against symlinking, instead, copy images and amend your container config to point /shared/uploads at the correct location.

Why would you advise against symlinks?

---

<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: [10 november 2017 om 00:25 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/27 "2017-11-10T00:25:28Z")

</div>

> [@sam](#):
>
> We need to determine performance before making recommendations.

Yeah be careful here, everyone, as we found out **block storage is _quite_ a bit slower than native SSDs**. Like one-half to one-third the speed, so..

> [@sam](#):
>
> the recommendation would be to keep PG on local and images (both docker and pictures) on block storage

---

<div class="post-metadata">

### Author: ![dylanh724](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dylanh724/32/119642_2.png) [@dylanh724](https://meta.discourse.org/u/dylanh724)
#### Post date: [30 november 2017 om 11:54 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/28 "2017-11-30T11:54:05Z")

</div>

So what is recommended? Which CAN we move to volumes without too much of performance loss? Does anyone have a 1-2-3 guide? Everyone in this topic seems to have scattered info for advanced crowds, still hoping to find a simple guide.

1. Let’s say I have `/mnt/someStorage/`
2. Edit `/var/disocurse/containers/app.yaml` section about volumes. Add a -volume … info gets a bit scattered here. Somehow link to somewhere in /mnt/someStorage/somewhere?
3. ?

---

<div class="post-metadata">

### Author: ![dylanh724](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dylanh724/32/119642_2.png) [@dylanh724](https://meta.discourse.org/u/dylanh724)
#### Post date: [1 december 2017 om 00:47 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/29 "2017-12-01T00:47:03Z")

</div>

> [@pfaffman](#):
>
> mv uploads /mnt/volume-sfo2-01/uploads # script’d need to find this

Hmm, what do you mean by **#scriptd need to find this**

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [1 december 2017 om 00:48 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/30 "2017-12-01T00:48:02Z")

</div>

> [@dylanh724](#):
>
> volume-sfo2-01

I mean that `volume-sfo2-01` might not be the name of your volume.

---

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [1 december 2017 om 01:32 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/31 "2017-12-01T01:32:32Z")

</div>

> [@dylanh724](#):
>
> So what is recommended? Which CAN we move to volumes without too much of performance loss?

I’m interested in an official recommendation too. In the meantime, DigitalOcean Block Storage has been working quite well for image uploads for us, except that we do not incur high traffic — just around 200-300k views per month as by Google Analytics.

---

<div class="post-metadata">

### Author: ![dylanh724](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dylanh724/32/119642_2.png) [@dylanh724](https://meta.discourse.org/u/dylanh724)
#### Post date: [1 december 2017 om 01:36 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/32 "2017-12-01T01:36:12Z")

</div>

> [@pfaffman](#):
>
> Docker images don’t get that big if you purge them periodically, so don’t I understand why to bother moving them. What am I missing?

I didn’t even know you can purge, and sounds a bit scary to a Linux newb. This is why ;D I can move it and forget it

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [1 december 2017 om 01:38 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/33 "2017-12-01T01:38:44Z")

</div>

Here’s how to remove extra docker stuff:

```
./launcher cleanup

```

You’re really not going to be able to forget it. If you want to forget it, get someone else to do it for you.

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [2 december 2017 om 21:20 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/34 "2017-12-02T21:20:29Z")

</div>

If running `./launcher cleanup` is “a bit scary to a Linux newb”, you’re _really_ not going to like mounting extra filesystems and moving data around…

---

<div class="post-metadata">

### Author: ![dylanh724](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dylanh724/32/119642_2.png) [@dylanh724](https://meta.discourse.org/u/dylanh724)
#### Post date: [10 december 2017 om 12:55 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/35 "2017-12-10T12:55:25Z")

</div>

> [@mpalmer](#):
>
> If running ./launcher cleanup is “a bit scary to a Linux newb”, you’re really not going to like mounting extra filesystems and moving data around…

That’s why I’m here – I made a backup and I’m asking for a guide much like any of your other guides I followed and it worked fine. Disliking it isn’t going to magically give me more storage on my main drive 😉 asking for a guide like any of the other guides sounds like a fair request. Surely I’m not the only one~ When I first started with Discourse and DO last year, I never used Linux in my life.

> [@pfaffman](#):
>
> You’re really not going to be able to forget it. If you want to forget it, get someone else to do it for you.

If it’s on another volume, if remembering to add +gb to my volume is the worst thing that can happen, I’m game; it’s significantly better than wondering what to do if I run out of space on my main drive.

---

<div class="post-metadata">

### Author: ![sunnyt7](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunnyt7/32/71920_2.png) [@sunnyt7](https://meta.discourse.org/u/sunnyt7)
#### Post date: [5 maart 2018 om 14:05 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/36 "2018-03-05T14:05:24Z")

</div>

Would anyone recommend using Digital Ocean Block Storage as opposed to just integrating with Amazon S3 for image uploads?

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [6 maart 2018 om 01:03 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/37 "2018-03-06T01:03:36Z")

</div>

I’m sure DigitalOcean would.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [6 maart 2018 om 03:48 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/38 "2018-03-06T03:48:09Z")

</div>

Last I looked, it claimed to be compatible with the Amazon api, but someone will need to do some work to support it. So right now, your options are to use S3 or (pay someone to) develop a plugin to support it.

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [6 maart 2018 om 03:49 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/39 "2018-03-06T03:49:13Z")

</div>

He’s asking about block storage, not object storage.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [6 maart 2018 om 03:56 UTC](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535/40 "2018-03-06T03:56:27Z")

</div>

In that case, you’re right!

If you don’t have and don’t want to have an account with the Amazon, then block storage is a fine solution. I’ve not bothered to figure out S3 (which doesn’t seem that hard) myself, so I’m using block storage right now!

[Previous page](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535.md?page=1)

[Next page](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digitalocean-block-storage-for-image-uploads/49535.md?page=3)
