Comments on How to Install Wiki.js on Ubuntu 18.04 LTS

In this tutorial, we will walk you through the Wiki.js version 1 installation process on a Ubuntu 18.04 LTS operating system by using NGINX as a reverse proxy server, MongoDB as a database server, PM2 as a process manager and optionally you can secure transport layer by using acme.sh client and Let's Encrypt certificate authority to add SSL support.

9 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: SionSavior

Thank you nice work. 

I tried this Tutorial 4x but i have only: 

502 Bad Gateway

error.

 

By: till

I've tested it today and it works fine here. I made some minor adjustments to the guide though to clarify a few things.

By: Paragrimm

And what exactly?!

I run into the same error and I can 'fix' it via changing the wikiJS Port to 3001 or the NGINX reverse proxy proxy_pass value to 80 (if the port matches, it 'works'). My current poblem is, that the website isn't rendered properly and I get "connection refused" for the vendor.js and app.js which is obviously the heart of the wiki.js App. I don't really know what to do and I've read the official documentation over and over again... meanwhile I've noticed that the official docs use the 3001 port instead of the 3000 port. But it doesn't help actually.

So which of the "some minor adjustments to the guide" I have to do, to get this working?

By: till

All changes were incorporated into the tutorial text above on 2019-02-28.

By: ProfComete

Thanks a lot for the tutorial! If any others run into issues for the last step, setting wiki.js to start on boot with pm2, you might want to install pm2 globally.

To do this, run as root:

npm i -g pm2

and then, back as the wikijs user:

pm2 start server.js

By: Jim

When I performed Step 4, I received the following error when running `sudo apt update`:

N: Skipping acquire of configured file 'nginx/binary-i386/Packages' as repository 'https://nginx.org/packages/mainline/ubuntu bionic InRelease' doesn't support architecture 'i386'

I was able to resolve this by editing the `/etc/apt/sources.list.d/nginx_mainline.list` and adding `[arch=amd64]` after deb and deb-src then trying again.

Great tutorial. Thank you!

By: Jake Hubner

This has been really helpful, so thank you for making this. I have run into an issue with the nginx config for wiki.js. I was running into issues with acme.sh certting certs so I skipped it and was going to get them through my hosting site instead. Your config file seems to require them to set up the nginx server (I tried deleting that section, didn't work). Do I need the certs first to set up the server or is there a way around that? Thanks

By: rezabojnordi

change port 80 to 3000 in website configuration 

error for using 80 in panel change to 3000

By: Al

To clarify for anyone with the 502 Bad Gateway error:

The default port for wiki.js is port 80. When you reach the step to configure wiki.js from the web page, make sure to change port 80 to port 3000.

That will allow nginx to connect to it.