Explorer
Install Dependencies
Remove any existing versions of Node.js and install the required packages:
sudo apt autoremove nodejs -y
curl -fsSL https://deb.nodesource.com/setup_19.x | sudo -E bash -
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install nginx certbot python3-certbot-nginx nodejs git yarn -yNGINX Configuration
Create an NGINX configuration file for your explorer:
sudo nano /etc/nginx/sites-enabled/explorer.apollo-sync.comCreate this sample configuration:
server {
listen 80;
listen [::]:80;
server_name explorer.apollo-sync.com;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
gzip on;
gzip_proxied any;
gzip_static on;
}SSL Configuration
Install Certificate SSL
Run Certbot to install SSL for NGINX:
sudo certbot --nginx --register-unsafely-without-emailAfter completion, you can restart NGINX:
sudo systemctl restart nginxExplorer Configuration
Clone the Repository
cd $HOME
git clone https://github.com/Apollo-Sync/explorer.gitCreate or Edit Your Configuration File
nano $HOME/explorer/chains/testnet/airchains.jsonIf you cannot find the airchains file, you can search for the file by:
sudo find / -name "airchains.json"change your domain :
{
"chain_name": "airchains",
"api": ["https://airchains-testnet-api.apollo-sync.com"],
"rpc": ["https://airchains-testnet-rpc.apollo-sync.com"],
"sdk_version": "0.50.3",
"addr_prefix": "air",
"min_tx_fee": "200",
"logo": "/logos/airchains.jpg",
"assets": [
{
"symbol": "AMF",
"base": "amf",
"exponent": 6,
"logo": "/logos/airchains.jpg"
}
]
}Build the Explorer
Navigate to the explorer directory, install dependencies, and build:
cd $HOME/explorer
yarn && yarn buildCopy the Web Files to the Nginx HTML Folder
sudo cp -r $HOME/explorer/dist/* /usr/share/nginx/html
sudo systemctl restart nginxedit your information web:
sudo nano src/plugins/i18n/locales/en.jsonsudo nano src/layouts/components/NavFooter.vuesudo nano src/layouts/components/DefaultLayout.vuesudo nano /root/explorer/index.htmlLast updated