> ## Documentation Index
> Fetch the complete documentation index at: https://docs.suji.fr/llms.txt
> Use this file to discover all available pages before exploring further.

# Wiki.js

> Self-hosted wiki and knowledge base. Install, create your admin account, and write. SQLite by default, or bring your own database.

[Wiki.js](https://js.wiki) is an open-source wiki and knowledge base — a modern editor, Markdown, access control, and full-text search. You manage everything from its web UI, served at your `*.suji.fr` address.

This page covers running Wiki.js on Suji end-to-end. Wiki.js is maintained upstream; Suji provides the [marketplace packaging](https://github.com/suji-hq/suji-templates/tree/main/wikijs).

***

## Before you install

Nothing to prepare for the default setup — Wiki.js stores everything in a local SQLite file, and you'll create your admin account in the browser on first run.

If you'd rather use your **own PostgreSQL or MySQL** database, have its host, port, database name, user, and password ready — and make sure it's reachable from the VM.

<Note>
  Wiki.js has no generated password — the **first person to complete the setup wizard becomes the administrator.** Do it immediately after install.
</Note>

***

## Install

Dashboard → **Apps** → **Wiki.js** → **Install**:

| Field     | Required | Notes                                                                                                  |
| --------- | -------- | ------------------------------------------------------------------------------------------------------ |
| VM        | yes      | Pick a VM with free capacity, or create one.                                                           |
| Subdomain | no       | Suggestion is `wikijs`. Reached at `https://<subdomain>.suji.fr`.                                      |
| Database  | no       | **SQLite (local file)** by default — no setup. Or pick PostgreSQL / MySQL to use an external database. |

If you choose **PostgreSQL** or **MySQL**, additional fields appear — host, port (5432 for PostgreSQL, 3306 for MySQL), database name, user, and password.

Wiki.js is lightweight, so **Small** is plenty. See [Recommended size](#recommended-size).

Click **Deploy**. The install reaches `running` in \~1 minute and is live at `https://wikijs-<random>.suji.fr`, served over HTTPS through the tunnel.

***

## First connection — set up your wiki

1. Open the install URL (`https://wikijs-<random>.suji.fr`).
2. Wiki.js shows its **setup wizard** on first run.
3. Create the administrator account (email + password) and confirm the site URL.
4. You land in the editor, ready to create your first page.

<Warning>
  The URL is public the moment the install is `running`. Until you finish the wizard, **anyone who reaches it can claim the administrator account.** Do it right after deploy.
</Warning>

On later visits the URL shows the normal login.

***

## Using an external database

By default Wiki.js runs on a local SQLite file — simplest, zero setup, fine for most wikis. If you prefer your own database, pick **PostgreSQL** or **MySQL / MariaDB** at install and fill in the connection details.

* The database must already exist and be reachable from the VM.
* The chosen user needs full rights on that database (Wiki.js creates its own tables).
* Switching database type after install means a fresh install — there's no in-place migration between SQLite and an external DB.

***

## Day-to-day management

| Want to…                          | Where                                                  |
| --------------------------------- | ------------------------------------------------------ |
| Write / edit pages                | The Wiki.js editor (`https://wikijs-<random>.suji.fr`) |
| Manage users / permissions        | Admin area → Users / Groups                            |
| Theme / navigation / settings     | Admin area                                             |
| View container logs               | Dashboard → Logs (pick Wiki.js)                        |
| Open a shell inside the container | Dashboard → Terminal (pick Wiki.js)                    |
| Browse data on disk               | Dashboard → Files (pick the Wiki.js volume)            |
| Restart the app                   | Install detail page → Restart                          |
| Upgrade to a newer version        | Install detail page → Upgrade (when available)         |
| Remove the install + its data     | Install detail page → Uninstall                        |

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Stuck on the setup wizard after a restart">
    The setup wizard runs until the admin account is created. Complete it once; afterwards the URL goes straight to login. If it keeps reappearing, the database isn't persisting — check that the install's volume (SQLite) or your external database is healthy.
  </Accordion>

  <Accordion title="External database won't connect">
    Confirm the host is reachable from the VM, the port is right (5432 PostgreSQL / 3306 MySQL), and the user/password/database are correct. The Logs tab shows the exact connection error.
  </Accordion>

  <Accordion title="Email (invites, password resets) isn't sending">
    Wiki.js needs an SMTP provider, which isn't configured by default. Note that the network blocks outbound SMTP on ports 25 and 465 — use port 587 or an HTTP-based provider. Configure mail in the Wiki.js admin area.
  </Accordion>

  <Accordion title="Bad gateway (Cloudflare 502)">
    Wiki.js isn't reachable through the tunnel yet — usually still starting (wait \~30 s, especially after an upgrade). If it persists, the Logs tab shows why the container isn't up.
  </Accordion>
</AccordionGroup>

***

## Where things live

| What                           | Inside container         | Named volume  |
| ------------------------------ | ------------------------ | ------------- |
| SQLite database (default mode) | `/wiki/data/wiki.sqlite` | `wikijs-data` |
| Uploaded assets / cache        | `/wiki/data`             | `wikijs-data` |

In SQLite mode everything lives in the `wikijs-data` volume. With an external database, your pages live in that database — only assets/cache are on the volume. Uninstalling deletes the volume by default; choose **keep data** during uninstall to preserve it.

***

## Recommended size

* **Small is plenty** for most wikis.
* Memory scales with concurrent editors, search indexing, and large media uploads. Big, busy wikis → size up.
* If you run other apps on the same VM, remember the VM's total CPU/memory is shared.

***

## Reporting issues

| Class                                                         | Where                                                                             |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| Wiki.js bug (editor, auth, search, rendering)                 | [requarks/wiki issues](https://github.com/requarks/wiki/issues)                   |
| Marketplace packaging bug (compose / manifest / install form) | [suji-hq/suji-templates issues](https://github.com/suji-hq/suji-templates/issues) |
| Suji platform bug (dashboard, billing, network)               | Support ticket from the dashboard                                                 |
