Follow this step-by-step guide to configure and deploy your AI-powered chat platform using Docker on an Ubuntu server.
💡 Note: We recommend using this documentation as your main guide. If you encounter any issues or get stuck during installation, you can use our Chat Agent to guide you through.
Before you begin, ensure you have the following ready:
@.All configuration is managed in a single file: .env. Open the
.env file in the root directory (do NOT use
.env.local as it's for development only) and fill in the
following details:
| Variable | Description |
|---|---|
| DOMAIN | Your domain name (e.g., chattie.com or app.chattie.com) |
| CERTBOT_EMAIL | Your email for SSL certificate notifications |
| Variable | Description |
|---|---|
| NEXT_PUBLIC_DRIZZLE_DATABASE_URL | Dashboard → Connect (in the navbar) → Session pooler (select in Method dropdown) → Copy connection string at port 5432 |
| NEXT_PUBLIC_SUPABASE_URL | Dashboard → Connect (in the navbar) → API keys → Project URL |
| NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY | Dashboard → Connect (in the navbar) → API keys → Copy Anon Key (Legacy) |
| Variable | Description |
|---|---|
| NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | Your Clerk Publishable Key |
| CLERK_SECRET_KEY | Your Clerk Secret Key |
| Variable | Description |
|---|---|
| STRIPE_SECRET_KEY | Your Stripe Secret Key |
| STRIPE_WEBHOOK_SECRET | Your Stripe Webhook Secret |
| PAYPAL_CLIENT_ID | Your PayPal Client ID |
| PAYPAL_CLIENT_SECRET | Your PayPal Client Secret |
| PAYPAL_MODE | Set to sandbox for testing or live for production |
| PAYPAL_WEBHOOK_ID | Your PayPal Webhook ID |
| NEXT_PUBLIC_PAYPAL_CLIENT_ID | Your PayPal Client ID (public) |
| Variable | Description |
|---|---|
| NEXT_PUBLIC_GEMINI_API_KEY | API key for Google Gemini |
postgresql://postgres.gvggdffyfuqspfyszhfg:[YOUR-PASSWORD]@aws-1-eu-west-1.pooler.supabase.com:5432/postgres
[YOUR-PASSWORD] with your actual
database
password.
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYCLERK_SECRET_KEYWhat is Stripe? Stripe is the industry-standard payment processing platform. It handles subscriptions, one-time payments, and provides powerful APIs for your SaaS billing.
pk_test_) and Secret key (starts with
sk_test_).STRIPE_SECRET_KEY.
https://yourdomain.com/api/webhook/stripeyourdomain.com with your actual domain)checkout.session.completedcustomer.subscription.createdcustomer.subscription.updatedcustomer.subscription.deletedinvoice.payment_succeededinvoice.payment_failedSTRIPE_WEBHOOK_SECRET.
.env file you just edited).
chattie.zip.zip -r chattie.zip . inside the project folder.
scp to upload the zip file to
your server:scp path/to/chattie.zip root@YOUR_SERVER_IP:/root/
path/to/chattie.zip with the actual path and
YOUR_SERVER_IP with your server's IP address.
ssh root@YOUR_SERVER_IP
apt-get update
apt-get install unzip
unzip chattie.zip -d chattie-app
cd chattie-app
chmod +x deploy.sh
./deploy.sh
.envdocker compose logs -f to monitor the
startup processdocker compose logs -f
docker compose logs -f app
.env file,
rebuild./deploy.sh
docker compose restart
./deploy.sh