Coder Social home page Coder Social logo

dactra / evolution-api-installation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from drhema/evolution-api-installation

0.0 0.0 0.0 75 KB

This guide outlines the necessary steps to install MongoDB, Redis, Nginx, and the Evolution API. Follow these steps sequentially to set up your environment properly.

Shell 100.00%

evolution-api-installation's Introduction

Evolution API Installation Guide

This guide outlines the necessary steps to install MongoDB, Redis, Nginx, and the Evolution API. Follow these steps sequentially to set up your environment properly.

Prerequisites

  • Ensure your system is up to date.
  • Ubuntu 22.0 or above
  • Must login with user root
  • Make sure wget is installed before proceeding with the installations.

Installation Steps

1. Install MongoDB

1.1 Download and run the MongoDB installation script

wget https://raw.githubusercontent.com/drhema/evolution-api-installation/main/1-mongo_install.sh && chmod +x 1-mongo_install.sh && ./1-mongo_install.sh
mongosh "mongodb://localhost:27017"
use api_db
db.createUser({
  user: "api_user",
  pwd: "ApiPassw0rd!2024",  // Use the intended password
  roles: [{role: "readWrite", db: "api_db"}]
})
Exit
mongosh 'mongodb://api_user:ApiPassw0rd!2024@localhost:27017/api_db'

1.2 Check the status of MongoDB

Ensure MongoDB is running:

sudo systemctl status mongod

If MongoDB is not running, start it:

sudo systemctl start mongod

Verify MongoDB is listening on port 27017:

sudo ss -tulwn | grep 27017

2. Install Redis

Download and execute the Redis installation script:

wget https://raw.githubusercontent.com/drhema/evolution-api-installation/main/2-redis.sh && chmod +x 2-redis.sh && ./2-redis.sh

3. Check Redis Connection

Ensure that Redis is installed and operating correctly:

wget https://raw.githubusercontent.com/drhema/evolution-api-installation/main/3-redis_check.sh && chmod +x 3-redis_check.sh && ./3-redis_check.sh

4. Install Nginx

Install Nginx and configure SSL with Let's Encrypt: insert your subdomain ex: api.yourdomain.com & your email address [email protected]

wget https://raw.githubusercontent.com/drhema/evolution-api-installation/main/4-nginx.sh && chmod +x 4-nginx.sh && ./4-nginx.sh

5. Install Evolution API

Set up the Evolution API along with its dependencies:

wget https://raw.githubusercontent.com/drhema/evolution-api-installation/main/5-EvolutionAPI.sh && chmod +x 5-EvolutionAPI.sh && ./5-EvolutionAPI.sh

Navigate to the evolution-api directory and restart Nginx:

cd evolution-api
sudo systemctl restart nginx

To start the Evolution API in production mode:

screen
npm run start:prod

Detach from the screen session by pressing Ctrl+A followed by D.


access the API via https://sub.domain.com/manager insert your password or if u used the default

B6D711FCDE4D4FD5936544120E713976

Edit https and port 443:

nano src/env.yml
Edit http ===> https
Port 8080 ===> 443
sudo lsof -i :8080
sudo lsof -i :443
sudo kill -9 17496

sudo nginx -t

for any support contact: [email protected]

evolution-api-installation's People

Contributors

drhema avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.