Alle Artikel
Self-Hosting
Obsidian Quartz4 docker compose setup
Quartz 4 as a Docker Compose stack: the compose file, the Dockerfile and the content folder you need — in a few steps.
A quick guide on how to run Quartz 4 with Docker Compose.
docker-compose.yml
services:
quartz:
build: .
container_name: quartz4
ports:
- "8080:8080"
- "3001:3001"
volumes:
- ./content:/usr/src/app/content
restart: unless-stoppedDockerfile
FROM node:22-bookworm-slim AS builder
RUN apt-get update \
&& apt-get install -y --no-install-recommends git ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
RUN git clone --depth 1 --branch v4 https://github.com/jackyzha0/quartz.git .
RUN npm ci
FROM node:22-bookworm-slim
WORKDIR /usr/src/app
COPY --from=builder /usr/src/app/ /usr/src/app/
EXPOSE 8080 3001
CMD ["npx", "quartz", "build", "--serve"]Content folder
Create a content folder next to the compose file:
mkdir ./contentThen launch the stack:
docker compose up -d