Skip to main content
Version: 2.0.13

Admin

enable/disable the admin panel, reset password, add admin users, etc.

Usage: opencli admin <command> [options]

Commands:
on Enable and start the OpenAdmin service.
off Stop and disable the OpenAdmin service.
port [new_port] Display or update OpenAdmin port.
log Display the last 25 lines of the OpenAdmin error log.
logs Display live logs for all OpenAdmin services.
list List all current admin users.
new <user> <pass> [--reseller|--super] Add a new user, optionally as a reseller or super admin.
password <user> <pass> Reset the password for the specified admin user.
update <user> --allowed_plans=[] --max_accounts=<int> --max_disk_blocks=1000000 --logo_url=<url> Assign plans, limits, and branding for reseller.
rename <old> <new> Change the admin username.
suspend <user> Suspend admin user.
unsuspend <user> Unsuspend admin user.
delete <user> Delete admin user.
notifications <command> <param> [value] Control notification preferences.

Notifications Commands:
check Check and write notifications.
get <param> Get the value of the specified notification parameter.
update <param> <value> Update the specified notification parameter with the new value.

Examples:
opencli admin on
opencli admin off
opencli admin port
opencli admin port 8443
opencli admin log
opencli admin logs
opencli admin list
opencli admin new stefan SuperStrong1
opencli admin new stefan SuperStrong1 --reseller
opencli admin new stefan SuperStrong1 --super
opencli admin password stefan SuperStrong2
opencli admin rename stefan pejcic
opencli admin suspend pejcic
opencli admin unsuspend pejcic
opencli admin notifications check
opencli admin notifications get reboot
opencli admin notifications update reboot yes
opencli admin notifications update load 10
opencli admin notifications update webhook_url https://discord.com/api/webhooks/XXXX/YYYYYYY

Check Status​

Check if admin panel is enabled or disabled and display link on which the OpenAdmin is accessibe:

opencli admin
Example output
# opencli admin
● OpenAdmin is running and is available on: https://server.example.com:2087/

Enable / Disable OpenAdmin​

OpenAdmin can run in headless mode, that is to say without a front-end UI. This can further save on memory requirements and keep your server secure.

To disable access to the OpenAdmin panel:

opencli admin off
Example output
# opencli admin off
Disabling the OpenAdmin...
× OpenAdmin is disabled. To enable it run 'opencli admin on'

To enable access to the OpenAdmin panel:

opencli admin on
Example output
# opencli admin on
Enabling the OpenAdmin...
● OpenAdmin is running and is available on: https://server.example.com:2087/

List Admin users​

To view all admin accounts:

opencli admin list

Each line shows the username, role (admin, user or reseller) and whether the account is active (1) or suspended (0).

Example output
# opencli admin list
stefan|admin|1
support|user|1
reseller1|reseller|1
olduser|user|0

Create new Admin​

To create new admin accounts:

opencli admin new <username> <password>
Example output
# opencli admin new support SuperStrong1
Admin User 'support' created.

Create new Reseller​

To create new reseller accounts:

opencli admin new <username> <password> --reseller
Example output
# opencli admin new reseller1 SuperStrong1 --reseller
Reseller user 'reseller1' created.

Create Super Admin​

To create the super admin account (the admin role). Only one super admin can exist:

opencli admin new <username> <password> --super
Example output
# opencli admin new stefan SuperStrong1 --super
Super Administrator 'stefan' created.

Update Reseller​

To set allowed plans, limits and logo for a reseller account. Only the flags that are passed are changed:

opencli admin update <username> --allowed_plans=<id1,id2> --max_accounts=<NUMBER> --max_disk_blocks=<NUMBER> --logo_url=<URL>
Example output
# opencli admin update reseller1 --allowed_plans=1,2 --max_accounts=10
Reseller reseller1 updated successfully.

Reset Admin Password​

To reset the password for an admin user:

opencli admin password <username> <new_password>
Example output
# opencli admin password stefan SuperStrong2
Password for user 'stefan' changed.

===============================================================
● OpenAdmin is running and is available on: https://server.example.com:2087/

- username: stefan
- password: SuperStrong2

===============================================================

Rename Admin User​

To rename an existing admin user:

opencli admin rename <old_username> <new_username>
Example output
# opencli admin rename support helpdesk
User 'support' renamed to 'helpdesk'.

Suspend Admin User​

To suspend an existing admin user:

opencli admin suspend <username>
Example output
# opencli admin suspend helpdesk
User 'helpdesk' suspended successfully.

Unsuspend Admin User​

To unsuspend an existing admin user:

opencli admin unsuspend <username>
Example output
# opencli admin unsuspend helpdesk
User 'helpdesk' unsuspended successfully.

Delete Admin User​

To delete an existing admin user:

opencli admin delete <username>
Example output
# opencli admin delete helpdesk
User 'helpdesk' deleted successfully.
INFORMATION

Note: User with 'admin' role can not be deleted.

Notifications​

opencli admin notifications allows you to change the notification preferences.

Settings are stored in /etc/openpanel/openadmin/config/notifications.ini file. However, it is recommended not to modify this file directly. Instead, it's best to utilize the opencli commands.

Get​

The get parameter allows you to view current notification settings.

opencli admin notifications get <OPTION>
Example output
# opencli admin notifications get reboot
yes

Update​

The update parameter allows you to change the notification settings.

opencli admin notifications update <OPTION> <NEW-VALUE>
Example output
# opencli admin notifications update load 10
Updated load to 10

Check​

Run all checks now and write notifications (same as running opencli sentinel):

opencli admin notifications check
Example output
# opencli admin notifications check
--------------------------------------------------------------------------------
Sentinel - OpenPanel server health monitor
--------------------------------------------------------------------------------
Checking services:
[✔] openpanel is active and responding.
[✔] admin is active.
[✔] caddy is active and responding.
[✔] podman.socket is active.
[✔] MariaDB container active and responding.
[✔] csf is active.
[✔] phpmyadmin container is active.
[✔] No OOM errors detected.
--------------------------------------------------------------------------------
Checking traffic:
[✔] No unusual traffic detected on web ports (80|443).
--------------------------------------------------------------------------------
Checking logins, resources, and DNS...
[✔] No new logins to OpenAdmin.
[✔] No active SSH sessions.
[✔] Disk 41% < threshold 85%
[✔] Load 0.42 < threshold 20.
[✔] RAM 38% < threshold 85%
[✔] CPU 7% < threshold 90%
[✔] No SWAP configured.
[✔] All nameservers resolve to local IPs.
[✔] No dead user containers found (checked in 2s).
--------------------------------------------------------------------------------
All Tests Passed!
--------------------------------------------------------------------------------
18 PASS 0 WARN 0 FAIL
--------------------------------------------------------------------------------

Options​

Any option from notifications.ini can be read or updated. The main options are:

OptionDescriptionDefault
rebootNotify when the server is rebooted.yes
attackNotify on unusual traffic or SYN flood (DDoS) attacks.yes
limitNotify on Out of Memory (OOM) errors in the last 24 hours.yes
updateNotify when a new OpenPanel update is available.yes
dnsNotify when the panel domain or nameservers don't resolve to this server.no
loginNotify on OpenAdmin logins from a new IP address.yes
sshNotify on root SSH logins from a new IP address.yes
servicesComma-separated list of services to monitor.panel,admin,caddy,podman,mysql,csf,phpmyadmin
loadNotify when server load is above this value.20
cpuNotify when CPU usage (%) is above this value.90
ramNotify when RAM usage (%) is above this value.85
duNotify when disk usage (%) is above this value.85
swapNotify when SWAP usage (%) is above this value.85
webhook_urlAlso send notifications to this webhook (e.g. Discord).empty

The [ACTIONS] section of the file has a yes/no option for each OpenCLI action that sends a notification, for example user_create, domains_add or admin_api.

Port​

View the current OpenAdmin port:

opencli admin port
Example output
# opencli admin port
2087

Change the OpenAdmin port (must be greater than 443). The port is opened in the firewall and OpenAdmin is restarted:

opencli admin port <NUMBER>
Example output
# opencli admin port 8443
Changing port to: 8443
Opening port on firewall..
Restarting OpenAdmin..
Done

Add --no-restart to skip opening the port in the firewall and restarting OpenAdmin:

opencli admin port <NUMBER> --no-restart
Example output
# opencli admin port 8443 --no-restart
Changing port to: 8443
Make sure to open the new port on Firewall and restart OpenAdmin service to apply new port.
Done

View OpenAdmin logs​

To view all OpenAdmin logs live in split panes with multitail (press q to exit):

opencli admin logs

To tail OpenAdmin error log:

opencli admin log
Example output
# opencli admin log
Restarting OpenAdmin service:
tail -f 25 /var/log/openpanel/admin/error.log

(last 25 lines of /var/log/openpanel/admin/error.log)
Was this helpful?