Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Mastodon
  3. Changing my HostName in S3 without breaking the links

Changing my HostName in S3 without breaking the links

Scheduled Pinned Locked Moved Mastodon
3 Posts 3 Posters 521 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ehson_mokhtaryE Offline
    ehson_mokhtaryE Offline
    ehson_mokhtary
    wrote on last edited by
    #1

    Hello forum members,

    I'm encountering an issue with my Mastodon instance, and I could use some assistance in resolving it. I recently configured my Mastodon instance to use a custom asset host for media URLs. The goal was to change the format of media URLs from the default "s3-us-west-2.amazonaws.com" to "Media.Persiansmastodon.com."

    I made the necessary changes in my Mastodon configuration, including setting the S3_HOSTNAME variable to "Media.Persiansmastodon.com." However, despite these changes, new media uploads are not using the correct format ("Media.Persiansmastodon.com").
    also the old media files continue to use the original "s3-us-west-2.amazonaws.com" format. This has resulted in broken links for the old media.

    I've also restarted my Mastodon instance to apply the changes, but it hasn't resolved the issue.

    I would appreciate any insights or guidance on how I can make Mastodon load old media from the "s3-us-west-2.amazonaws.com" link while using the new format for newly uploaded media. If there are any specific configuration changes or steps I should follow, please let me know.

    Thank you for your help!

    jdaviescoatesJ 1 Reply Last reply
    2
    • girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      @ehson_mokhtary This is probably best asked in the upstream forum. I think https://github.com/mastodon/mastodon/discussions . Atleast in the docs, I found no mention of the behavior wrt old links. Looks like it will always use the new S3 configuration.

      1 Reply Last reply
      1
      • ehson_mokhtaryE ehson_mokhtary

        Hello forum members,

        I'm encountering an issue with my Mastodon instance, and I could use some assistance in resolving it. I recently configured my Mastodon instance to use a custom asset host for media URLs. The goal was to change the format of media URLs from the default "s3-us-west-2.amazonaws.com" to "Media.Persiansmastodon.com."

        I made the necessary changes in my Mastodon configuration, including setting the S3_HOSTNAME variable to "Media.Persiansmastodon.com." However, despite these changes, new media uploads are not using the correct format ("Media.Persiansmastodon.com").
        also the old media files continue to use the original "s3-us-west-2.amazonaws.com" format. This has resulted in broken links for the old media.

        I've also restarted my Mastodon instance to apply the changes, but it hasn't resolved the issue.

        I would appreciate any insights or guidance on how I can make Mastodon load old media from the "s3-us-west-2.amazonaws.com" link while using the new format for newly uploaded media. If there are any specific configuration changes or steps I should follow, please let me know.

        Thank you for your help!

        jdaviescoatesJ Offline
        jdaviescoatesJ Offline
        jdaviescoates
        wrote on last edited by
        #3

        @ehson_mokhtary you may also find some clues e.g. in these posts:

        https://github.com/cybrespace/cybrespace-meta/blob/master/s3.md

        (see e.g. this section https://github.com/cybrespace/cybrespace-meta/blob/master/s3.md#follow-up although I've no idea how you'd do that on Cloudron)

        https://chrishubbs.com/2022/11/19/hosting-a-mastodon-instance-moving-asset-storage-to-s3/

        I use Cloudron with Gandi & Hetzner

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Bookmarks
        • Search