Deploying a Revolt App
Introduction
Revolt is an open-source chat platform with channels, voice, and rich media. Deploying Revolt with a Dockerfile on Klutch.sh gives you reproducible builds, managed secrets, and persistent storage—all configured from klutch.sh/app. This guide covers installation, Dockerfile setup, environment variables, storage, Nixpacks overrides, and sample checks to verify your deployment.
Prerequisites
- A Klutch.sh account (sign up)
- A GitHub repository containing your Revolt Dockerfile (GitHub is the only supported git source)
- External MongoDB and optionally MinIO/S3 for attachments
- Domain and TLS for secure access
For onboarding, see the Quick Start.
Architecture and ports
- Revolt’s API typically serves HTTP on internal port
8000. Choose HTTP traffic and set the internal port to8000. - Persistent storage is recommended for file uploads if you store them locally; otherwise use S3/MinIO.
Repository layout
revolt/├── Dockerfile # Must be at repo root for auto-detection└── README.mdKeep secrets out of Git; store them in Klutch.sh environment variables.
Installation (local) and starter commands
Build and run locally (ensure MongoDB/MinIO are reachable):
docker build -t revolt-local .docker run -p 8000:8000 \ -e MONGODB_URI=mongodb://user:pass@localhost:27017/revolt \ -e ATTACHMENTS_BASE_URL=https://example-app.klutch.sh \ -e ATTACHMENTS_PATH=/app/storage \ revolt-localDockerfile for Revolt (production-ready)
Place this at the repo root; Klutch.sh auto-detects Dockerfiles.
FROM node:18-alpine AS builderWORKDIR /appCOPY package*.json ./RUN npm ciCOPY . .RUN npm run build
FROM node:18-alpine AS runnerWORKDIR /appENV NODE_ENV=productionENV PORT=8000COPY --from=builder /app/dist ./distCOPY --from=builder /app/package*.json ./RUN npm ci --omit=devEXPOSE 8000CMD ["npm", "run", "start"]Notes:
- Pin Node to the version Revolt supports; adjust if upstream changes.
- Keep the Dockerfile at the repo root; Docker selection is automatic in Klutch.sh.
Environment variables (Klutch.sh)
Set these before deploying:
PORT=8000MONGODB_URI=mongodb://<user>:<password>@<host>:27017/revolt- Optional attachment settings:
ATTACHMENTS_PATH=/app/storage(local)ATTACHMENTS_BASE_URL=https://example-app.klutch.sh- or S3-compatible:
S3_ENDPOINT,S3_BUCKET,S3_ACCESS_KEY,S3_SECRET_KEY
- Optional:
INVITE_ONLY=false, SMTP settings for notifications if supported
If deploying without the Dockerfile and relying on Nixpacks:
NIXPACKS_NODE_VERSION=18NIXPACKS_START_CMD=npm run start
Attach persistent volumes
If you store attachments locally, add storage in Klutch.sh (path and size only):
/app/storage— user-uploaded files.
Ensure the path matches your attachment configuration.
Deploy Revolt on Klutch.sh (Dockerfile workflow)
- Push your repository—with the Dockerfile at the root—to GitHub.
- Open klutch.sh/app, create a project, and add an app.
- Select HTTP traffic and set the internal port to
8000. - Add the environment variables above (MongoDB URI, attachment settings, optional SMTP).
- Attach a volume at
/app/storageif you keep uploads locally; size it for your media. - Deploy. Your app will be reachable at
https://example-app.klutch.sh; connect a client to start using Revolt.
Sample checks
Landing/API check:
curl -I https://example-app.klutch.shIf a health endpoint is available (replace if different):
curl -I https://example-app.klutch.sh/healthHealth checks and production tips
- Add an HTTP readiness probe to
/or your health endpoint. - Keep MongoDB and S3 credentials in Klutch.sh secrets; rotate regularly.
- Use external object storage for scalable attachments if possible; otherwise monitor
/app/storageand resize as needed. - Pin Docker base versions and test upgrades in staging before production.
Revolt on Klutch.sh delivers reproducible Docker builds, managed secrets, and optional attachment storage—without extra YAML or CI steps. Configure ports, env vars, and storage, then launch your chat platform.