Steps and notes for deploying Nightingale via the binary method.

If you have not yet read the “Installation Prerequisites” chapter, please read it before reading this one.

Download

Download the latest release from GitHub. You will get an archive named something like n9e-${version}-linux-amd64.tar.gz. This is the X86 release; if you need ARM, download the arm64 one. There is no Windows release because Nightingale is a server-side project and usually runs on Linux.

If you want to run Nightingale on Windows or Mac, that’s fine — you just need to build it yourself. Building is straightforward; refer to the Makefile in the source repository.

Extract the downloaded archive to /opt/n9e.

mkdir /opt/n9e && tar zxvf n9e-${version}-linux-amd64.tar.gz -C /opt/n9e

Single-Node Test Installation

In this mode, only for testing, you don’t need to depend on MySQL or Redis (it actually uses SQLite and an in-memory Redis: miniredis). Starting is simple — just extract and start.

Start the Process

cd /opt/n9e && nohup ./n9e &> n9e.log &

Since this is test mode, we just use nohup. In production you should manage the n9e process with systemd.

Check the Process

# check process is runing or not
ss -tlnp|grep 17000

Login

Open http://localhost:17000 in your browser. The default username is root and the default password is root.2020.

Replace localhost with your server’s IP address.

Single-Node Production Installation

In production we recommend using MySQL and Redis to store data.

Modify Configuration

Edit /opt/n9e/etc/config.toml and configure the MySQL and Redis connection information.

DB section:

[DB]
DBType = "mysql"
DSN = "YourUsername:YourPassword@tcp(127.0.0.1:3306)/n9e_v6?charset=utf8mb4&parseTime=True&loc=Local"

Redis section:

[Redis]
Address = "127.0.0.1:6379"
Password = "YourRedisPassword"
RedisType = "standalone"

Start the Process

Just start the n9e binary — Nightingale will create the database tables automatically. Of course, this requires the DB connection account to have permission to create and alter tables.

nohup ./n9e &> n9e.log &

## Check that the process started successfully
ps -ef | grep n9e

## Check that the port is listening
ss -tlnp | grep 17000

nohup is for quick start and verification. If you have issues, check the n9e.log file.

Manage with systemd

In production we recommend managing the n9e process with systemd. Below is a simple systemd configuration example:

[Unit]
Description=Nightingale Monitoring Service
After=network.target
[Service]
Type=simple
ExecStart=/opt/n9e/n9e
WorkingDirectory=/opt/n9e
Restart=always
RestartSec=5
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=n9e
[Install]
WantedBy=multi-user.target

Save the above as /etc/systemd/system/n9e.service, then run:

## Enable auto-start at boot
sudo systemctl enable n9e

## Start the Nightingale process
sudo systemctl start n9e

Login

Open http://localhost:17000 in your browser. The default username is root and the default password is root.2020.

Replace localhost with your server’s IP address.

Cluster Mode

The logic of cluster mode is already covered in “Nightingale Architecture” — we won’t repeat it here. From the deployment perspective, you just need to set up multiple machines, deploy one n9e process on each, and configure the MySQL and Redis connection info. Multiple n9e processes share the same MySQL and Redis, so their configuration files are completely identical.

Edge Mode

For edge mode, please first read: Edge Mode in Nightingale Architecture!!!

Edge mode requires the n9e-edge binary, which can be found in the n9e-${version}-linux-amd64.tar.gz archive. n9e-edge needs to communicate with the central n9e to sync alert rules, so its configuration file must contain the connection information of the central n9e.

Edge Cluster

The n9e-edge in an edge data center can also be deployed as multiple instances forming a cluster. Within the same cluster, all n9e-edge configuration files must be consistent. Instances with the same EngineName are regarded as multiple instances of the same engine cluster — pick a name different from the central n9e. The default EngineName of the central n9e is default, and the default EngineName of the edge n9e-edge is edge.

If you have multiple edge data centers, the EngineName of n9e-edge in each should be different, e.g., edge1, edge2, etc. Only after this distinction can you assign different alert engines to different data sources.

Starting n9e-edge

Note that when starting the n9e-edge process you must specify a config directory, not a config file, e.g.:

nohup ./n9e-edge --configs etc/edge &> edge.log &

In the above, etc/edge is the config directory. Writing --configs etc/edge/edge.toml would be wrong.

FAQ

Q1: After startup I get 502 / cannot see the page?

A:

  • Is the n9e-server process running (ps aux | grep n9e);
  • Database connectivity: test with mysql -h <db-host> -u<user> -p<password>;
  • Port conflict: is the default port 17000 already in use;
  • Check logs at tail -f /var/log/n9e/server.log.

Q2: How do I upgrade the binary version?

A: See the Upgrade Guide doc. Basic steps: stop the old process → back up → replace the binary → start the new version → check logs to confirm schema migration succeeded.

Q3: Can I deploy with Docker Compose instead?

A: Yes. The community recommends Docker Compose — config files are managed in one place, and upgrades/rollbacks are easier.

References

快猫星云 联系方式 快猫星云 联系方式
快猫星云 联系方式
快猫星云 联系方式
快猫星云 联系方式
快猫星云