This guide covers setting up a Quartz v5 repository on Bitbucket, configuring deployment, and connecting Quartz Syncer.
Bitbucket Hosting Options
Bitbucket does not have a built-in static site hosting service like GitHub Pages. This guide covers deploying to external hosting services using Bitbucket Pipelines.
Create a Quartz Repository
Option 1: Import from GitHub
- Log in to Bitbucket and go to your workspace.
- Click Create > Repository.
- Click Import repository in the top right.
- Enter the Quartz URL:
https://github.com/jackyzha0/quartz.git - Set your Repository name (e.g.,
quartz). - Click Import repository. All branches (including
v5) are imported automatically.
Option 2: Create and Push Manually
-
Create a new repository on Bitbucket.
-
Clone Quartz locally, change the remote, and push:
git clone https://github.com/jackyzha0/quartz.git cd quartz git remote set-url origin https://bitbucket.org/<workspace>/<repository>.git git push -u origin HEAD
Clone and Install
Clone your Bitbucket repository and install dependencies:
git clone https://bitbucket.org/<workspace>/<repository>.git
cd <repository>
npm ciTo pull future Quartz updates, add the upstream repository as a remote:
git remote add upstream https://github.com/jackyzha0/quartz.gitRun the Setup Wizard
Quartz v5 uses an interactive setup command to create quartz.config.yaml and install all required plugins:
npx quartz createPick a template (default, obsidian, ttrpg, or blog), set your base URL (e.g. your Netlify/Cloudflare/Vercel domain), and choose a content strategy. The obsidian template is recommended when publishing from an Obsidian vault. Commit the generated config and lockfile:
git add quartz.config.yaml quartz.lock.json
git commit -m "Initial Quartz v5 setup"
git pushConfigure Deployment
Since Bitbucket doesn’t have built-in static hosting, you’ll need to deploy to an external service. Below are configurations for popular hosting options.
Plugin install is mandatory in v5
Quartz v5 downloads community plugins into
.quartz/plugins/at build time. Every pipeline below runsnpx quartz plugin installbeforenpx quartz build. If you skip it, the build will fail.
Option 1: Deploy to Netlify
Create a file bitbucket-pipelines.yml in your repository root:
image: node:24
pipelines:
branches:
v5:
- step:
name: Build and Deploy to Netlify
caches:
- node
script:
- npm ci
- npx quartz plugin install
- npx quartz build
- npm install -g netlify-cli
- netlify deploy --prod --dir=public --site=$NETLIFY_SITE_ID --auth=$NETLIFY_AUTH_TOKENAdd these repository variables in Repository settings > Pipelines > Repository variables:
NETLIFY_SITE_ID: Your Netlify site IDNETLIFY_AUTH_TOKEN: Your Netlify personal access token
Option 2: Deploy to Cloudflare Pages
image: node:24
pipelines:
branches:
v5:
- step:
name: Build and Deploy to Cloudflare
caches:
- node
script:
- npm ci
- npx quartz plugin install
- npx quartz build
- npx wrangler pages deploy public --project-name=$CF_PROJECT_NAMEAdd these repository variables:
CLOUDFLARE_API_TOKEN: Your Cloudflare API tokenCLOUDFLARE_ACCOUNT_ID: Your Cloudflare account IDCF_PROJECT_NAME: Your Cloudflare Pages project name
Option 3: Deploy to Vercel
image: node:24
pipelines:
branches:
v5:
- step:
name: Build and Deploy to Vercel
caches:
- node
script:
- npm ci
- npx quartz plugin install
- npx quartz build
- npx vercel deploy --prod --yes --token=$VERCEL_TOKEN publicAdd this repository variable:
VERCEL_TOKEN: Your Vercel access token
Enable Bitbucket Pipelines
- Go to your repository on Bitbucket.
- Navigate to Repository settings > Pipelines > Settings.
- Enable Pipelines.
Generate an App Password
Bitbucket uses App Passwords for API authentication instead of Personal Access Tokens.
- Click your profile avatar in the bottom left and select Personal settings.
- Under Access management, click App passwords.
- Click Create app password.
- Enter a Label (e.g.,
Quartz Syncer). - Under Permissions, select:
- Repositories: Write (this includes Read)
- Click Create.
- Copy the generated password immediately.
Password Security
The app password is only shown once. Store it securely.
Configure Quartz Syncer
- Open Obsidian and go to Settings > Community Plugins > Quartz Syncer.
- In the Git settings tab:
- Remote URL:
https://bitbucket.org/<workspace>/<repository>.git - Branch: Your repository’s default branch (typically
v5) - Provider: Bitbucket
- Authentication Type: Username & Token/Password
- Username:
x-token-auth(when using an App Password) - Access Token: The app password you generated
- Remote URL:
A green checkmark indicates a successful connection.
Username Options
You can use either
x-token-author your Bitbucket username. Usingx-token-authis the standard method for App Passwords.
Bitbucket Server (Self-Hosted)
If you’re using Bitbucket Server (Data Center):
- Replace
bitbucket.orgwith your Bitbucket Server URL. - Generate an HTTP Access Token:
- Go to Profile > Manage account > HTTP access tokens
- Create a token with Repository write permission
- Use your Bitbucket Server username in the Username field.
Alternative: Direct Hosting Service Integration
Instead of using Bitbucket Pipelines, you can connect your hosting service directly to Bitbucket. In every case, the build command must install plugins before building.
Netlify
- Log in to Netlify.
- Click Add new site > Import an existing project.
- Select Bitbucket and authorize.
- Select your Quartz repository.
- Configure build settings:
- Branch to deploy:
v5 - Build command:
npx quartz plugin install && npx quartz build - Publish directory:
public
- Branch to deploy:
Cloudflare Pages
- Log in to Cloudflare Dashboard.
- Go to Workers & Pages > Create application > Pages.
- Connect to Git and select Bitbucket.
- Select your repository and configure:
- Production branch:
v5 - Build command:
npx quartz plugin install && npx quartz build - Build output directory:
public
- Production branch:
Vercel
- Log in to Vercel.
- Click Add New > Project.
- Import from Bitbucket.
- Configure:
- Production Branch:
v5 - Build Command:
npx quartz plugin install && npx quartz build - Output Directory:
public
- Production Branch: