Bucket storage not switching
franklinson
PROOP

8 days ago

Hello,

Anytime I switched from AWS SDK to django storages it reverts to AWS SDK. Screenshot attached

Screenshot 2026-08-13 at 3.30.07 PM.png

Attachments

Solved$20 Bounty

Pinned Solution

manuproject
HOBBY

7 days ago

if you're renaming things inside that connect-to-bucket screen, that's the same bug, it's going to keep resetting no matter what you pick there.

skip that screen for naming. go to your service's Variables tab directly and add your own variables by hand: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_STORAGE_BUCKET_NAME, AWS_S3_ENDPOINT_URL, AWS_S3_REGION_NAME, AWS_S3_ADDRESSING_STYLE=path. for the values, reference your bucket's actual credentials using railway's variable reference syntax so they stay in sync, don't type the raw values by hand. that bypasses the wizard completely so it can't reset anything.

15 Replies

Railway
BOT

8 days ago

This is a question the Railway community is better placed to answer than support: people who have built the same thing and can tell you what actually worked for them.

So we'd like to open your thread as a community bounty. Railway pays a bounty to the community member who answers it, and threads like this usually get picked up quickly.

Opening it makes this entire thread public, including everything already posted. Nothing becomes public until you decide. Use the buttons below.

  • Open to the community - Before you click, take a moment to edit or remove anything you'd rather not share. The thread becomes publicly visible right away.
  • Keep it private and close the thread - Nothing becomes public and the thread closes.

Status changed to Awaiting User Response Railway 8 days ago


Railway
BOT

8 days ago

This thread has been opened as a public bounty so the community can help solve it. The thread and any further activity are now visible to everyone.

Status changed to Open Railway 8 days ago


Have you tried performing the action in an incognito browser?


franklinson
PROOP

8 days ago

Yes I did


0x5b62656e5d

Have you tried performing the action in an incognito browser?

franklinson
PROOP

8 days ago

Lemme give that a try


franklinson

Lemme give that a try

Did it work?


0x5b62656e5d

Did it work?

franklinson
PROOP

7 days ago

It didnt


franklinson

It didnt

manuproject
HOBBY

7 days ago

not sure why the dropdown keeps snapping back, couldn't find anyone else reporting that exact bug, might just be a glitch, worth trying a refresh or different browser first.

but you don't really need that dropdown to work anyway. just set these env vars yourself on the service, pointing at your bucket's actual credentials: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_STORAGE_BUCKET_NAME, AWS_S3_ENDPOINT_URL, AWS_S3_REGION_NAME, and add AWS_S3_ADDRESSING_STYLE=path (railway needs that one specifically). that's all django-storages needs, the dropdown was just a shortcut for filling those in.


manuproject

not sure why the dropdown keeps snapping back, couldn't find anyone else reporting that exact bug, might just be a glitch, worth trying a refresh or different browser first. but you don't really need that dropdown to work anyway. just set these env vars yourself on the service, pointing at your bucket's actual credentials: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_STORAGE_BUCKET_NAME, AWS_S3_ENDPOINT_URL, AWS_S3_REGION_NAME, and add AWS_S3_ADDRESSING_STYLE=path (railway needs that one specifically). that's all django-storages needs, the dropdown was just a shortcut for filling those in.

franklinson
PROOP

7 days ago

So I have my own way of naming my credentials which are just as what django storages is in the bucket. Because its not matching especially the AWS_STORAGE_BUCKET_NAME, AWS_S3_ENDPOINT_URL with AWS SDK, I get error when uploading files. Error of bucket name not found.


franklinson

So I have my own way of naming my credentials which are just as what django storages is in the bucket. Because its not matching especially the AWS_STORAGE_BUCKET_NAME, AWS_S3_ENDPOINT_URL with AWS SDK, I get error when uploading files. Error of bucket name not found.

manuproject
HOBBY

7 days ago

that error usually means the addressing style is wrong, not the variable names themselves. by default boto3/django-storages tries to put the bucket name into the domain itself, like bucketname.endpoint.com, but railway doesn't support that. you need to add one more variable: AWS_S3_ADDRESSING_STYLE=path

that tells it to put the bucket name in the url path instead of the domain, which is what railway actually needs. add that one and re-try the upload.


manuproject

that error usually means the addressing style is wrong, not the variable names themselves. by default boto3/django-storages tries to put the bucket name into the domain itself, like bucketname.endpoint.com, but railway doesn't support that. you need to add one more variable: AWS_S3_ADDRESSING_STYLE=path that tells it to put the bucket name in the url path instead of the domain, which is what railway actually needs. add that one and re-try the upload.

franklinson
PROOP

7 days ago

I actually have that, I changed the namings in the credentials but still changes back to the default of the AWS SDK


franklinson

I actually have that, I changed the namings in the credentials but still changes back to the default of the AWS SDK

manuproject
HOBBY

7 days ago

if you're renaming things inside that connect-to-bucket screen, that's the same bug, it's going to keep resetting no matter what you pick there.

skip that screen for naming. go to your service's Variables tab directly and add your own variables by hand: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_STORAGE_BUCKET_NAME, AWS_S3_ENDPOINT_URL, AWS_S3_REGION_NAME, AWS_S3_ADDRESSING_STYLE=path. for the values, reference your bucket's actual credentials using railway's variable reference syntax so they stay in sync, don't type the raw values by hand. that bypasses the wizard completely so it can't reset anything.


manuproject

if you're renaming things inside that connect-to-bucket screen, that's the same bug, it's going to keep resetting no matter what you pick there. skip that screen for naming. go to your service's Variables tab directly and add your own variables by hand: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_STORAGE_BUCKET_NAME, AWS_S3_ENDPOINT_URL, AWS_S3_REGION_NAME, AWS_S3_ADDRESSING_STYLE=path. for the values, reference your bucket's actual credentials using railway's variable reference syntax so they stay in sync, don't type the raw values by hand. that bypasses the wizard completely so it can't reset anything.

franklinson
PROOP

7 days ago

Yes thats what I did and worked but what I dont get is why it switched back. I am working on a pypi project here is the link https://pypi.org/project/django-railway-storage/ you can have a look. Now I have to use the generic and django storages both in the project.

Thanks for the help


franklinson

Yes thats what I did and worked but what I dont get is why it switched back. I am working on a pypi project here is the link https://pypi.org/project/django-railway-storage/ you can have a look. Now I have to use the generic and django storages both in the project. Thanks for the help

manuproject
HOBBY

7 days ago

okay so is your problem resolved now ?? im going to check it out


manuproject

okay so is your problem resolved now ?? im going to check it out

franklinson
PROOP

7 days ago

Yes I have to use both variables in case its resolved in the future


0x5b62656e5d

Did it work?

manuproject
HOBBY

7 days ago

can you change it to solve now moderator OP said its resolved


Status changed to Solved uxuz 4 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...