Hosting a full-stack application
sasantazayoni
FREEOP

8 months ago

I am selling my application to client so I will initially ask them to open an account and then they will continue to pay for this service.

I am new to full-stack hosting and I am not very familiar with the DevOps side of things. I have no idea how to host a full-stack website. I tried to host on Render just a demo but my backend keeps choking on the config so I just decided to go for the actual site that I wanted to pay for. I am really not sure what to do. Is there any support for setting up the hosting?

Solved$10 Bounty

Pinned Solution

colinrm000
HOBBY

8 months ago

Of course! 🙂

For the template:

A Template is a "Deploy on Railway" blueprint of your project (services, build/run commands, env vars, plugins, etc.).

You create it from an existing project: Project > Settings > "Generate Template from Project" (or start from a repo).

Your client clicks the template link, and it deploys into their Railway account as a brand‑new project. They own it and pay for it. You could be added as a collaborator.

How credits work:

I am not exactly sure what you mean by the credits system, unless you're just referring to railways credit system for billing.

Credits are just an account balance (think dollars) that usage draws from.

Using an external Postgres:

Yes, totally fine. Just set DATABASE_URL to your external DB connection string. I would just typically try to pick a DB region close to your Railway services to keep latency low.

7 Replies

Railway
BOT

8 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


irazvan2745
FREE

8 months ago

2 services, frontend and backend, let railpack do its job 😉


colinrm000
HOBBY

8 months ago

Yes—Railway can host a full‑stack app. Create separate services for frontend, backend, and database, wire env vars, add a custom domain, and you’re live. For clients: either let them deploy to their own Railway via a Template (they pay) or you host multi‑tenant in your project (you pay, you bill them).

I currently run two full-stack apps personally through Railway! One for a client, and one for myself.


sasantazayoni
FREEOP

8 months ago

Thank you for your responses. How does the template work? Also how does the credits system work? Is it numbers of hours used or what? I also have an external postgres DB - that's ok right?


sasantazayoni

Thank you for your responses. How does the template work? Also how does the credits system work? Is it numbers of hours used or what? I also have an external postgres DB - that's ok right?

colinrm000
HOBBY

8 months ago

Of course! 🙂

For the template:

A Template is a "Deploy on Railway" blueprint of your project (services, build/run commands, env vars, plugins, etc.).

You create it from an existing project: Project > Settings > "Generate Template from Project" (or start from a repo).

Your client clicks the template link, and it deploys into their Railway account as a brand‑new project. They own it and pay for it. You could be added as a collaborator.

How credits work:

I am not exactly sure what you mean by the credits system, unless you're just referring to railways credit system for billing.

Credits are just an account balance (think dollars) that usage draws from.

Using an external Postgres:

Yes, totally fine. Just set DATABASE_URL to your external DB connection string. I would just typically try to pick a DB region close to your Railway services to keep latency low.


8 months ago

Could you give us more details about your project?

- Technologies used (frontend, backend, database, etc.);

- Whether the backend and frontend are separate as two projects.


sasantazayoni
FREEOP

8 months ago

thank you colinrm000

So I originally looked at hosting platforms for the full-stack and I went for render first because they had a free tier so that I could actually try it out. I didn't realise Railway had a free tier too (temporary one). Railway based on reviews and online threads is actually my preferred choice. I could not get it working initially on render because there were some mismatches in my code frontend and backend which took me a while to figure out. It is sorted out now and hosted on render. I wanted to use this as a demo to allow my client to play around with seeded (fake) data to try out the app. Then I plan to open a paid account with Railway, in which he will pay for. So I guess I just need to follow through with the instructions an it should be OK. Obviously if I get stuck, I'll come back and cry here again 😄 !

mardonedias --> I have made a form manager which calculates scores based on how clients of my client fill out forms and then mails the results back to a database which can be retrieved by the original sender and the data is shown in a chart according to how the questions were answered. This is a full stack project made with React frontend and a nodeJS backend, also using Typescript. I have used Express to wire up the routes. There are API calls that communicate with the database and retrieve/send data back and forth via the frontend APIs. I am using axios. The backend is separate from the frontend and they communicate via the APIs but they are both within the same overall project. I also have a base HTML file for injecting the react code, some custom CSS, Tailwind, test files are in plain JS using vitest, Prisma is used with Postgres to communicate with a Neon database (all data is stored here).

The issues I had was a discrepancy between the pathing of the frontend and backend in the production environment but that's fine now!


Status changed to Solved ray-chen • 8 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...