Linux Server Installation
The Edge IQ binary is installed and available on the system, set up the Server as follows:
Quick Installation
Section titled “Quick Installation”For a quick setup, you can use the following installation script. Save it as install-server.sh
, make it executable with chmod +x install-server.sh
, and run it with sudo ./install-server.sh
:
#!/bin/bash
# Edge IQ Server Installation Script# This script automates the systemd setup process for Edge IQ server
# Check if running as rootif [ "$EUID" -ne 0 ]; then echo "Please run as root (use sudo)" exit 1fi
# Create system accountecho "Creating system account..."useradd --system --home /var/lib/edgeiq-server --disabled-login --group edgeiq || true
# Create data directoryecho "Creating data directory..."mkdir -p /var/lib/edgeiq-serverchown edgeiq:edgeiq /var/lib/edgeiq-serverchmod 700 /var/lib/edgeiq-server
# Create systemd service fileecho "Creating systemd service file..."cat > /etc/systemd/system/edgeiq-server.service << EOF[Unit]Description=edgeiq ServerAfter=network.target auditd.service
[Service]EnvironmentFile=/etc/default/edgeiq-serverUser=edgeiqGroup=edgeiqExecStart=/usr/sbin/edgeiq run serverRestart=on-failureRestartSec=60
[Install]WantedBy=multi-user.targetEOF
# Create environment fileecho "Creating environment file..."cat > /etc/default/edgeiq-server << EOFEDGEIQ_STAGING_DIR=/var/lib/edgeiq-serverEDGEIQ_LICENSE_EULA_ACCEPT=yesEDGEIQ_ADMIN_INIT_PASSWORD=ChangeMeVerySoonEOF
# Set proper permissionschmod 600 /etc/default/edgeiq-server
# Reload systemdecho "Reloading systemd..."systemctl daemon-reload
# Enable and start the serviceecho "Enabling and starting Edge IQ server..."systemctl enable edgeiq-serversystemctl start edgeiq-server
echo ""echo "=== Installation Complete ==="echo "Edge IQ server is now running at http://127.0.0.1:3000"echo "Login with username: admin"echo "Password: ChangeMeVerySoon"echo ""echo "IMPORTANT: Change the admin password immediately after first login!"
Manual Installation
Section titled “Manual Installation”If you prefer to set up the server manually, follow these steps:
-
Create a system account.
-
Create a data directory.
-
Create
systemd
files. -
Start the Server.
By the end of this section, you should be able to access the Server via a browser.
Create a system account
Section titled “Create a system account”Create a system account for the Server to run under:
sudo adduser --system --home /var/lib/edgeiq-server --disabled-login --group edgeiq
Create a Data Directory
Section titled “Create a Data Directory”The Server requires a data directory to store Jobs, logs, and metric data.
The edgeiq
user home directory is /var/lib/edgeiq-server
and it will also serve as the data directory.
If a different data directory is required, create it with the appropriate ownership and permissions. For example:
sudo mkdir -p /data/edgeiq
sudo chown edgeiq:edgeiq /data/edgeiq
Create systemd
Files
Section titled “Create systemd Files”Create a systemd
service unit file:
sudo vi /etc/systemd/system/edgeiq-server.service
The file must contain the following:
[Unit]Description=edgeiq ServerAfter=network.target auditd.service
[Service]EnvironmentFile=/etc/default/edgeiq-serverUser=edgeiqGroup=edgeiqExecStart=/usr/sbin/edgeiq run serverRestart=on-failureRestartSec=60
[Install]WantedBy=multi-user.target
Create an environment file for the EnvironmentFile
setting:
sudo vi /etc/default/edgeiq-server
Here, the Server is configured through either edgeiq run server
options or environment variables. In this case, we’ll be using the latter.
At a minimum, the Server needs EDGE_IQ_STAGING_DIR
:
EDGEIQ_STAGING_DIR=/var/lib/edgeiq-serverEDGEIQ_LICENSE_EULA_ACCEPT=yesEDGEIQ_ADMIN_INIT_PASSWORD=ChangeMeVerySoon
We’ve added 2 additional environment variables:
-
EDGEIQ_LICENSE_EULA_ACCEPT=yes
prevents the one-time prompt for accepting the EULA. -
EDGEIQ_ADMIN_INIT_PASSWORD
provides an initialpassword
for the Serveradmin
user.
Upon first initialization of the Server user database, if EDGEIQ_ADMIN_INIT_PASSWORD
is unset, a random password
will be generated in the Server STDOUT
output (see journalctl -u EDGEIQ-server
).
Once you have saved the service unit file, reload systemd
:
sudo systemctl daemon-reload
To start the Server at boot, enable the service with:
sudo systemctl enable edgeiq-server
Finally, start the Server:
sudo systemctl start edgeiq-server
Verify that the Server started successfully:
systemctl status edgeiq-server
It’s a good idea to inspect the startup output, which will contain the admin
user password
if it wasn’t set with EDGEIQ_ADMIN_INIT_PASSWORD
:
journalctl -u edgeiq-server
The Server will be listening on EDGEIQ_BIND_ADDRESS
(default 127.0.0.1:3000
).
If your cert uses subjectAltName
, you must have an entry matching the cert CN
. In the below CSR
it is server.edgeiq.local
:
openssl req -new -nodes -out server.edgeiq.local.csr -newkey rsa:4096 -keyout server.edgeiq.local.key -subj '/CN=server.edgeiq.local/C=ZA/ST=Gauteng/L=Johannesburg/O=edgeiq'
The matching entry DNS.1 = server.edgeiq.local
:
authorityKeyIdentifier=keyid,issuerbasicConstraints=CA:FALSEkeyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEnciphermentsubjectAltName = @alt_names[alt_names]DNS.1 = server.edgeiq.localIP.1 = 192.168.235.10
If no subjectAltName
, the CN
will suffice for successful cert verification, else an error occurs (see journalctl -u edgeiq-server
):
...X509VerifyResult { code: 62, error: "**_Hostname mismatch_**" }
When testing with curl -v
, the output is indicative of what failed:
* subjectAltName does not match server.edgeiq.local
openssl s_client
works without issues.
Go to http://localhost:3000
in a browser. Log in with the username admin
and the appropriate password
.
At this point, the Server is ready to start serving Workers.