Skip to content

API Maker Detailed installation guide for DevOps in server.

Install API Maker in Private VPS

Install API Maker in Private VPS

Easy installation

  • Use below command to easily install the API Maker.
curl -fsSL https://apimaker.dev/v1/install.sh > install.sh && bash install.sh --default --version=latest
  • If run above command, no need to do below steps. It will install all dependencies and start all required processes and at the end it will print required URLs and commands.

πŸ› οΈ Install Prerequisite Dependencies

πŸš€ Start API Maker Backend

nvm use 18
mkdir -p ~/projects/sava_api_maker
mkdir -p ~/logs
cd ~/projects/sava_api_maker
npm init -y
npm install @sava-info-systems/api-maker

# Normal x64 Windows/Linux/Mac(Intel) Users
npm install oracledb@5.5.0

# Apple Silicon/ARM architecture processors
npm install oracledb@https://github.com/oracle/node-oracledb/releases/download/v5.5.0/oracledb-src-5.5.0.tgz

# Go to API Maker installation directory
cd ~/projects/sava_api_maker/node_modules/@sava-info-systems/api-maker


# ⭐️ Print below file for commands & help in below MongoDB, Redis etc... installation steps
cat ~/projects/sava_api_maker/node_modules/@sava-info-systems/api-maker/assets-deployment/installation_steps.sh

# βœ“  Install MongoDB 6 in replica set
# βœ“  Install Redis 7
# βœ“  Modify .env/package.json file and set MongoDB & Redis endpoints in it, sample .env file is given below
# βœ“  Set Oracle Client in your path if you are going to connect to oracle database.
# β€”β€”β€”β€” OR β€”β€”β€”β€”
# βœ… npm run install-am-default
# β€”β€”β€”β€” OR β€”β€”β€”β€”
# βœ… npm run install-am
# -- These "npm run *" commands will install all dependencies and start backend and frontend admin panel no need to execute below commands after that.

npm run set-env-in-fe # Set params from .env/package.json to admin panel frontend in dist folder
# -- This will be done by [npm run install-am-default | npm run install-am] commands


# Start API Maker backend service.
node main.js
# β€”β€”β€”β€” OR β€”β€”β€”β€”
# npm run start-forever
# npm run stop-forever


πŸš€ Start API Maker Admin Frontend

nvm use 18
npm install -g local-web-server@5.3.0
cd ~/projects/sava_api_maker/node_modules/@sava-info-systems/api-maker/dist
# Serve static content of dist folder
ws --spa index.html --port 4626


πŸ–₯️ Minimum Server Requirement

1 CPU Core
1 GB RAM
20 GB Storage


𝍂 Sample .env

# You can set environment variables in this file to override package.json "am" object values.
# Docs Link : https://www.npmjs.com/package/dotenv/v/16.0.3

# Do not remove below environment variables.
NODE_PRESERVE_SYMLINKS=1
NODE_ENV=production

# API Maker admin panel frontend will try to connect to backend on this host and "am__port" will be appended automatically.
BE_HOST_PORT="http://__ip_address__:38246" # πŸ‘ˆ http://127.0.0.1:38246 or https://example.com

# Required environment variables. You can set them in package.json also and remove from here.
am__serverName="server1" # To go inside the object in package.json am, you can use "__" double underscore.
am__processTitle="api_maker_be"
am__port="38246" # πŸ‘ˆ API Maker backend will start on this port
am__wsPort="38245" # πŸ‘ˆ API Maker WebSocket server will start on this port
am__cpuCount=1

#                                  __mongo_user__     __mongo_pass__         __mongo_port__
#        MONGODB                      πŸ‘‡(user)           πŸ‘‡(pass)   πŸ‘‡(IP)   πŸ‘‡(port)
am__mongo_db_connection="mongodb://mongo_user:SLUFZ5ufe_hAzyRd3aLA@127.0.0.1:38248/api_maker_db?authSource=admin&replicaSet=rs0&directConnection=true" # πŸ‘ˆ Set this

am__passJWT="syamoyfmtjlfxsrlotgzyhhepddmifts" # πŸ‘ˆ Set this random
am__passDBEncryptDecrypt="syamoyfmtjlfxsrlotgzyhhepddmifts" # πŸ‘ˆ Set this random of 32 characters, it is used to encrypt/decrypt database & repository data.

#                                 __redis_port__                      __redis_pass__
#                                   πŸ‘‡(port)       πŸ‘‡(IP)                  πŸ‘‡(pass)
am__redisInternal='{"nodes": [{port:7479, host:"127.0.0.1", pass: "eUtRxLomuV__rj4KEsb7"}]}' # πŸ‘ˆ Set this


# πŸ‘‡ Below is external redis value. You can remove it, you can set it from root user settings.
am__redisExternal='{"nodes": [{port:7479, host:"127.0.0.1", pass: "eUtRxLomuV__rj4KEsb7"}], redisValueExpireInSeconds: 7200, maxCharsResToCache: 1000000}'


# πŸ‘‡ Below is mongodb logs connection value. You can remove it, you can set it from root user settings.
#                                           __mongo_user__  __mongo_pass__             __mongo_port__
#                                               πŸ‘‡(user)    πŸ‘‡(pass)            πŸ‘‡(IP)  πŸ‘‡(port)
am__logs__mongo_db_connection_logs="mongodb://mongo_user:SLUFZ5ufe_hAzyRd3aLA@127.0.0.1:38248/api_maker_logs?authSource=admin&replicaSet=rs0&directConnection=true"


# πŸ‘‡ Automatically set from download. ⚠️Take it from downloaded api_maker_be
am__passCommunication="Homi2F4jPxd__hsLdcse"


package.json Configurations In More Detail