This is the first part of the "Building Personal Blog Website" series. In the series we'll setup a free CMS to hold our blog content on Railway, cr...
For further actions, you may consider blocking this person and/or reporting abuse
Michał, thank you so much, you helped me out big time after a long struggle!
One thing missing, when I cloned the Strapi app, I had to create a .env file and place the matching keys in there. For the rest, it's working like a charm!
Glad it helped you! :)
You are right! The .env file is needed for local development, I'll update the guide soon. This part was there back when I used Heroku, but I guess I lost it during the Railway adjustments. Thanks for noticing!
Hey, great tutorial!
I have a problem though. Whenever I do stuff locally (add all the needed models, ...) and then I push. Railway rebuilds it (succesfully!) and it deploys (succesfully again), but whenever I go to /admin, it shows "An error occurred while requesting the API".
Any idea why this could be happening?
Does this issue occur when you try to go to /admin again? It happens to me from time to time, but usually as soon as I try opening admin panel for the second time it works :D
I think this could be related to refreshing the versions of your Strapi on Railway - something is not yet ready, but the status on Railway says that everything is done already. I didn't do any deeper investigation into this topic, so unfortunately I can't help you :(
I get this issue too. When accessing the /admin path on Railway It looks like the default setup you describe is trying to make XHR requests to localhost:1337.
Looking at the code, I think we need to set HOST and PORT variables in Railway but when trying that I just get an error complaining about the bindings?
Hey. I've solved by doing a normal Strapi setup (like you would normally do), instead of using the Strapi template which Railway provides, that looks rather outdated.
Now it's running all good! :)
This worked for me too!
I see below that you found the solution. I also had this problem in the last few days. You don't need to create a new Strapi setup, it seems you need to just use newer version of Strapi in your package.json (4.5.5 for example worked for me) :)
Is hosting strapi on railway free forever?
Hope there is no limit to it in as much I am using it for a small project just like Heroku free tier then.
There is a usage monthly limit as long as your account does not have any credits on it. I paid 5$ once and my app is working constantly for over half a year without any additional payments. And my account balance is still 5$.
Michał, you a legend, my friend. This is one of the most excellent tutorials that walk us through E2E, from local dev to production, and thanks to the railway platform, no ci/cd hassles!
Hey Michal, this is a great tutorial. I really enjoyed deploying my strapi to railway this way. Thank you so much for putting in the effort for writing this.
I am struggling with some issue. Every time I do a push to my repo, railway rebuilds my whole application and doing that it deletes my sqlite file database and with it all my configurations and data.
I don't want to commit my local sqlite file to my repo (as this will create more ux problems for sure), but I can't think in any other way for preventing my database from being deleted on each build.
Any ideas?
Unfortunately I don't have too much of an experience with SQlite, I usually use it only for local testing :) For deployment I usually go for a "real" database (like postgres in this example).
The same for me. I just used a MySQL remote that I have, and could make things work this way; trying to avoid costs for getting higher in Railway. Thank you so much for putting in the effort of writing those articles.
Hi.
When I install locally Graphql I have an error "Cannot use GraphQLScalarType "Time" from another module or realm." Then I use it npm dedupe && npm i graphql@latest && npm i @strapi/plugin-graphql. On localhost all works correctly.
But when I pushed it to git, railway had the next building trouble Server wasn't able to start properly. error: typeDefs must contain only strings, documents, schemas, or functions, got object
joxi.ru/p27GJOdsZ80qp2
I have next configuration in my package.json joxi.ru/vAW5B4wfRlk4Mm
Could anyone help me with this?
Dough!
I solve this remove "graphql": "^16.6.0", from dependencies in package.json and
using instead"@strapi/plugin-graphql": "^4.6.1"
joxi.ru/Vm6MNvWCKbxyMr
Don't forget this forum.strapi.io/t/enabling-graphql...
Hi can some1 help me with this problem..
When i hit https://[yourapp].up.railway.app/admin i get this screen
And have you tried opening this address after a few minutes?
And maybe that’s a stupid question but did you replace [yourapp] with the actual name of your app on railway?
Hi, tnx for the answer..it just started to work after 45 min wait :)))
I've got an issues on live domain, it show "Warning: An error occurred while requesting the API" when open [domain]/admin, but it runs normally on local, you have any idea about this?
Yes, there were some issues lately with Strapi on Railway. Best solution is to upgrade Strapi and all plugins to the latest version in your package.json (I used 4.5.5). I'll add the annotation to this blog post as many people had this issue.
it's works now, thanks for the answer
Do you can post your project in github and show me your solucion? I spend some days trying fix this
How is it that when you deploy a new change to Strapi, you are then able to login with the same credentials? The Postgres DB is NOT persistent (confirmed by railway.app staff) between builds so how was it possible in your guide?
Really great job done by you, i stop using wordpress now :)