Skip to main content
 _    _                      _   _           _
| |  | |                    | | | |         | |
| |__| | ___  _ __ ___   ___| |_| | ___  ___| |_
|  __  |/ _ \| '_ ` _ \ / _ \ __| |/ _ \/ __| __|
| |  | | (_) | | | | | |  __/ |_| | (_) \__ \ |_
|_|  |_|\___/|_| |_| |_|\___|\__|_|\___/|___/\__|

Turn your laptop into a web server in 3 minutes.

CI PyPI License: MIT Python 3.10+

HomeHost is an open-source CLI tool that lets you host websites and web apps directly from your laptop — no cloud account, no credit card, no DevOps degree required. It auto-detects your project type, configures Caddy as your web server, and optionally creates a free Cloudflare Tunnel so anyone on the internet can reach your site.


The 3-Minute Golden Path

# 1. Install
pip install homehost

# 2. (First time only) check your system
homehost setup

# 3. Point it at your project and serve
cd ~/my-website
homehost serve .

# You'll see:
#
#  ✓ Detected: Static HTML/CSS/JS (Found index.html)
#  ✓ Port: 8080
#
#  ╭──────────────── ✓  my-website is running ────────────────╮
#  │   Local:    http://localhost:8080                        │
#  │   Network:  http://192.168.1.42:8080  (same Wi-Fi)      │
#  │                                                          │
#  │   Press Ctrl+C to stop.                                  │
#  ╰──────────────────────────────────────────────────────────╯
#
#  [QR code for mobile access]

Want it public? Add --public:

homehost serve . --public

#  ╭──────────────── ✓  my-website is running ────────────────╮
#  │   Local:    http://localhost:8080                        │
#  │   Network:  http://192.168.1.42:8080                     │
#  │   Public:   https://proud-tiger-42.trycloudflare.com     │
#  ╰──────────────────────────────────────────────────────────╯

Share the public URL with anyone. It works immediately, with HTTPS, from any device.


Installation

macOS / Linux

pip install homehost

Windows

pip install homehost

Windows PATH note: If homehost isn't found after install, run:

python -m homehost --version

If that works, add Python's Scripts folder to your PATH:

# Find the Scripts path
python -c "import sysconfig; print(sysconfig.get_path('scripts'))"
# Then add that path to your System Environment Variables → PATH

Or install with pipx which handles PATH automatically:

pip install pipx
pipx install homehost

Requirements: Python 3.10+, macOS 12+ or Windows 10/11.

HomeHost automatically installs Caddy and cloudflared when you first run homehost setup.


Quick Start

Step 1 — Install

pip install homehost

Step 2 — Check your system (first time only)

homehost setup

This runs homehost doctor to verify your environment and show how to install Caddy and cloudflared if they're missing. Output looks like:

  ✓  python: Python 3.12.2
  ✓  internet: Internet reachable
  ✓  disk: 20.0 GB free
  ✓  node: Node.js 22.1.0
  ○  caddy: Caddy not found
     → Install: brew install caddy  (macOS)
     → Install: winget install CaddyServer.Caddy  (Windows)
  ○  cloudflared: not found (needed for --public tunnels)
     → Install: brew install cloudflared  (macOS)

Step 3 — Serve your project

cd /path/to/your/project
homehost serve .

HomeHost auto-detects your project type and starts the right server. Press Ctrl+C to stop.

Step 4 — Go public (optional)

homehost serve . --public

Creates a free https://*.trycloudflare.com URL (no account required). Share it anywhere.

Step 5 — Open the web dashboard

Navigate to http://localhost:9111 while a project is running. You'll find project status, request logs, and traffic graphs.


CLI Reference

homehost serve — the main command

homehost serve [PATH] [OPTIONS]
Option Default Description
PATH . (current dir) Project directory to serve
--port, -p auto (8080–8099) Port to listen on
--public off Start a free Cloudflare Tunnel for internet access
--type, -t auto-detected Force project type: static, flask, fastapi, django, nextjs, react, node
--name, -n directory name Override the project display name
--no-reload off Disable file-change auto-reload

Examples:

homehost serve .                              # serve current directory
homehost serve ~/my-site                      # serve a specific path
homehost serve . --public                     # with public tunnel
homehost serve . --port 3000                  # on a specific port
homehost serve . --type flask                 # force project type
homehost serve . --public --no-reload         # public, no auto-reload

All commands

Command Description
homehost serve [path] Main command. Detect, register, and start serving a directory.
homehost serve [path] --public Start with a free Cloudflare Tunnel (public internet access)
homehost setup Check system dependencies and show how to install missing ones
homehost doctor Detailed system diagnostics
homehost new <template> <name> Scaffold a new project from a starter template
homehost start [project] Start a previously-registered project by name
homehost stop [project] Stop a running project
homehost stop --all Stop all running projects
homehost restart [project] Restart a project
homehost status Table view of all registered projects and their status
homehost list Short list of all projects
homehost logs [project] Stream logs for a project
homehost logs [project] --follow Live-tail logs
homehost dashboard Open the web dashboard in your browser
homehost config Show global config
homehost config [project] Show a project's config
homehost tunnel [project] Start/stop public tunnel for a registered project
homehost uninstall Remove all HomeHost data and config
homehost update Update HomeHost to the latest version
homehost --version Print version

Starter Templates

Create a new project from scratch:

homehost new static my-portfolio    # HTML/CSS/JS starter
homehost new flask my-api           # Flask app
homehost new fastapi my-backend     # FastAPI app with auto-docs

Then serve it:

cd my-portfolio
homehost serve .

Supported Project Types

HomeHost auto-detects your project type — no config file needed.

Type Detected by How it's served
Static HTML index.html in root Python's built-in HTTP server (or Caddy if installed)
Flask requirements.txt contains flask flask run via gunicorn
FastAPI requirements.txt contains fastapi uvicorn main:app
Django requirements.txt contains django python manage.py runserver
Next.js package.json with next dependency npx next start
React package.json with vite or react-scripts npm start
Node.js package.json without a specific framework npm start

Override detection with --type:

homehost serve . --type flask

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                        Your Machine                             │
│                                                                 │
│  Your Files / App                                               │
│        │                                                        │
│        ▼                                                        │
│  ┌──────────────────────────────────────────────┐              │
│  │  Caddy (web server / reverse proxy)          │              │
│  │  - Serves static files                       │              │
│  │  - Proxies Flask / FastAPI / Node apps       │              │
│  │  - Security headers (CSP, HSTS, etc.)        │              │
│  │  - Rate limiting                             │              │
│  └───────────────────────┬──────────────────────┘              │
│                          │                                      │
│  ┌───────────────────────▼──────────────────────┐              │
│  │  cloudflared (optional, --public only)        │              │
│  │  - Encrypted outbound tunnel to Cloudflare   │              │
│  │  - No firewall ports opened                  │              │
│  │  - Free *.trycloudflare.com URL              │              │
│  └───────────────────────┬──────────────────────┘              │
│                          │                                      │
│  HomeHost CLI            │    Web Dashboard                     │
│  homehost serve .   ─────┘    http://localhost:9111             │
└─────────────────────────────────────────────────────────────────┘
                           │
                           ▼
                    Public Internet

The tunnel creates an outbound-only encrypted connection — your IP address is never exposed directly.


HomeHost vs. the Alternatives

HomeHost Ngrok LocalTunnel Vercel
Price Free Freemium Free Freemium
Runs on your machine ✅ ✅ ✅ ❌
HTTPS ✅ ✅ ✅ ✅
Custom domains ✅ via Cloudflare 💰 Paid ❌ 💰 Paid
Python apps ✅ ✅ ✅ ❌
Auto-detect project type ✅ ❌ ❌ ✅
Exposes your IP ❌ ✅ ✅ ❌
Open source ✅ MIT ❌ ✅ ❌

Troubleshooting

homehost: command not found (Windows)

Python's Scripts directory isn't in your PATH. Fix it:

# Option A — use python -m
python -m homehost serve .

# Option B — install with pipx (adds to PATH automatically)
pip install pipx && pipx install homehost

# Option C — find the Scripts path and add it to PATH manually
python -c "import sysconfig; print(sysconfig.get_path('scripts'))"

Caddy or cloudflared not installed

Run homehost setup — it will show the exact install command for your OS.

Port already in use

HomeHost auto-picks the next free port in 8080–8099. You can also specify one:

homehost serve . --port 9000

--public tunnel doesn't start

cloudflared must be installed. Run homehost setup to check. Install manually:

  • macOS: brew install cloudflared
  • Windows: winget install Cloudflare.cloudflared

Run the full diagnostic

homehost doctor

Contributing

git clone https://github.com/ParamChordiya/homehost.git
cd homehost
pip install -e ".[dev]"
pytest tests/unit/

See CONTRIBUTING.md for the full guide.


License

MIT — see LICENSE.


Made with care for developers who were tired of paying for hosting.
If HomeHost saves you time, consider giving it a ⭐ on GitHub.

Metadata

Release files for homehost 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for homehost 0.2.0
File Size Uploaded Provenance Actions
homehost-0.2.0.tar.gz 601.1 kB Without provenance Details for homehost-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for homehost 0.2.0
File Interpreter ABI Platform Actions
homehost-0.2.0-py3-none-any.whl Python 3 none any Details for homehost-0.2.0-py3-none-any.whl

Total release size: 774.9 kB

Release files / homehost-0.2.0.tar.gz

Download URL homehost-0.2.0.tar.gz
Size 601.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f51db30cdccfecdec154bf30d83d7d3cf2a21fa8834dddde851bc97fb32c65ad
BLAKE2b-256 checksum
How to use checksums
bce88e6e73edc6f717bdfa4fa553aeaed894355fbf1281e5f6f6004e937284f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Release files / homehost-0.2.0-py3-none-any.whl

Download URL homehost-0.2.0-py3-none-any.whl
Size 173.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ee40adcfa86be81a88be22c8a4955d1c4b6af27c908e6ab89ef43bcf4490a9b
BLAKE2b-256 checksum
How to use checksums
37d348cd90148166095bc33f2b26ce9dd1a5f2cdd794276ecedf57fc1481f5fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Security for homehost 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page