Skip to main content

Run from source

This route is best for evaluation and development. Use Docker Compose for a simpler single-host deployment.

Repository access required

This route requires authorized access to the source repository. An anonymous 404 from the clone URL is a current distribution limitation; Jiandu does not yet publish a public source archive or release package.

Requirements​

  • Rust 1.95 or newer
  • Deno 2.9 or newer
  • a C compiler and cmake
  • Git and a supported shell
  • PostgreSQL 17.x or 18.x only if you select PostgreSQL instead of SQLite

Start the local profile​

git clone https://github.com/zhyuri/jiandu.git
cd jiandu
./scripts/run.sh

The launcher prepares pinned build inputs when needed, builds the application, and starts it with the local profile. Open http://127.0.0.1:8077.

Runtime data defaults to server/jiandu-data/. On first full startup, Jiandu creates the owner recovery token at:

server/jiandu-data/owner-access-token

That file is a break-glass credential. Do not paste it into an issue, chat, or terminal history.

The default configuration has no human account or external identity provider. Open http://127.0.0.1:8077, choose Create the first account, and enter your name, a username and password, and the token from that file. Jiandu makes the account Administrator and opens Settings, and you sign in with that username and password from then on.

To create the account from a terminal instead, so the token never appears on screen, keep Jiandu running and use a second terminal from the repository root:

./scripts/bootstrap-local-account.sh

The helper accepts only the default loopback origin, streams the Owner token without printing it or putting it in command arguments, refuses to create anything if setup is already claimed, creates a local human, claims setup as that human, and revokes its temporary sessions. Cleanup failure is a command failure and retains only the private files needed for manual revocation. Sign in at http://127.0.0.1:8077 with the username and password you chose.

Use a configuration file​

./scripts/run.sh -- --config config/example.json
./scripts/run.sh -- --config config/example.json --check-config

The second command validates the effective settings without starting the service. Continue with first run.