···12122. point one or more handle domains to it (CNAME or reverse proxy)
13133. serves up profile and feed for that account only
14144. fetches data from public bsky app view API
1515+1616+1717+## Running athome
1818+1919+The recommended way to run `athome` is behind a `caddy` HTTPS server which does automatic on-demand SSL certificate registration (using Let's Encrypt).
2020+2121+Build and run `athome`:
2222+2323+ go build ./cmd/athome
2424+2525+ # will listen on :8200 by default
2626+ ./athome serve
2727+2828+Create a `Caddyfile`:
2929+3030+```
3131+{
3232+ on_demand_tls {
3333+ interval 1h
3434+ burst 8
3535+ }
3636+}
3737+3838+:443 {
3939+ reverse_proxy localhost:8200
4040+ tls YOUREMAIL@example.com {
4141+ on_demand
4242+ }
4343+}
4444+```
4545+4646+Run `caddy`:
4747+4848+ caddy run
4949+5050+5151+## Configuring a Handle
5252+5353+The easiest way, if there is no existing web service on the handle domain, is to get the handle resolution working with the DNS TXT record option, then point the domain itself to a `athome` service using an A/AAAA or CNAME record.
5454+5555+If there is an existing web service (eg, a blog), then handle resolution can be set up using either the DNS TXT mechanism or HTTP `/.well-known/` mechanism. Then HTTP proxy paths starting `/bsky` to an `athome` service.
5656+5757+Here is an nginx config snippet demonstrating HTTP proxying:
5858+5959+```
6060+location /bsky {
6161+ // in theory https:// should work, on default port?
6262+ proxy_pass http://athome.example.com:8200;
6363+ proxy_set_header X-Real-IP $remote_addr;
6464+ proxy_set_header Host $http_host;
6565+ proxy_set_header X-Forwarded-Proto https;
6666+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
6767+}
6868+```