import{_ as e,c as a,o as t,a4 as n}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Nezha server over Argo tunnel","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case5.md","filePath":"en_US/case/case5.md","lastUpdated":1723164446000}'),s={name:"en_US/case/case5.md"},o=n(`
Contributors:
GitHub project: Argo-Nezha-Service-Container
Mirror backup (not live update): Argo-Nezha-Service-Container
network
option to turn the gRPC
switch on.Add https://
to the beginning of the panel's domain name and /oauth2/callback
to the end of the callback address.
Argo tunnel authentication methods include json and token, use one of the two methods. The former is recommended because the script will handle all the Argo tunnel parameters and paths, while the latter needs to be set manually on the Cloudflare website and is prone to errors.
Image fscarmen/argo-nezha:latest
, supports amd64 and arm64 architectures.
Variables used
Variable Name | Required | Remarks |
---|---|---|
GH_USER | Yes | github username for panel admin authorization |
GH_CLIENTID | yes | apply on github |
GH_CLIENTSECRET | yes | apply on github |
GH_BACKUP_USER | No | The github username for backing up Nezha's server-side database on github, if not filled in, it is the same as the account GH_USER for panel management authorization |
GH_REPO | No | The github repository for backing up Nezha's server-side database files on github |
GH_EMAIL | No | github's mailbox for git push backups to remote repositories |
GH_PAT | No | github's PAT |
ARGO_AUTH | Yes | Argo Json from https://fscarmen.cloudflare.now.cc Argo token from Cloudflare official website |
ARGO_DOMAIN | Yes | Argo domain |
Koyeb
docker run -dit \\
--name nezha_dashboard \\
--pull always \\
--restart always \\
-e GH_USER=<fill in github username> \\
-e GH_EMAIL=<fill in github email> \\
-e GH_PAT=<fill in the obtained> \\
-e GH_REPO=<fill in customized> \\
-e GH_CLIENTID=<fill in acquired> \\
-e GH_CLIENTSECRET=<fill in acquired> \\
-e ARGO_AUTH='<Fill in the fetched Argo json or token>' \\
-e ARGO_DOMAIN=<fill in customized> \\
-e GH_BACKUP_USER=<If it is consistent with GH_USER, you can leave it blank> \\
fscarmen/argo-nezha
version: '3.8'
services.
argo-nezha.
image: fscarmen/argo-nezha
--pull always
container_name: nezha_dashboard
restart: always
environment:
- GH_USER=<fill in github username>
- GH_EMAIL=<fill in your github email>
- GH_PAT=<<fill in obtained>
- GH_REPO=<fill in customized>
- GH_CLIENTID=<fill in obtained>
- GH_CLIENTSECRET=<fill in fetched>
- ARGO_AUTH='<Fill in the fetched Argo json or token>'
- ARGO_DOMAIN=<fill in customized>
- GH_BACKUP_USER=<If it is consistent with GH_USER, you can leave it blank>
bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh)
Transfer via gRPC, no additional configuration required. Use the installation method given in the panel, for example
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent data.seales.nom.za 443 eAxO9IF519fKFODlW0 --tls
<filepath>/cloudflared access ssh --hostname ssh.seals.nom.za/<GH_CLIENTID>
Method 1: Change the contents of the README.md
file in the Github backup repository to backup
Method 2: After ssh, run /dashboard/backup.sh
for container version; /opt/nezha/dashboard/backup.sh
for VPS host version.
README.md
in the github backup repository, the timer service will check for updates every minute and record the last synchronized filename in the local /dbfile
to compare with the online file content.The following is an example of restoring a file with the name dashboard-2023-04-23-13:08:37.tar.gz
.
! image
bash /dashboard/restore.sh <filename>
/dashboard
folder of the original Nezha and zip it up to dashboard.tar.gz
file.tar czvf dashboard.tar.gz /dashboard
dashboard.tar.gz
./dashboard/
|-- app # Nezha panel main program
|-- argo.json # Argo tunnel json file, which records information about using the tunnel.
|-- argo.yml # Argo tunnel yml file, used for streaming web, gRPC and ssh protocols under a single tunnel with different domains.
|-- backup.sh # Backup data scripts
|-- restore.sh # Restore backup scripts
|-- dbfile # Record the name of the latest restore or backup file
|-- resource # Folders of information on panel themes, languages, flags, etc.
|-- data
| |-- config.yaml # Configuration for the Nezha panel, e.g. Github OAuth2 / gRPC domain / port / TLS enabled or not.
| \`-- sqlite.db # SQLite database file that records all severs and cron settings for the panel.
|-- entrypoint.sh # The main script, which is executed after the container is run.
|-- nezha.csr # SSL/TLS certificate signing request
|-- nezha.key # Private key information for SSL/TLS certificate.
|-- nezha.pem # SSL/TLS certificate file.
|-- cloudflared # Cloudflare Argo tunnel main program.
|-- grpcwebproxy # gRPC reverse proxy main program.
\`-- nezha-agent # Nezha client, used to monitor the localhost.