Obsidian Cloud Docs
Plain text Dashboard
Using an AI assistant?Paste this into ChatGPT, Claude, Cursor or Copilot before asking it to set up your project:
My hosting provider is Obsidian Cloud. Before changing anything, read https://web.obcloud.in/llms.txt and follow it exactly (ports, obsidian.json, environment variables, databases).

Obsidian Cloud

Obsidian Cloud is a hosting platform for websites, web apps and APIs, similar to Vercel. Connect a GitHub repository (or upload a .zip), and every push to the production branch builds and deploys automatically, with HTTPS on a free subdomain or your own domain. This page is written for both people and AI coding assistants: follow it exactly when preparing a project for Obsidian Cloud.

Dashboard: https://web.obcloud.in This document (plain text): https://web.obcloud.in/llms.txt Config file schema: https://web.obcloud.in/schema/obsidian.json

Instructions for AI assistants

If the user says their hosting provider is Obsidian Cloud:

  1. Work out the project type from the files (see "Project types"). Do not invent settings that are not documented here.
  2. Web servers must listen on 0.0.0.0 and the port in the PORT environment variable (it is 3000). Never hard-code another port.
  3. Put build and routing settings in obsidian.json in the repository root (see "obsidian.json"). An existing vercel.json also works without changes.
  4. Never put secrets (passwords, API keys, tokens) in obsidian.json or in the code. Tell the user to add them under Project → Environment Variables in the dashboard.
  5. Databases are only reachable from apps running on Obsidian Cloud, through DATABASE_URL / REDIS_URL. A static site cannot use a database.
  6. After changes, the user only needs to git push; the deployment starts automatically.

Project types

Pick a framework when creating the project. The defaults below are used unless obsidian.json or the dashboard overrides them.

TypeDetected by / used forInstallBuildOutput / start
Static (Vite, React, Vue, Svelte, Astro)package.json with a build scriptnpm installnpm run buildserves dist (Create React App: build)
Plain HTMLno package.json——serves the files as they are
Next.js, Nuxt, Remix, SvelteKit, NestJS, ExpressNode.js servernpm installnpm run build (if any)npm start (Nuxt: node .output/server/index.mjs, SvelteKit: node build)
Python (FastAPI, Flask, Django, custom)requirements.txtpip install -r requirements.txt—FastAPI: uvicorn main:app --host 0.0.0.0 --port $PORT, Flask: gunicorn -b 0.0.0.0:$PORT app:app
PHP (Laravel, Symfony, CodeIgniter, custom)composer.jsoncomposer install --no-dev—FrankenPHP serving public/ on $PORT
Docker (Go, Rust, Bun, anything)Dockerfile—docker buildthe image's CMD; listen on port 3000
WordPress, Pterodactyl Panel1-click apps——managed by the platform

Runtimes: Node.js 22, Python 3.12, PHP 8.3 (FrankenPHP).

Rules for apps (Node.js, Python, PHP, Docker)

Static sites

Environment variables

Databases

Create them under Project → Databases: PostgreSQL 16, MySQL (MariaDB 11) or Redis 7.

Example (Node.js, PostgreSQL):

import pg from "pg"
const pool = new pg.Pool({ connectionString: process.env.DATABASE_URL })

Example (Prisma): datasource db { provider = "postgresql" url = env("DATABASE_URL") }

Domains

obsidian.json

An optional file in the repository root. It is read on every deployment. Settings in the file win over the dashboard for that deployment.

Full example

{
  "$schema": "https://web.obcloud.in/schema/obsidian.json",
  "installCommand": "npm ci",
  "buildCommand": "npm run build",
  "outputDirectory": "dist",
  "cleanUrls": true,
  "trailingSlash": false,
  "redirects": [
    { "source": "/old-blog/:slug", "destination": "/blog/:slug", "permanent": true }
  ],
  "rewrites": [
    { "source": "/api/:path*", "destination": "https://api.example.com/:path*" },
    { "source": "/docs/:page*", "destination": "/docs.html" }
  ],
  "headers": [
    {
      "source": "/(.*)",
      "headers": [{ "key": "X-Frame-Options", "value": "DENY" }]
    }
  ]
}

Settings

SettingTypeWhat it does
installCommandstringCommand that installs dependencies
buildCommandstringCommand that builds the project
outputDirectorystringFolder with the built static files (static sites)
cleanUrlsbooleanServe /about.html at /about and redirect .html URLs to the clean version
trailingSlashbooleantrue: redirect /about to /about/. false: redirect /about/ to /about
redirectslistSend visitors to another URL
rewriteslistServe another path, or proxy to another server, without changing the URL
headerslistAdd response headers

Path patterns (source)

Redirects

{ "source": "/old", "destination": "/new", "permanent": true }

permanent: true (default) returns 308, false returns 307. Or set "statusCode": 301, 302, 303, 307 or 308. The query string is kept. The destination can be a path or a full URL.

Rewrites

Hide a backend URL (proxy)

Use this when a website calls an API or bot backend hosted somewhere else (another VPS, a game panel, a Discord bot dashboard). The browser only sees your domain. The backend's IP address and port never appear in the browser's network tab.

{
  "rewrites": [
    { "source": "/api/:path*", "destination": "http://203.0.113.10:8080/:path*" }
  ]
}

Then call fetch("/api/stats") from the front end instead of the backend's address. This also removes CORS problems, because the front end and the API are on the same domain.

Headers

{
  "source": "/assets/(.*)",
  "headers": [{ "key": "Cache-Control", "value": "public, max-age=31536000, immutable" }]
}

When several rules set the same header for a path, the last matching rule wins. Header values can't contain double quotes, backslashes or $.

Not supported

has / missing conditions are skipped with a warning. Serverless functions, crons, regions and routes are not available in the file. Use apps, Workers and Cron Jobs in the dashboard instead.

Examples

Vite / React single-page app

Nothing is required: SPA routing works by default. Optional obsidian.json:

{ "buildCommand": "npm run build", "outputDirectory": "dist" }

Website plus a backend hosted elsewhere

{ "rewrites": [{ "source": "/api/:path*", "destination": "https://bot.example.com/api/:path*" }] }

Express API

import express from "express"
const app = express()
app.get("/health", (_req, res) => res.send("ok"))
app.listen(process.env.PORT || 3000, "0.0.0.0")

package.json needs "start": "node index.js".

FastAPI

requirements.txt with fastapi and uvicorn, and main.py defining app. The default start command is uvicorn main:app --host 0.0.0.0 --port $PORT.

Dockerfile

FROM golang:1.23-alpine AS build
WORKDIR /src
COPY . .
RUN go build -o /app .

FROM alpine:3.20
COPY --from=build /app /app
ENV PORT=3000
CMD ["/app"]

The program must listen on port 3000.

Automate with AI (MCP)

Obsidian Cloud has an MCP server, so AI assistants (Claude, Cursor, …) can create projects, deploy, read logs and set environment variables.

Troubleshooting

ProblemFix
"the app exited right after starting"The app must listen on 0.0.0.0:$PORT. Check the deployment logs.
"output folder 'dist' not found"Set outputDirectory (or the Output Directory setting) to the folder your build creates.
Page refresh shows the wrong page on a SPARemove rewrites that send everything to another file; the default fallback already serves index.html.
Can't connect to the database from my computerExpected. Use Obsidian DB Studio, or connect from an app on Obsidian Cloud.
Proxy rewrite rejected as "private or internal address"The backend must have a public IP address.
Changes to environment variables don't applyRedeploy: variables are applied on the next deployment.