Skip to content

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:

curl -sSL https://dokploy.com/install.sh | sh

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:

  1. Create a new Project
  2. Add a Service
  3. Service type: Docker Compose
  4. Connect your Git provider (GitHub) and select this repository
  5. Set the Compose file path to:
  6. ./docker-compose.yml

5. Configure Environment Variables

This compose expects two env files (not committed):

  • backend/docker/.env.backend
  • frontend/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.example
  • frontend/docker/.env.frontend.example

At minimum, backend requires:

  • SUPABASE_URL
  • SUPABASE_KEY
  • LNA_LLM_PROVIDER + provider credentials (ex: DEEPSEEK_API_KEY if using DeepSeek)

6. Attach Domains + Enable TLS

In Dokploy, attach domains to each service:

  • Frontend domain: app.your-domain.com -> service frontend port 3000
  • Backend domain: api.your-domain.com -> service backend port 8001

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/health
  • https://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 an ollama container to docker-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).