1. Prepare the server
Ubuntu 22.04/24.04 or another Linux server with root/sudo access is enough. Point your domain to the server IP first.
sudo apt update
sudo apt install -y curl git nginx
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
sudo mkdir -p /opt/nnop-panel
sudo chown "$USER":"$USER" /opt/nnop-panel
cd /opt/nnop-panel
wget https://nn-cloud.top/panel/releases/nnop-panel-1.0.0-source.tar.gz
tar -xzf nnop-panel-1.0.0-source.tar.gz --strip-components=1
npm install
cp .env.example .env.local
2. Configure the environment
Open .env.local, set the admin login, a strong password, a random session secret, and the public HTTPS panel URL.
NNOP_PANEL_ADMIN_USERNAME=admin
NNOP_PANEL_ADMIN_PASSWORD=change-this-password-now
NNOP_PANEL_SESSION_SECRET=replace-with-a-long-random-secret
NNOP_PANEL_PUBLIC_BASE_URL=https://panel.example.com
NNOP_PANEL_CORE_BINARY_PATH=/usr/local/bin/secure-core
NNOP_PANEL_CORE_CONFIG_PATH=/usr/local/etc/secure-core/config.json
NNOP_PANEL_CORE_SERVICE_NAME=secure-core
# For UI-only testing without applying server changes:
# NNOP_PANEL_DISABLE_CORE_APPLY=1
4. Create a systemd service
Save this block as /etc/systemd/system/nnop-panel.service, then enable the service.
[Unit]
Description=NNOP Panel
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/nnop-panel
Environment=NODE_ENV=production
Environment=PORT=3010
ExecStart=/usr/bin/npm run start
Restart=always
RestartSec=5
User=root
[Install]
WantedBy=multi-user.target
5. Put Nginx in front
This example proxies your domain to the local panel port. Add HTTPS with certbot after Nginx is working.
server {
listen 80;
server_name panel.example.com;
location / {
proxy_pass http://127.0.0.1:3010;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}