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
  • Brite
  • 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 - Status | 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 1.1k 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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        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