PythonAnywhere Forums

Static IP

I need my app to run on a static IP address. It needs to talk to an external API whose owners want to whitelist my app's IP address.

Is this possible on PythonAnywhere?

Thanks much.


No, it's not. The source IP address can change for a whole number of reasons and they're not always predictable.

Figured that was probably the case but thought I'd ask.


Are there any suggested workarounds for this type of problem?

I am also very interested in this as well. Because MongoDB is not an option I need to connect to a remote database that usually requires a whitelist IP address.

So you can definitely connect to a third party mongdodb service as a paid user (eg: mongolabs etc), that doesn't have IP restrictions. See this for how to setup the mongo cli etc as well.

It looks like sites like MongoDB Atlas you can bypass the IP restriction by allowing all ( to whitelist). This is fine for Dev but I need to see how much it bothers me in the production environment.

Seems like a static ip should be a feature you could buy for some small amount of $...

I have a similar conundrum...

I have a pythonanywhere script that uses a API get request with a key that is generated for a specific ip. The pythonanywhere ip's change and you don't know what it will be. I have been using a proxy and specifying the proxy in the get request with a key generated for the known proxy ip (which i get from and it works fine. But those proxies go up and down.

I have a computer running linux/ubuntu at home and am looking into using tinyproxy to run a proxy server. However, my initial attempts haven't worked. I think I'm doing something wrong with the config.

Wondering if anyone else has done something similar?

no-one in the office has configured tinyproxy i'm afraid... maybe someone else out there? you might also try posting this question elsewhere...

in the meantime i'll note a +1 for the "static ip as a service", but I have to say that feels like a lot of work for us to implement, for quite a niche market, so i'm not sure it's likely to get worked on in the short term...

Thanks for input harry. I don't expect pa to implement a static ip service, I can see why that would be complicated with low utility. Was just wondering if anyone else had developed a similar or different work around. I'm also asking for help with the tinyproxy elsewhere. Besides, it's a good project for me to work on ;)

You guys do a great job at pa! Thank you!

well thank you kindly :)