Prepare the Linux environment

Before installing DG Micro, verify that your Linux host meets the minimum hardware and software specifications. Data integrity is paramount; a misconfigured environment can lead to silent corruption or security vulnerabilities. Ensure your operating system is a supported LTS release, such as Ubuntu 22.04 or RHEL 8.9, and that you have sudo privileges.

1. Verify System Requirements

Check that your system has at least 4 GB of RAM and 20 GB of free disk space. Use free -h to check memory and df -h to check storage. If resources are insufficient, the DG Micro daemon may fail to start or drop packets during peak load.

2. Install Required Dependencies

DG Micro relies on specific libraries for networking and encryption. Install them using your package manager. For Debian-based systems:

Shell
sudo apt update && sudo apt install -y curl gnupg2 ca-certificates lsb-release

For RHEL/CentOS:

Shell
sudo yum install -y curl gnupg2 ca-certificates

These packages ensure secure communication with the DG Micro repository and proper certificate validation. Skipping this step can result in failed connections or insecure data transfer.

Install DG Micro packages

DG Micro handles the critical flow of distributed generation data. A broken installation compromises data integrity and system security. Follow this sequence to download and install the packages on your Linux environment.

DG Micro
1
Update system repositories

Run sudo apt update or sudo yum update to refresh your package manager. This ensures you pull the latest security patches and compatible library versions required by DG Micro. Skipping this step can lead to dependency conflicts during installation.

DG Micro
2
Install prerequisite libraries

DG Micro relies on standard Linux libraries for network communication and data parsing. Install the necessary dependencies using your distribution's package manager. For Debian/Ubuntu systems, use sudo apt install -y libcurl4-openssl-dev libssl-dev. On Red Hat/CentOS, use sudo yum install -y libcurl-devel openssl-devel.

DG Micro
3
Download the DG Micro archive

Navigate to the official DG Micro documentation portal or verified repository. Download the latest stable release archive. Use wget or curl to fetch the file directly into your working directory. Verify the download checksum if provided in the official documentation to ensure the file has not been tampered with.

DG Micro
4
Extract and configure the package

Extract the archive using tar -xzf dg-micro-linux.tar.gz. Change into the newly created directory. Review the README.md or INSTALL.md file for any distribution-specific configuration steps. This file often contains the exact paths required for your Linux environment.

DG Micro
5
Run the installation script

Execute the provided installation script with root privileges. For example, run sudo ./install.sh. The script will compile the binaries and place them in the correct system directories. Monitor the output for any errors. If the script completes without errors, DG Micro is now installed and ready for configuration.

  • System repositories updated
  • Prerequisite libraries installed
  • DG Micro archive downloaded
  • Archive extracted to working directory
  • Installation script executed successfully

Configure file permissions

DG Micro relies on precise file system permissions to maintain data integrity. When the application processes sensitive grid data, incorrect ownership or access rights can expose configuration files or corrupt state directories. This section outlines the exact Linux commands to secure your DG Micro environment, ensuring that only the designated service user can read, write, or execute critical files.

DG Micro
1
Create a dedicated system user

Run sudo useradd --system --no-create-home --shell /usr/sbin/nologin dgmicro to create a non-login system account. This isolates the DG Micro process from other users and prevents interactive shell access if the service is compromised. The --no-create-home flag keeps the filesystem clean, as the application will operate within its own designated directories.

DG Micro
2
Assign ownership to the service user

Change the ownership of all DG Micro installation and data directories using sudo chown -R dgmicro:dgmicro /opt/dgmicro. Replace /opt/dgmicro with your actual installation path. This ensures that the DG Micro process is the sole owner of the files it needs to manage, preventing accidental modification by other system administrators or processes.

DG Micro
3
Set restrictive directory permissions

Apply chmod -R 750 /opt/dgmicro to set base permissions. This grants the owner full access (read, write, execute), the group limited read/execute access, and denies all access to others. For configuration files that should never be modified at runtime, use chmod 640 to allow group read-only access. This prevents unauthorized users from altering runtime settings or injecting malicious configurations.

4
Secure log and state directories

Create separate directories for logs and state data, such as /var/log/dgmicro and /var/lib/dgmicro. Set ownership to dgmicro:dgmicro and permissions to 750. This separation ensures that log rotation scripts or monitoring tools in the same group can read logs without needing write access to the core application binaries, reducing the attack surface.

Verify your setup by switching to the dgmicro user with sudo -u dgmicro whoami and attempting to access the directories. If the service fails to start, check the logs for "Permission denied" errors and adjust the group permissions accordingly. Regular audits using find /opt/dgmicro -perm -o=r can help identify any files that have inadvertently become world-readable.

Automate data backups

DG Micro on Linux works best as a sequence, not a scramble through settings. Do the minimum first: confirm compatibility, connect the core hardware, update only when needed, and test the result before adding optional features. That order keeps the task understandable and makes failures easier to isolate. After each step, pause long enough for the interface to finish syncing. Many setup problems are timing problems disguised as configuration problems. If the same step fails twice, record the exact error, restart the smallest affected piece, and retry before moving deeper.

1
Confirm prerequisites
Check compatibility, account access, firmware, network, and physical access before changing the DG Micro on Linux setup.
2
Make one change at a time
Apply the setup steps in order so any connection, pairing, or permission failure is easy to isolate.
3
Verify the result
Test the final state from the app and from the physical device before adding automations or optional settings.

Verify System Health

Before processing real-world data, confirm that DG Micro is running stably and logging correctly. This verification phase acts as your safety net, ensuring that no silent failures compromise data integrity or system security.

Check Service Status

First, verify that the core service is active and enabled. Use systemctl to check the status of the dg-micro service.

Shell
systemctl status dg-micro

Look for the active (running) state. If the service is inactive, start it with sudo systemctl start dg-micro and enable it for boot with sudo systemctl enable dg-micro. Consult the official documentation for specific service unit names if your installation differs.

Inspect Logs for Errors

Next, review the system journal to ensure the application is logging data as expected. Look for any error messages or warnings that might indicate configuration issues or resource constraints.

Shell
journalctl -u dg-micro --since "1 hour ago"

A healthy system should show routine informational logs. If you see repeated errors, check the configuration files or refer to the troubleshooting section of the official guides. Ensure that log rotation is configured to prevent disk space exhaustion, which is a common cause of service failure in high-stakes environments.

Validate Data Output

Finally, confirm that the output directory or database is receiving data. Check the file timestamps or query the database to ensure recent entries are present.

Shell
ls -lt /var/lib/dg-micro/data/

If the directory is empty or stale, verify the data pipeline configuration. Ensure that the service has the necessary permissions to write to the designated storage location. Regularly monitoring these health indicators prevents data loss and maintains the reliability of your micro-grid management system.

Common setup: what to check next