Deploy with Dokploy
Deploy Vibecape Server to Dokploy from a Dockerfile with HTTPS, persistent storage, and health checks.
This guide describes one production deployment path: build Vibecape Server from a Dockerfile and let Dokploy manage the container lifecycle, domain, HTTPS, logs, and restarts.
To declare the build, configuration, and persistent storage in one Compose file, see Deploy with Dokploy Compose.
Vibecape Server stores one SQLite database and local bare Git repositories. Keep the replica count at 1 and persist the entire /data directory because one data directory must be owned by exactly one Server instance.
Requirements
Prepare the following:
- a Dokploy instance;
- a public domain such as
spaces.example.com; - a Downcity Federation URL, Bureau Token, and City ID;
- a Git repository for the Dockerfile.
1. Create the Dockerfile
Add this Dockerfile at the root of the deployment repository:
FROM node:22-bookworm-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends git curl ca-certificates \
&& npm install -g @vibecape/cli@latest \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /data && chown node:node /data
ENV VIBECAPE_REMOTE_HOST=0.0.0.0
ENV VIBECAPE_REMOTE_PORT=4178
ENV VIBECAPE_REMOTE_DATA=/data
USER node
VOLUME ["/data"]
EXPOSE 4178
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD curl -fsS http://127.0.0.1:4178/v1/info || exit 1
CMD ["vibecape", "server", "start", "--foreground"]The container must use server start --foreground. Vibecape remains the foreground main process while Dokploy owns shutdown, restarts, and logs.
Pin the CLI version in production. Upgrade by changing the version in the Dockerfile and rebuilding instead of installing dependencies every time the container starts.
2. Create the Application
Create an Application in Dokploy:
- connect the Git repository containing the Dockerfile;
- select
Dockerfileas the build type; - set the container port to
4178; - keep the replica count at
1; - mount a persistent volume at
/data; - route
spaces.example.comto the Application and enable HTTPS; - set the health check path to
/v1/info.
Do not configure /data as ephemeral storage. The same volume must remain attached after container rebuilds.
3. Configure environment variables
Add these values to the Application environment:
DOWNCITY_FEDERATION_URL=https://base.downcity.ai
DOWNCITY_BUREAU_TOKEN=replace-with-your-bureau-token
DOWNCITY_CITY_ID=vibecape
VIBECAPE_REMOTE_HOST=0.0.0.0
VIBECAPE_REMOTE_PORT=4178
VIBECAPE_REMOTE_URL=https://spaces.example.com
VIBECAPE_REMOTE_DATA=/dataImportant details:
VIBECAPE_REMOTE_HOSTmust be0.0.0.0so Dokploy can reach the container port;VIBECAPE_REMOTE_URLmust be the public HTTPS origin, notlocalhost, a container name, or an internal port;- keep
DOWNCITY_BUREAU_TOKENin Dokploy as a secret and never commit it to Git.
4. Deploy and verify
Start the deployment and wait for the health check to pass. Verify the public endpoint from outside Dokploy:
curl https://spaces.example.com/v1/infoA successful request returns the Vibecape Server information. If the health check fails, inspect the Application Logs and verify the port, environment variables, and Federation connectivity.
5. Administer Groups
Run administrative commands in the Dokploy Application Terminal:
vibecape server group list
vibecape server group create \
--name "Research Team" \
--owner "federation-user-id"
vibecape server group request list <group-id>
vibecape server group request approve <group-id> <user-id> --role editorPrefer an explicit --owner inside the container so administration does not depend on a CLI account stored in the container filesystem.
Data, backups, and upgrades
/data contains both:
server.dbfor Groups, members, Spaces, and permissions;repositories/for all Remote Space Git data.
Back up the entire volume as one unit. Backing up only the database or only the repositories can produce inconsistent data.
To upgrade:
- back up the
/datavolume; - change the pinned
@vibecape/cliversion in the Dockerfile; - redeploy from Dokploy;
- keep the existing
/datavolume attached; - verify
/v1/infoand inspect the logs.
Common mistakes
- setting replicas above
1, which makes multiple processes share SQLite and repositories; - failing to persist
/data, which loses Groups, Spaces, and Git history after a rebuild; - listening on
127.0.0.1, which prevents Dokploy from reaching the container port; - using an internal address as
VIBECAPE_REMOTE_URL, which produces unusable Group and Git URLs; - buffering Git requests or enforcing a proxy body limit below the Server limit;
- deploying where the Federation cannot be reached from the container.