Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hermes-node-agent
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lisa
hermes-node-agent
Commits
b02c7a42
Commit
b02c7a42
authored
May 01, 2026
by
Lisa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: All config defaults use wss:// instead of ws:// (security)
parent
6bfca274
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
123 additions
and
1 deletion
+123
-1
build-installer.sh
deploy/windows/build-installer.sh
+1
-1
install.sh
package-hermes-node-agent/install.sh
+122
-0
No files found.
deploy/windows/build-installer.sh
View file @
b02c7a42
...
@@ -38,7 +38,7 @@ echo 'exit /b 0' >> "$PAYLOAD/sexec.bat"
...
@@ -38,7 +38,7 @@ echo 'exit /b 0' >> "$PAYLOAD/sexec.bat"
# Config template
# Config template
cat
>
"
$PAYLOAD
/config/config.json"
<<
'
EOF
'
cat
>
"
$PAYLOAD
/config/config.json"
<<
'
EOF
'
{
{
"gateway_url": "ws://YOUR-GATEWAY:8765",
"gateway_url": "ws
s
://YOUR-GATEWAY:8765",
"node_name": "WIN-NODE",
"node_name": "WIN-NODE",
"token": "YOUR-TOKEN-HERE",
"token": "YOUR-TOKEN-HERE",
"sexec_path": "./sexec.bat",
"sexec_path": "./sexec.bat",
...
...
package-hermes-node-agent/install.sh
0 → 100755
View file @
b02c7a42
#!/bin/bash
# Hermes Node Protocol
# Copyright (c) 2026 Stefy (nextime) Lanza <stefy@nexlab.net>
# All rights reserved.
#
# This software is released under the MIT License with a copyleft clause.
# See the LICENSE file for full terms.
# Hermes Node Agent Installer — Linux Version
# Installs the Hermes Node Agent as a SysV init service
# Requires: bash, Python 3, pip, root (for service)
set
-e
echo
"=== Hermes Node Agent Installer (Linux) ==="
echo
""
# Check if running as root (for service setup)
if
[
"
$EUID
"
-eq
0
]
;
then
RUN_AS_ROOT
=
true
else
RUN_AS_ROOT
=
false
echo
"⚠️ Not running as root — skipping service installation."
echo
" To install as a service, run: sudo
$0
"
echo
""
fi
# Check for Python 3
if
!
command
-v
python3 &> /dev/null
;
then
echo
"❌ ERROR: Python 3 is required but not found."
exit
1
fi
echo
"✓ Python:
$(
python3
--version
)
"
# Check for pip
if
!
command
-v
pip3 &> /dev/null
;
then
echo
"❌ ERROR: pip3 is required but not found."
if
[
"
$RUN_AS_ROOT
"
=
true
]
;
then
echo
" Install with: apt install python3-pip"
else
echo
" Install with: pip install --user websockets"
fi
exit
1
fi
# Install websockets library
echo
"[1/5] Installing Python dependencies..."
pip3
install
--quiet
websockets 2>/dev/null
||
pip
install
--quiet
websockets
if
[
$?
-ne
0
]
;
then
echo
"❌ Failed to install websockets. Try: pip3 install websockets"
exit
1
fi
echo
"✓ websockets library installed"
# Determine install locations
if
[
"
$RUN_AS_ROOT
"
=
true
]
;
then
AGENT_DIR
=
"/usr/local/bin"
CONFIG_DIR
=
"/etc/hermes-node"
SERVICE_FILE
=
"
$(
pwd
)
/node-agent/hermes-node-agent.init.d"
else
AGENT_DIR
=
"
$HOME
/.local/bin"
CONFIG_DIR
=
"
$HOME
/.config/hermes-node"
SERVICE_FILE
=
""
fi
mkdir
-p
"
$AGENT_DIR
"
mkdir
-p
"
$CONFIG_DIR
"
# Copy agent script
echo
"[2/5] Installing agent script..."
cp
"
$(
pwd
)
/node-agent/hermes_node_agent.py"
"
$AGENT_DIR
/hermes-node-agent"
chmod
+x
"
$AGENT_DIR
/hermes-node-agent"
echo
"✓ Installed:
$AGENT_DIR
/hermes-node-agent"
# Create config file if missing
echo
"[3/5] Checking configuration..."
if
[
!
-f
"
$CONFIG_DIR
/config.json"
]
;
then
echo
"[4/5] Creating config file..."
TOKEN
=
$(
python3
-c
"import secrets; print(secrets.token_hex(16))"
)
cat
>
"
$CONFIG_DIR
/config.json"
<<
EOF
{
"gateway_url": "wss://YOUR-GATEWAY-HOST:8765",
"node_name": "
$(
hostname
)
",
"token": "
$TOKEN
",
"sexec_path": "
$HOME
/.config/hermes-node-agent/sexec/sexec.sh",
"reconnect_interval": 5,
"heartbeat_interval": 30
}
EOF
echo
"✓ Config:
$CONFIG_DIR
/config.json"
echo
""
echo
"⚠️ IMPORTANT: Edit
$CONFIG_DIR
/config.json"
echo
" → Set gateway_url to your gateway (e.g., wss://zeiss:8765)"
echo
" → Set token to match gateway's token for this node"
else
echo
"[4/5] Config already exists → skipping"
echo
" Config:
$CONFIG_DIR
/config.json"
fi
# Install SysV init service (root only)
if
[
"
$RUN_AS_ROOT
"
=
true
]
&&
[
-f
"
$SERVICE_FILE
"
]
;
then
echo
"[5/5] Installing SysV init service..."
cp
"
$SERVICE_FILE
"
/etc/init.d/hermes-node-agent
chmod
+x /etc/init.d/hermes-node-agent
update-rc.d hermes-node-agent defaults 2>/dev/null
||
true
echo
"✓ Service: /etc/init.d/hermes-node-agent"
echo
""
echo
"Service commands:"
echo
" /etc/init.d/hermes-node-agent start|stop|restart|status"
else
echo
"[5/5] Skipping service installation (not root)"
echo
""
fi
echo
"=== Installation Complete ==="
echo
""
echo
"Next steps:"
echo
" 1. Edit config:
$CONFIG_DIR
/config.json"
echo
" 2. Start agent:
$AGENT_DIR
/hermes-node-agent --config
$CONFIG_DIR
/config.json"
echo
" 3. Verify logs: tail -f /tmp/hermes-node-agent.log"
echo
""
echo
"For Windows nodes, see WINDOWS_INSTALL.md"
echo
"For full deployment guide, see DEPLOYMENT.md"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment