> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runalph.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy a Web App

> Go from notebook prototype to live web app with a public URL

## Why

You prototyped something in a notebook. Now you want to share it. Alph gives every project a public URL — start a web server and it's live.

## Quick Start

1. Start your app on port 5000, bound to `0.0.0.0`
2. It's live at `https://{org}-{project}.runalph.dev`

That's it. No Docker, no deploy commands, no config files.

## Framework Examples

### Streamlit

```python theme={null}
# app.py
import streamlit as st
st.title('My Dashboard')
st.write('Hello from Alph!')
```

```bash theme={null}
streamlit run app.py --server.port 5000
```

### Gradio

```python theme={null}
import gradio as gr

def greet(name):
    return f"Hello {name}!"

demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch(server_port=5000, server_name="0.0.0.0")
```

### FastAPI

```python theme={null}
from fastapi import FastAPI
import uvicorn

app = FastAPI()

@app.get("/")
def read_root():
    return {"message": "Hello from Alph!"}

if __name__ == "__main__":
    uvicorn.run(app, host="0.0.0.0", port=5000)
```

## Keep It Running

```bash theme={null}
# tmux (recommended)
tmux new -s webapp
python app.py
# Detach: Ctrl+B, then D

# Or nohup
nohup python app.py > app.log 2>&1 &
```

## Custom Domains

Serve from your own domain instead of `runalph.dev`:

1. Go to **Settings > Domains** in your project
2. Add your domain (e.g., `app.example.com`)
3. Create a CNAME record pointing to the tunnel hostname shown
4. Click **Verify** — SSL is provisioned automatically

Works with subdomains and apex domains (if your DNS provider supports CNAME flattening).
