Command Line

Command Line Tool

The groupios Command Line Interface allows users to manage various system settings and services for the Groupios application. The following manual provides a detailed guide on how to navigate and use the CLI.

Initial Screen

Upon launching the Groupios CLI, you will be greeted with the welcome message and a main menu with several options. The interface will also notify you if Groupios is not currently running.

  1. Initialize
  2. Settings
  3. Services
  4. System
  5. Update
  6. Quit

Use the arrow keys to navigate through the options and press Enter to select your choice.

1. Initialize

This option is used to initialize the groupios system. Details of the initialization process will be provided upon selection.

2. Settings

Selecting Settings will open a sub-menu with further configuration options.

Settings Options
  1. Change system administrator (sysadm) password
  2. Network Management Tools
  3. Back
Change System Administrator (sysadm) Password

Use this option to change the password for the system administrator. You will be prompted to enter a new password followed by a confirmation of the new password.

Network Management Tools

The Network Management Tools options opens the nmtui which can be used to configure the network configurations.

Back

Selecting Back will return you to the main menu.

3. Services

When selecting the Services option from the main menu, you will be presented with a list of running services along with their current state and creation date.

Use the arrow keys to navigate through the list of services and press Enter to select a specific service.

After selecting a service, you will be presented with the following management options. These options are the same for all services. When you select a service, you will see the following options:

Service Options
  1. Restart
  2. Show log
  3. Show log in less (Press q to quit)
  4. Back

Use the arrow keys to navigate through these options and press Enter to select an option.

Option Descriptions
  • Restart: Restarts the selected service.
  • Show log: Displays the log output for the selected service.
  • Show log in less (Press q to quit): Opens the log output for the selected service in the less pager, allowing you to scroll through the log. Press q to quit and return to the previous menu.
  • Back: Returns you to the previous menu with the list of services.

Select Back to return to the services list and choose another service or go back to the main menu.

4. System

When selecting the System option from the main menu, you will be presented with the following system management options:

System Options
  1. Restart system
  2. Shutdown system
  3. Back

Use the arrow keys to navigate through these options and press Enter to select an option.

Option Descriptions
  • Restart system: This option will restart the entire system. Use this option if you need to reboot the system for maintenance or after making configuration changes.
  • Shutdown system: This option will shut down the entire system. Use this option to power off the system safely.
  • Back: This option will return you to the main menu.

5. Update

When selecting the Update option from the main menu, you will be presented with the following update options:

Update Options
  1. groupios Services
  2. AlmaLinux Packages
  3. AlmaLinux Packages and groupios Services
  4. Back

Use the arrow keys to navigate through these options and press Enter to select an option.

Option Descriptions
  • groupios Services: This option will update only the Groupios services. Select this option if you want to ensure that all Groupios-related services are running the latest version.
  • AlmaLinux Packages: This option will update only the AlmaLinux packages. Choose this option to keep your operating system and installed packages up to date.
  • AlmaLinux Packages and groupios Services: This option will update both the AlmaLinux packages and the Groupios services. Use this option for a comprehensive system update.
  • Back: This option will return you to the main menu.

6. Quit

Selecting Quit will exit the Groupios CLI.

Useful docker commands

In the following substitute <container> with the specific container name. To get a list of available container names, type: docker ps --format 'table {{.Names}}'

command description
docker ps Lists all running docker container
docker ps --format 'table {{.Names}}\t{{.State}}\t{{.Status}}' Formatted list of containers
docker logs -f <container> Live log of container
docker compose up -d --force-recreate <container> Restart specified container
docker compose down <container> Stop specified container
docker login -u $(cat /etc/machine-id) -p $(cat /home/groupios/secrets/docker_login) registry.groupios.com Manually login to the groupios docker registry.

Inspect Logs

You can use the greeter to inspect container logs as described here.
Alternatively, use docker logs -f <container>.

Haraka Logs

To access Haraka’s mail logs directly, execute:
docker logs -fn 1000 haraka
The -n 1000 flag limits the output to the last 1000 log entries.
By default, Haraka does not display SMTP protocol-level logs.
To include them, adjust the log level.

Changing Haraka’s Log Level

Open a shell within the Haraka container:
docker exec -it haraka bash

Edit the file /usr/local/haraka/config/loglevel:
vim /usr/local/haraka/config/loglevel

The file contains:

;LOGDATA
;LOGPROTOCOL
;LOGDEBUG
LOGINFO

To enable protocol-level logging, comment out the LOGINFO line with ; and uncomment LOGPROTOCOL.

The result should look as follows:

;LOGDATA
LOGPROTOCOL
;LOGDEBUG
;LOGINFO

If using vim, save and exit with :wq.
Haraka automatically detects the change.

Exit the container with CTRL+D and inspect the logs again:
docker logs -fn 1000 haraka