RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Eruo Fredoline
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
  1. >
  2. Home
  3. /Learn
  4. /Courses
  5. /First Local Chatbot
  6. /Ch. 13
First Local Chatbot

13. LAN Deployment

Chapter 13 of 15 · 15 min
KEY INSIGHT

Binding to `0.0.0.0` exposes the service on all network interfaces; `127.0.0.1` limits it to the local machine only.

To serve on the local network so other devices can access the chatbot:

# Find your LAN IP
ip addr show | grep "inet "        # Linux
ipconfig getifaddr en0              # macOS

# Start the server on all interfaces
uvicorn app.main:app --host 0.0.0.0 --port 8000

Other devices on the same network access the chatbot at http://<your-lan-ip>:8000.

A failure mode: the firewall on Linux blocks incoming connections by default. Fix with:

sudo firewall-cmd --add-port=8000/tcp --permanent   # firewalld
sudo ufw allow 8000/tcp                              # ufw

On macOS, go to System Preferences > Security & Privacy > Firewall > Firewall Options and allow Python or uvicorn.

For HTTPS (required for some browser features on non-localhost), use a self-signed certificate:

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
uvicorn app.main:app --host 0.0.0.0 --port 8000 --ssl-keyfile key.pem --ssl-certfile cert.pem

Browsers will show a certificate warning for self-signed certs. Users must accept the risk.

Local verification checkpoint

Run the smallest example from this chapter in a local workspace and record the package version, runtime, data path, and observed output. If the result depends on model size, vector count, CPU/GPU backend, or available memory, note that constraint beside the exercise so the lesson remains reproducible.

Local verification checkpoint

Run the smallest example from this chapter in a local workspace and record the package version, runtime, data path, and observed output. If the result depends on model size, vector count, CPU/GPU backend, or available memory, note that constraint beside the exercise so the lesson remains reproducible.

EXERCISE

From a second device on the same network, navigate to the chatbot and verify streaming works end-to-end.

← Chapter 12
UI Polish
Chapter 14 →
Docker Deployment