Weblutions Documentation > Product Documentation > FaxDocs

FaxDocs

FaxDocs allows communities and developers to nicely document all of their items or articles. This guide covers the installation process for FaxDocs.



This guide is aimed for Ubuntu 20.04 installations...

Step 1 - Requirements

  • Server to host the site
  • Nginx, Apache or similar web-server software
  • Node.Js
  • MySQL Server
  • Domain
  • SSL certificate

Step 2 - LEMP Stack

Time to install the requirements. If you have the requirements skip this step.

First off after we login to the terminal. We want to update the package index. then install Nginx.

sudo apt update
sudo apt install nginx

When prompted press Y to install Nginx.

Now you should be able to navigate to your server IP in a browser and you will see the Nginx welcome page - http://server_domain_or_IP.

Now we need to install MySQL.

sudo apt install mysql-server

When prompted press Y to install MySQL-Server.

After this completes we need to run the setup command for MySQL.

sudo mysql_secure_installation

Node.Js is a very robust and popular framework for JavaScript. We will want to install Node.Js on our system. For this we will use Node Package Manager (NVM)

Install NVM along with Node.Js onto our system

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

nvm install 20.5.1

Lastly we need to install Certbot to be able to utilize SSL certificates.

sudo apt install certbot python3-certbot-nginx

Step 3 - Nginx Configuration

Because FaxDocs uses Node.Js to operate we need to setup a proxy to have the site work on a domain through Nginx. Navigate to your Nginx site config; /etc/nginx/sites-available/default.

Insert the below into your config file. Ensure to edit the relevant points.

server {
    
  server_name example.com; # Change domain to yours
    
  location / {
    proxy_pass http://localhost:3000; # Change the port if needed
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
    proxy_set_header X-Real-IP $remote_addr;
  }    
    error_page 502 /502.html;
    location = /502.html {
        root  /home/faxstore/public;
    }
}

Restart Nginx to make the changes.

sudo systemctl restart nginx

Now create a SSL through Certbot.

sudo add-apt-repository ppa:certbot/certbot
sudo apt install python-certbot-nginx

sudo certbot --nginx -d example.com

When instructed you want to pick the second option (2) to redirect all traffic to a https connection.

Run sudo certbot renew --dry-run to make sure your SSL certificates auto-renew.

Step 4 - Installing Files

Now navigate to the /home directory and create a new directory.

Once created insert all the files into the folder and change your configuration file.

Install the SQL tables into a database

Step 5 - Time To Start

It's time to start the thing up. In a screen session. Inside this session run the below commands.

cd /home/MYFOLDER

Now install the packages into the system

npm i

It's time, you've reached the end. If you've installed everything correctly the below command will work perfectly.

node .


Suggest an edit

Review this page

FAXES

1 recommend this page