7 months ago
Hi everyone,
I'm having an issue with the private / public networks for my fastAPI app.
I've read your docs and tried to get internal docs working.
To do this, I've set the start command to --host :: (and that worked perfectly for the internal link).
But then the host is set to :: the public domain won't work.
And if the start command is set to --host 0.0.0.0 then the internal link won't work.
How do I get both up and running at the same time?
Pinned Solution
7 months ago
I did.
Just figured out the issue!
In the end it turned out that the issue was with using uvicorn.
It looks like uvicorn can't bind to both ipv4 and v6.
So I ended up setting up gunicorn to start my fastAPI app.
4 Replies
7 months ago
Hey there! We've found the following might help you get unblocked faster:
🧵 Internal Networking Issue: Prometheus Cannot Connect to Django App Despite Correct Configuration
🧵 Flask to Postgres Private Network: Could not translate hostname postgres.railway.internal
🧵 Connection failing between NextJS Frontend and FastAPI <> PostgreSQL backend
If you find the answer from one of these, please let us know by solving the thread!
7 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 8 months ago
7 months ago
All good Brody - but any idea why this might be happening?
7 months ago
Have you checked if the public domain is pointing to the correct port under Settings - Public Networking ?
7 months ago
I did.
Just figured out the issue!
In the end it turned out that the issue was with using uvicorn.
It looks like uvicorn can't bind to both ipv4 and v6.
So I ended up setting up gunicorn to start my fastAPI app.
Status changed to Solved brody • 8 months ago

