Skip to content

Quick Install

This page describes the complete process for deploying OpsAnt, which is mainly divided into four steps: install Docker, get the code, modify the configuration, and run the install script.

Prerequisites

  • A Linux server (Ubuntu 24.04 / CentOS 7+ / Debian recommended, memory no less than 8G)
  • The server can access the external network (to pull images)

1. Install Docker and dependency packages

# Ubuntu / Debian 示例
sudo apt-get -y update
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get -y update
sudo apt-get -y install docker-ce jq uuid wget git ntpdate mysql-client unzip
systemctl enable --now docker

For Docker install commands on other systems (CentOS / RockyLinux / OpenEuler, etc.), please refer to Environment Requirements.

2. Get the code

cd /opt && git clone https://github.com/unixhot/opsant.git
# 或下载源码包并解压到 /opt/opsant

3. Modify the install configuration (required)

cd /opt/opsant/install
cp install.config.example install.config
vim install.config

Key configurations that need to be modified:

Configuration Item Description
DOMAIN_NAME The address for accessing OpsAnt (IP or resolvable domain name; modifying hosts will not work)
LOCAL_IP Local intranet IP
PROXY_PUBLIC_IP Public IP (for intranet deployment, keep the default, equal to DOMAIN_NAME)

The script will automatically generate a random string to replace INIT_PASSWORD, so there is no need to set a password manually.

4. Run the install script

cd /opt/opsant/install && ./opsant-install.sh install

The script will automatically complete: initializing containers such as MySQL, Redis, Consul, Prometheus, Alertmanager, and blackbox-exporter, deploying the Proxy main container, writing the Prometheus access configuration, and importing the built-in alert rules.

Important: There must be no Error during execution (Warnings can be ignored). The install script will output the random initial password for the admin account, so be sure to save it properly.

Access

After the installation is complete, access it through a browser:

http://<DOMAIN_NAME>:8010

The default account is admin, and the password is the random password output by the install script.

Service Ports

Port Purpose
8010 OpsAnt Web platform (Django)
4505 / 4506 SaltStack Master
4507 OpsMini Server data plane (gRPC, Agent connection)
4508 OpsMini Server control plane HTTP (called inside the container, not exposed externally)
9090 Prometheus
9093 Alertmanager
8500 Consul

Other Installation Methods

Next Steps

After the installation is complete, refer to First Login to log in and onboard your first host.