import{_ as e,c as t,o as a,d as n}from"./app.2c402e15.js";const b='{"title":"Preparations","description":"","frontmatter":{},"headers":[{"level":2,"title":"Preparations","slug":"preparations"},{"level":2,"title":"Get the Client ID and Client Secret on Github","slug":"get-the-client-id-and-client-secret-on-github"},{"level":2,"title":"Installing Dashboard on the server","slug":"installing-dashboard-on-the-server"},{"level":2,"title":"Configure reverse proxy","slug":"configure-reverse-proxy"},{"level":2,"title":"Configuring SSL in the aaPanel","slug":"configuring-ssl-in-the-aapanel"}],"relativePath":"en_US/guide/dashboard.md"}',o={},s=n(`

Preparations

To setup a Nezha monitorning Dashboard, you need these things:

  1. A VPS that can connect to the Internet, firewall and security policies need to open ports 8008 and 5555, otherwise it will be inaccessible and unable to receive data. A 1 core 512MB RAM server is sufficient for most usage scenarios
  2. A domain name that has been set up with an A record that resolves to the Dashboard server IP

TIP

If you want to use CDN, please prepare two domains, one connect to CDN for public access, CDN needs to support WebSocket protocol; the other domain should not connect to CDN, use it as Agent to send data to Dashboard.
This document uses "cdn.example.com" and "data.example.com" domains to demonstrate respectively

  1. A Github account

This document will use the aaPanel as an example, with future versions of the changes, some of the features may change, this document is for reference only

Get the Client ID and Client Secret on Github

Nezha Monitor uses a Github account as the login account for the admin panel

Installing Dashboard on the server

curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh  -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
./nezha.sh

to open the management script


Configure reverse proxy

#PROXY-START/
location / {
    proxy_pass http://127.0.0.1:8008;
    proxy_set_header Host $host;
    proxy_set_header      Upgrade $http_upgrade;
}
location ~ ^/(ws|terminal/.+)$  {
    proxy_pass http://127.0.0.1:8008;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
}
#PROXY-END/

Other:



Configuring SSL in the aaPanel

First, temporarily disable the reverse proxy
As with other websites, you can choose to automatically apply for a Let\xB4s Encrypt certificate or manually configure an existing certificate by going to "SSL" in the site settings
After you finish setting up SSL, you need to go back to https://github.com/settings/developers and edit the authentication application you created before, change all the domain names in the "Homepage URL" and "Authorization callback URL" you filled in before from http to https, such as: "https://cdn.example.com" and "https://cdn.example.com/oauth2/callback", If you don't change these links, you may not be able to log into the admin panel

`,25),r=[s];function i(l,c,p,h,u,d){return a(),t("div",null,r)}var m=e(o,[["render",i]]);export{b as __pageData,m as default};