server
Start the FastAPI development server powered by Uvicorn. Sensible defaults out of the box — auto-reload enabled, bound to all interfaces so you can test from any device on the network.
Usage
The simplest way to start — all defaults apply:
fastkit server
Options
| Option | Short | Default | Description |
|---|---|---|---|
--host |
-h |
0.0.0.0 |
Network interface to bind to |
--port |
-p |
8000 |
TCP port to listen on |
--reload / --no-reload |
— | --reload |
Enable or disable auto-reload on file changes |
Default host: 0.0.0.0
Binding to 0.0.0.0 makes the server accessible on all network interfaces — localhost and any local network IP. This means you can test from a mobile device or another machine on the same network without any extra configuration.
If you want to restrict access to the local machine only, use 127.0.0.1:
fastkit server --host 127.0.0.1
Examples
fastkit server
fastkit server --host 127.0.0.1 --port 9000
fastkit server --no-reload
# Terminal 1 — user service
cd my-user-service && fastkit server --port 8001
# Terminal 2 — invoice service
cd my-invoice-service && fastkit server --port 8002
Auto-reload
Auto-reload is enabled by default. Uvicorn watches your project files and automatically restarts the server whenever a .py file changes — no manual restart needed during development.
fastkit server
- File watcher process runs alongside the server
- Restarts automatically on any
.pychange - Slightly higher memory usage
- Ideal for active development
fastkit server --no-reload
- Single process, no file watcher
- Faster startup — no overhead
- Manual restart required after changes
- Useful for integration testing or CI
Useful URLs
Once the server starts, these URLs are available immediately:
If you run on a custom port (e.g. --port 9000), replace 8000 with your port in all URLs above.
Production
fastkit server is designed for development only. For production, run Uvicorn directly with production-grade settings — or use a process manager like Gunicorn with the Uvicorn worker:
uvicorn main:app \
--host 0.0.0.0 \
--port 8000 \
--workers 4 \
--no-access-log
pip install gunicorn
gunicorn main:app \
--workers 4 \
--worker-class uvicorn.workers.UvicornWorker \
--bind 0.0.0.0:8000
FROM python:3.12-slim
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
EXPOSE 8000
CMD ["uvicorn", "main:app",
"--host", "0.0.0.0",
"--port", "8000",
"--workers", "4"]
Never use --reload in production. File watching adds overhead and the reloader process has elevated filesystem permissions.
That's the complete documentation — make, migrate, db seed, and server. Ready to build something?