Service: XWiki - EyevinnOSC/community GitHub Wiki
XWiki (serviceId xwiki-xwiki-platform) is an open source wiki and collaboration platform that supports structured data, applications built with wiki pages, scripting, an extension ecosystem and fine-grained access control. In Eyevinn Open Source Cloud (OSC) it is a long-running service instance with up to 10 GiB of storage per instance, backed by a PostgreSQL database. License: LGPL-2.1. Source: xwiki/xwiki-platform.
- Company knowledge base, project documentation system or internal app-building platform.
- Structured data and wiki-page based applications, scripting and extensions.
- A REST API for reading and writing pages.
XWiki stores pages, users and configuration in PostgreSQL. Create a PostgreSQL instance (birme-osc-postgresql) first and confirm it is running, for example { "name": "xwikidb", "PostgresPassword": "{{secrets.postgrespwd}}" }. Read its address and port with describe-service-instance. XWiki needs a JDBC-format URL:
jdbc:postgresql://postgres:<password>@<IP>:<PORT>/postgres
The scheme must be jdbc:postgresql://, not postgres://; a postgres:// URL makes XWiki fail on startup with a "JDBC URL" driver error. The user and database in the example are the PostgreSQL defaults (postgres); adjust them if you set PostgresUser or PostgresDb.
Store the whole URL as a service secret with create-service-secret (serviceId: "xwiki-xwiki-platform", name dburl). Then call create-service-instance with serviceId: "xwiki-xwiki-platform":
{
"name": "mywiki",
"DatabaseUrl": "{{secrets.dburl}}"
}The first startup takes a minute or two while XWiki initializes the schema. Verify with wait-for-service-ready or describe-service-instance. With the OSC CLI:
osc create xwiki-xwiki-platform mywiki \
-o DatabaseUrl="jdbc:postgresql://postgres:[email protected]:10505/postgres"| Option | Required | Type | Meaning |
|---|---|---|---|
| name | Yes | string | Name of the instance. Alphanumeric/word characters only (^\w+$), at most 20 characters. |
| DatabaseUrl | Yes | string, sensitive | PostgreSQL URL in JDBC format, jdbc:postgresql://<user>:<password>@<host>:<port>/<database>. The catalog associates it with birme-osc-postgresql. Store as a secret and pass as {{secrets.NAME}} (whole field value). |
Dependency service birme-osc-postgresql (see PostgreSQL).
| Option | Required | Type | Meaning |
|---|---|---|---|
| name | Yes | string | Name of the instance. Alphanumeric/word characters only, at most 20 characters. |
| PostgresPassword | Yes | string, sensitive | Password of the PostgreSQL superuser, for example {{secrets.postgrespwd}}. |
| PostgresUser | No | string | Superuser name. Defaults to postgres. |
| PostgresDb | No | string | Name of the default database created at first start. Defaults to the user name. |
| PostgresInitDbArgs | No | string | Extra arguments for initdb (encoding, locale, authentication methods). |
| PostgresInitDbSql | No | string | SQL run during initialization (custom users, tables, schema). |
Open the instance URL and log in with the default administrator credentials Admin / admin. Change the admin password immediately (Admin, Users, Admin, Edit). After login a setup wizard configures the wiki name, an admin email and installs the Standard XWiki flavour (recommended).
REST API examples:
# Fetch the home page
curl -u Admin:admin \
"https://<your-instance-url>/rest/wikis/xwiki/spaces/Main/pages/WebHome"
# Create or update a page
curl -u Admin:admin -X PUT \
-H "Content-Type: application/xml" \
-d '<page xmlns="http://www.xwiki.org"><title>My Page</title><content>Hello **world**!</content></page>' \
"https://<your-instance-url>/rest/wikis/xwiki/spaces/Demo/pages/MyPage"- Storage is limited to 10 GiB per instance.
- The database URL must use the
jdbc:postgresql://scheme. - The default administrator password must be changed after first login.