Skip to content

Latest commit

 

History

History
120 lines (83 loc) · 3.61 KB

File metadata and controls

120 lines (83 loc) · 3.61 KB
title excerpt updated
Install WikiJS on your POWER web hosting plan
Find out how to install WikiJS on your POWER web hosting plan
2021-02-04

Objective

You've subscribed to a Web POWER web hosting plan to deploy Node.js applications, and you want to deploy a WikiJS{.external} wiki platform on it.

This guide will explain how to do it.

Find out how to install WikiJS on your POWER web hosting plan.

Requirements

If you have just started to use your Web POWER web hosting plan, we suggest to have a look at our Getting started with a POWER web hosting plan guide before going further.

Instructions

Let's suppose you have the default configuration for Node.js hosting:

  • Runtime: nodejs 14
  • Entrypoint: index.js
  • DocumentRoot: www

[!primary]

To verify your configuration, you can use the Retrieve active configuration API endpoint.

Connect via SSH to your POWER web hosting.

Let's begin by going into the www folder and retrieving WikiJS source:

cd www
wget https://github.com/Requarks/wiki/releases/download/2.5.170/wiki-js.tar.gz
tar xzf wiki-js.tar.gz
rm -f wiki-js.tar.gz

Create a config.yml file:

port: 3000
db:
  type: sqlite
  storage: database.sqlite
logLevel: info
dataPath: ./data

and rebuild the sqlite3 module:

npm rebuild sqlite3

Make the symlink for the entry point:

ln -fs server/index.js index.js

Then restart your instance and your WikiJS will be online.

WikiJS{.thumbnail}

Terminal output:

 ~ $ cd  www

~/www $ wget https://github.com/Requarks/wiki/releases/download/2.5.170/wiki-js.tar.gz
--2021-02-03 14:50:23--  https://github.com/Requarks/wiki/releases/download/2.5.170/wiki-js.tar.gz
Resolving github.com (github.com)… 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443… connecté.
TTP request sent, awaiting response... 200 OK
Length: 65010291 (62M) [application/octet-stream]
Saving to: « wiki-js.tar.gz »

wiki-js.tar.gz                100%[===============================================>]  62,00M  19,9MB/s    ds 3,1s

2021-02-03 14:50:28 (19,9 MB/s) — « wiki-js.tar.gz » saved [65010291/65010291]

~/www $ tar xzf wiki-js.tar.gz

~/www $ rm -f wiki-js.tar.gz

~/www $ vi config.yml
port: 3000
db:
  type: sqlite
  storage: database.sqlite
logLevel: info
dataPath: ./data
 
~/www $ npm rebuild sqlite3 
> [email protected] install /home/user/www/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build 
node-pre-gyp WARN Using request for node-pre-gyp https download
[sqlite3] Success: "/home/user/www/node_modules/sqlite3/lib/binding/napi-v3-linux-x64/node_sqlite3.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
[email protected] /home/user/www/node_modules/sqlite3 
 
~/www $ ln -fs server/index.js index.js

~/www $ mkdir -p tmp

~/www $ touch tmp/restart.txt

Go further

Join our community of users on https://community.ovh.com/en/.

Join our Discord on our web-hosting-power channel to discuss directly with the team and other users of this lab.