supertarto.wikijs

Ansible Wiki.js

CI

This guide helps you install and set up Wiki.js using Ansible.

Requirements

To run Wiki.js, you need Node.js and a database. It can work with PostgreSQL, MariaDB, or SQLite, but PostgreSQL is recommended for easier future updates. You can use the supertarto.nodejs and supertarto.postgresql roles.

Tested Platforms

  • Debian 10 (Buster)
  • Debian 11 (Bullseye)
  • Debian 12 (Bookworm)

Role Variables

To force installation or update:

wikijs_update: false

Specify the version of Wiki.js, where to download it from, and where to store it on your server:

wikijs_version: "2.5.300"
wikijs_download_url: "https://github.com/Requarks/wiki/releases/download/{{ wikijs_version }}/wiki-js.tar.gz"
wikijs_download_dest: /usr/local/wikijs

Set the system user and group for running the service. You can add extra groups if needed:

wikijs_system_user: wikijs
wikijs_system_group: wikijs
wikijs_user_additional_groups: ""

Define the port for your Wiki.js instance:

wikijs_config_port: 3000

Provide database details. Using PostgreSQL is recommended:

# postgres, mysql, mariadb, mssql, sqlite
wikijs_config_db_type: postgres
wikijs_config_db_host: localhost
wikijs_config_db_port: 5432
wikijs_config_db_user: wikijs
wikijs_config_db_pass: wikijsrocks
wikijs_config_db_db: wiki
wikijs_config_db_ssl: false

For SSL connection to the database:

wikijs_config_ssl_options:
  auto: true
  # Use the fields you need when 'auto' is false.
  # rejectUnauthorized: true
  # ca: path/to/ca.crt
  # cert: path/to/cert.crt
  # key: path/to/key.pem
  # pfx: path/to/cert.pfx
  # passphrase: xyz123

For SQLite setup:

wikijs_config_sqlite_storage: path/to/database.sqlite

If you're using SSL, provide your certificate details:

wikijs_config_ssl_enabled: false
wikijs_config_ssl_port: 3443
# custom, letsencrypt
wikijs_config_ssl_provider: custom

# For custom only
# pem, pfx
wikijs_config_ssl_format: pem
# only for pem
wikijs_config_ssl_key: path/to/key.pem
wikijs_config_ssl_cert: path/to/cert.pem
wikijs_config_ssl_pfx: path/to/cert.pfx
wikijs_config_ssl_passphrase: null
wikijs_config_ssl_dhparam: null

# For letsencrypt only
wikijs_config_ssl_domain: wiki.yourdomain.com
wikijs_config_ssl_subscriberEmail: [email protected]

wikijs_config_bindIP: "0.0.0.0"
wikijs_config_logLevel: info
wikijs_config_offline: false
wikijs_config_ha: false
wikijs_config_dataPath: ./data

Examples

Here’s how to set up everything in Ansible:

---
- hosts: all
  roles:
    - role: supertarto.nodejs
    - role: supertarto.postgresql
    - role: supertarto.wikijs

  vars:
    postgresql_databases:
      - name: wiki
    postgresql_users:
      - name: wikijs
        password: wikijsrocks

Installation

To install the Wiki.js role, use:

ansible-galaxy role install supertarto.wikijs

License

GPL V3.0

Informazioni sul progetto

Install and configure Wiki.js with Ansible

Installa
ansible-galaxy install supertarto.wikijs
Licenza
gpl-3.0
Download
831
Proprietario