Skip to content

Deploying a Vibecoder App

Introduction

Vibecoder is an open-source coding collaboration and snippet platform. This guide shows how to package Vibecoder with a Dockerfile, configure environment secrets, persist user data, and deploy it to Klutch.sh over HTTP.

Prerequisites

  • GitHub repository containing your Dockerfile.
  • Backing database (e.g., PostgreSQL) if your Vibecoder setup requires one.
  • Klutch.sh project ready in klutch.sh/app.

Project structure

.
└── Dockerfile

Sample Dockerfile

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install --production
COPY . .
# Default Vibecoder port
ENV PORT=3000
EXPOSE 3000
CMD ["npm", "run", "start"]

Required environment variables

  • PORT – internal port (default 3000).
  • APP_URL – public URL, e.g., https://example-app.klutch.sh.
  • If using Postgres: DATABASE_URL (e.g., postgres://USER:PASSWORD@HOST:PORT/DB).
  • JWT_SECRET or equivalent app secret for sessions/auth.

Optional environment variables

  • NODE_ENV=production
  • Email provider credentials if Vibecoder sends notifications.
  • Storage provider keys if using object storage for assets.

Persistence

If Vibecoder stores uploads or local cache:

  • Mount path: /app/data
  • Size: based on expected snippets/assets

Networking

  • Protocol: HTTP
  • Internal port: 3000
  • Users reach https://example-app.klutch.sh while Klutch.sh routes to port 3000 inside the container.
Terminal window
curl -I http://localhost:3000

Deployment on Klutch.sh

  1. Push your Dockerfile and source code to GitHub.
  2. In klutch.sh/app, create a new app and select GitHub as the source.
  3. Klutch.sh automatically detects the Dockerfile in the repository root.
  4. Select HTTP traffic and set the internal port to 3000.
  5. Add environment variables for APP_URL, secrets (e.g., JWT_SECRET), and database/storage settings. Mark sensitive values as secrets.
  6. Attach a persistent volume at /app/data if you store uploads locally.
  7. Deploy. Once live, log in to the Vibecoder UI to create your first project and snippets.

Verification

  • UI: open https://example-app.klutch.sh and confirm the Vibecoder dashboard loads.

  • Quick check:

    Terminal window
    curl -I https://example-app.klutch.sh

Next steps

  • Enforce strong secrets and rotate them periodically.
  • Enable database backups if using PostgreSQL.
  • Offload assets to object storage for better scalability.