Getting both public and private networks to work
kevin-ox-digital
PROOP

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?

Solved$10 Bounty

Pinned Solution

kevin-ox-digital
PROOP

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

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


kevin-ox-digital
PROOP

7 months ago

All good Brody - but any idea why this might be happening?


smolpaw
HOBBY

7 months ago

Have you checked if the public domain is pointing to the correct port under Settings - Public Networking ?


kevin-ox-digital
PROOP

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


Loading...