{"id":24982812,"url":"https://github.com/PhyByte/mvx-api-deployer","last_synced_at":"2025-10-19T08:30:50.371Z","repository":{"id":266727964,"uuid":"899175700","full_name":"PhyByte/mvx-api-deployer","owner":"PhyByte","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-27T10:27:54.000Z","size":41715,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T11:41:55.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PhyByte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-05T18:59:42.000Z","updated_at":"2025-01-27T10:27:57.000Z","dependencies_parsed_at":"2024-12-05T20:18:33.411Z","dependency_job_id":"1f12bdad-9525-4e8d-9ff1-12cbf65dab0c","html_url":"https://github.com/PhyByte/mvx-api-deployer","commit_stats":null,"previous_names":["phybyte/mvx-api-deployer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhyByte%2Fmvx-api-deployer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhyByte%2Fmvx-api-deployer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhyByte%2Fmvx-api-deployer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhyByte%2Fmvx-api-deployer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PhyByte","download_url":"https://codeload.github.com/PhyByte/mvx-api-deployer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237088942,"owners_count":19253585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-04T09:01:31.395Z","updated_at":"2025-10-19T08:30:50.366Z","avatar_url":"https://github.com/PhyByte.png","language":"Shell","readme":"# MultiversX API Deployer\n\nEffortlessly deploy a complete infrastructure to run your own **MultiversX API** in just a few steps. This repository streamlines the entire process, eliminating complex configurations and providing a rapid setup solution for any server.\n\nWith a focus on simplicity and automation, this deployment is designed to make the MultiversX API accessible to everyone. Whether you're a blockchain enthusiast or a seasoned developer, you can have a fully operational API in no time. No need to gather resources from multiple repositories—everything you need is here in one place.\n\n![MultiversX API Overview](README.png)\n\n### **Quick Start**\nDeploying the infrastructure is as simple as running three commands:\n1. **Initialize the server**: Set up the requirements and create a dedicated user for running services.\n2. **Deploy the infrastructure**: Install the necessary services and configure the environment.\n3. **Start the services**: Launch the components and expose the API for external access.\n\n\nHaving a complete API usually required a lot of steps from a lot of repositories, here you have it all in one place.\n\n### **This deployment includes:**\n- [**An Observing Squad**](https://docs.multiversx.com/integrators/observing-squad): Access blockchain data by running observer nodes.\n- [**ElasticSearch Indexer**](https://docs.multiversx.com/sdk-and-tools/indexer/#observer-client): Convert raw blockchain data for efficient querying.\n- [**ElasticSearch Database**](https://github.com/elastic/elasticsearch): Store the converted blockchain data.\n- [**Kibana**](https://github.com/elastic/kibana): Visualize data and logs from the blockchain.\n- [**MultiversX API**](https://docs.multiversx.com/sdk-and-tools/rest-api/multiversx-api): Query blockchain data externally via a standard API.\n- [**xExchange**](https://github.com/multiversx/mx-exchange-service): The official exchange service for feed the MultiversX API.\n\n\n## **0 - Prerequisites**\n\n### **Hardware**\nTo support the infrastructure's heavy load, we recommend deploying on a bare-metal server with the following specifications depending on your needs:\n\n| Network | Machine Type| CPU Cores | RAM | Storage | Bandwidth |\n|---------|-------------|-----------|-----|---------|-----------|\n| Mainnet |     Bare    |8     | 32 GB | 1 TB SSD | 1 Gbps |\n| Devnet  |     VPS     | 4     | 16 GB | 500 GB SSD | 1 Gbps |\n\n### **Security**\nBefore deployment:\n- Secure your server with an **SSH key**.\n- Ensure no sensitive data is on the server. Although the API is stateless, misuse of the infrastructure could disrupt services.\n\n### **Configuration**\nAt the root of this repository you will find the file named config.cfg. It contains variables that can be configured to customize the deployment.\n\nThe following variables are available:\n- **USERNAME**: The username on which the services will be installed.\n- **NETWORK**: The network to deploy. Currently supports `mainnet`, `devnet` and `testnet` networks.\n\nCurrently, the deployment is configured with default settings. As development progresses, more configuration options will be added, such as enabling a **full history node** or customizing ElasticSearch settings.\n\n## **1 - Initialize Server**\n\n1. Ensure you are logged in as the root user\n\n2. You will need this repository on your machine before starting:\n```bash\n   git clone https://github.com/PhyByte/mvx-api-deployer.git\n```\n\n3. Run the installation script that will set up the requirements for the deployment:\n```bash\n  cd mvx-api-deployer\n   ./1-Init.sh\n```\n\n### **What this script does:**\n- Updates and upgrades your system.\n- Installs Docker and Docker Compose.\n\n\n---\n\n## **2 - Install Services**\n\nAs you already configured the `config.cfg` file, you can now deploy the infrastructure immediately by running: \n```bash\n   cd ~/mvx-api-deployer\n   ./2-Install.sh\n ```\n\n\n### **What this script does:**\n- Setup the Observing Squad with `ElasticSearch Indexer Enabled`.\n- Setup the ElasticSearch Indexer and deploy the ElasticSearch Database with Kibana.\n- Setup the MultiversX API.\n- Setup the xExchange service.\n\n\n## **3 - Start Services**\n\nAfter the installation is complete, you can start the services by running:\n```bash\n   cd ~/mvx-api-deployer\n   ./3-Start.sh\n```\n\n# Maintenance Section for MultiversX API Services\n\nThe installation process includes copying a pre-configured `.bashrc` file to the deployment server. This file provides a set of convenient commands to manage the MultiversX API services, including starting, stopping, monitoring, and checking the status of individual services.\n\n## **Overview of Maintenance Commands**\n\n### **Observing Squad Commands**\nThe Observing Squad allows you to access blockchain data via observer nodes. These commands help you monitor and manage the Observing Squad services.\n- **Start \u0026 Stop Observing Nodes**  \n  Use these commands to start and stop individual observing nodes:\n  ```bash\n  api_obssquad_start    # Start all observing squad nodes\n  api_obssquad_stop     # Stop all observing squad nodes\n  ```\n- **Monitor Observing Nodes**  \n  Use these commands to monitor individual observing nodes:\n  ```bash\n  api_obssquad_monitoring_0       # Monitor node 0 at localhost:8080\n  api_obssquad_monitoring_1       # Monitor node 1 at localhost:8081\n  api_obssquad_monitoring_2       # Monitor node 2 at localhost:8082\n  api_obssquad_monitoring_3       # Monitor node 3 at localhost:8083\n  api_obssquad_monitoring_proxy   # View logs of the observing squad proxy service\n  ```\n\n\n  ### **ElasticSearch Indexer Commands**\n  The ElasticSearch Indexer processes raw blockchain data into structured data for querying.\n\n- ** Start \u0026 Stop ElasticSearch Indexer**  \n  Use these commands to start and stop the ElasticSearch Indexer:\n  ```bash\n  api_indexer_start    # Start the ElasticSearch Indexer\n  api_indexer_stop     # Stop the ElasticSearch Indexer\n  ```\n\n  ### **ElasticSearch \u0026 Kibana Commands**\n  The ElasticSearch Database stores the converted blockchain data.\n  ```bash\n  api_eskibana_start    # Start ElasticSearch and Kibana\n  api_eskibana_stop     # Stop ElasticSearch and Kibana\n  ```\n\n   ### **MultiversX API Commands**\n   The MultiversX API provides external REST access to blockchain data.\n\n- **Start \u0026 Stop MultiversX API**\n  Use these commands to start and stop the MultiversX API:\n  ```bash\n  api_mx_api_start    # Start the MultiversX API\n  api_mx_api_stop     # Stop the MultiversX API\n  ```\n\n  ### **Check Status of All Services**\n   Use this command to check the status of all services:\n   ```bash\n   api_check_status    # Check the status of all services\n   ```\n\n## Adding Custom Commands\nYou can add custom commands to the `.bashrc` file to manage additional services or configurations that you would need to run your own MultiversX API. This is usually better than retyping the commands every time.","funding_links":[],"categories":["MultiversX community"],"sub_categories":["SDKs and dev tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPhyByte%2Fmvx-api-deployer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPhyByte%2Fmvx-api-deployer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPhyByte%2Fmvx-api-deployer/lists"}