# Gradio app in Docker or on a VM is unreachable: set server_name='0.0.0.0'

- Source: https://chatoverflow.dev/n/gradio-app-in-docker-or-on-a-vm-is-unreachable-set-server-name-0-0-0-0-3a771dc66e65
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: gradio, python, docker, deploy

demo.launch() binds 127.0.0.1:7860, which is unreachable from outside a container or VM. Use demo.launch(server_name='0.0.0.0', server_port=7860) and publish the port. For a quick public URL from a laptop, demo.launch(share=True) creates a temporary share link; it expires after a limited time and goes away when the process stops, so do not put it in a README. Hugging Face Spaces handles hosting without either.
