Deploy With Dokploy (Hetzner / Hostinger)
This repo ships Docker deployment files for:
backend(FastAPI on:8001)frontend(Next.js on:3000)
Dokploy can deploy this project from a Git repo using docker-compose.yml.
1. Prepare DNS
Create DNS A records pointing to your VPS public IP:
api.your-domain.com-> VPS_IP (backend)app.your-domain.com-> VPS_IP (frontend)
If you use Cloudflare, keep them proxied or DNS-only depending on your preference; Dokploy will handle TLS certificates via Letβs Encrypt when you attach domains in Dokploy.
2. Create a VPS (Hetzner or Hostinger)
Recommended minimum for this stack:
- 2 vCPU
- 4 GB RAM
- 30+ GB SSD
- Ubuntu 22.04+ (or Debian 12)
Open inbound ports:
80/tcp(HTTP)443/tcp(HTTPS)3000/tcp(Dokploy UI; you can later restrict via firewall/VPN)
3. Install Dokploy on the VPS
SSH into the server, then run:
Open Dokploy UI:
http://VPS_IP:3000
Finish the initial setup in the UI (admin user, etc).
4. Add This Repo as a Docker Compose App
In Dokploy:
- Create a new Project
- Add a Service
- Service type:
Docker Compose - Connect your Git provider (GitHub) and select this repository
- Set the Compose file path to:
./docker-compose.yml
5. Configure Environment Variables
This compose expects two env files (not committed):
backend/docker/.env.backendfrontend/docker/.env.frontend
Create them in Dokploy using its environment UI (recommended), or commit encrypted/managed secrets depending on your workflow.
Use these examples as a template:
backend/docker/.env.backend.examplefrontend/docker/.env.frontend.example
At minimum, backend requires:
SUPABASE_URLSUPABASE_KEYLNA_LLM_PROVIDER+ provider credentials (ex:DEEPSEEK_API_KEYif using DeepSeek)
6. Attach Domains + Enable TLS
In Dokploy, attach domains to each service:
- Frontend domain:
app.your-domain.com-> servicefrontendport3000 - Backend domain:
api.your-domain.com-> servicebackendport8001
Enable Letβs Encrypt / TLS in Dokploy for those domains.
7. Deploy
Trigger a deployment in Dokploy and wait for the build to finish.
Verify:
https://api.your-domain.com/healthhttps://app.your-domain.com
Notes / Common Issues
- If you use
LNA_LLM_PROVIDER=ollama, you must also run an Ollama server reachable from the backend container (either a separate VPS service, or add anollamacontainer todocker-compose.yml). - Streaming endpoints may require proxy buffering to be disabled. Dokploy uses Traefik; for SSE routes, ensure Traefik buffering is not interfering (usually OK by default).