This commit is contained in:
Stefan Pejcic
2024-09-18 16:30:56 +02:00
parent ae4c612987
commit b8c5011b76
1349 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
---
sidebar_position: 1
---
# Support Topics

View File

@@ -0,0 +1,7 @@
{
"label": "Account Administration",
"position": 9,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,69 @@
# Reserved and Invalid Usernames
## Basic restrictions
### OpenPanel
OpenPanel applies the following rules when you create or modify a OpenPanel username:
Usernames may **only** use lowercase letters (az) and digits (09).
- Usernames cannot contain less than **3** characters.
- Usernames cannot contain more than **16** characters.
### OpenAdmin
OpenAdmin applies the following rules when you create or modify an admin username:
Usernames may **only** use lowercase letters (az) and digits (09).
- Usernames cannot contain less than **5** characters.
- Usernames cannot contain more than **20** characters.
Passwords may **only** use lowercase letters (az) and digits (09).
- Usernames cannot contain less than **5** characters.
- Usernames cannot contain more than **20** characters.
### SSH
OpenAdmin applies the following rules when you modify an SSH password:
Passwords may **only** use lowercase letters (az) and digits (09).
- Passwords cannot contain less than **8** characters.
- Passwords cannot contain more than **20** characters.
## Reserved usernames
OpenPanel reserves some usernames for the systems use, and you cannot use them for OpenPanel accounts. This list of reserved usernames can grow over time, and new versions of OpenPanel may add to this list.
OpenPanel checks the following file to determine whether to reserve or restrict a username:
```bash
/etc/openpanel/openadmin/config/forbidden_usernames.txt
```
Currently reserved usernames:
- test
- restart
- reboot
- shutdown
- exec
- root
- admin
- ftp
- lsws
- litespeed
- 1000
- vsftpd
- httpd
- apache2
- apache
- docker
- podman
- nginx
- php
- mysql
- mysqld
- www-data
- openpanel
- openadmin
To reserver a certail username, simply add it to the forbidden_usernames.txt file.

View File

@@ -0,0 +1,7 @@
{
"label": "Backups",
"position": 2,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,7 @@
{
"label": "Databases",
"position": 4,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,45 @@
# How to change PHP execution limit for phpMyAdmin in OpenPanel
phpMyAdmin runs on [PHP version that user sets as default php version](/docs/panel/advanced/server_settings/#set-default-php-version) in OpenPanel.
But due to [phpmyadmin minimum requirements](https://docs.phpmyadmin.net/en/latest/require.html#php), if PHP version is less than 8.0 then [the default php version defined by the administrator](/docs/admin/settings/openpanel/#other-settings) will be used instead.
To increase limits for the phpMyAdmin interface, edit the php.ini file of the version it is running on.
### Step 1. Check PHP version
There are 2 ways to check which PHP version is the phpMyAdmin interface running:
1. From phpMyAdmin interface
Login to phpMyAdmin from the OpenPanel interface and note the version under 'Server Settings':
![phpmyadmin check php version](https://i.postimg.cc/bw1TsZKG/2024-08-02-19-10.png)
2. From OpenPanel > Process Manager
Login to OpenPanel and navigate to Process Manager to view under which PHP version is the phpMyAdmin interface running.
![process manager check php verison](https://i.postimg.cc/2jXTJRQ5/2024-08-02-19-07.png)
### Step 2. Edit php.ini file
From OpenPanel navigate to Server Settings > PHP > PHP.INI editor and select that PHP version. Then make the changes, for example increase PHP `max_execution_time` value, and click on save to apply changes.
![phpini editor openpanel](https://i.postimg.cc/z8BckpCB/2024-08-02-19-09.png)
### Step 3. Kill phpMyAdmin processes
Since phpMyAdmin is running in its own webserver, we need to terminate its current processes in order to start it again with the new limits applied.
To do this, navigate to OpenPanel > Process Manager and kill all processes that mention phpMyAdmin.
![openpanel process kill](https://i.postimg.cc/KvkQhqfD/2024-08-02-19-08.png)
### Step 4. Start phpMyAdmin
Finally, start phpMyAdmin again with new limits, by opening phpMyAdmin from the OpenPanel menu.
![phpmyadmin menu item in openpanel](https://i.imgur.com/c2nA3vg.png)
Limits have been increased and you can proceed.

View File

@@ -0,0 +1,7 @@
{
"label": "Developer Experience",
"position": 16,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,210 @@
# Customizing OpenPanel Interface (Branding and White-Label)
Everything in OpenPanel is modular and can easily be modified or disabled without breaking the rest of the functionalities.
To customize OpenPanel, you have the following options:
- [Display personalized message per user](#personalized-messages)
- [Enable/disable features and pages from the OpenPanel interface](#enabledisable-features)
- [Set pre-installed services for users](#set-pre-installed-services)
- [Localize the interface](#localize-the-interface)
- [Set custom branding](#set-custom-branding)
- [Set a custom color scheme](#set-a-custom-color-scheme)
- [Replace How-to articles with your knowledge base](#replace-how-to-articles-with-your-knowledge-base)
- [Customize any page](#edit-any-page-template)
- [Customize login page](#customize-login-page)
- [Add custom CSS or JS code to the interface](#create-custom-pages)
## Personalized messages
Administrators can set a custom message to be displayed for any OpenPanel user by creating/editing file `/etc/openpanel/openpanel/core/users/USERNAME/custom_message.html` file. Both plain text and HTML code are accepted:
![custom_message_per_user](https://i.postimg.cc/5xTqkddZ/2024-09-05-15-52.png)
## Enable/disable features
Administrators have the ability to enable or disable each feature (page) in the OpenPanel interface. To activate a feature, navigate to [OpenAdmnin > Settings > OpenPanel](/docs/admin/settings/openpanel/#enable-features) and select service name in the "Enable Features" section and click save.
Once enabled, the feature becomes instantly available to all users, appearing in the OpenPanel interface sidebar, search results, and dashboard icons.
## Set pre-installed services
OpenPanel uses [docker images](https://dev.openpanel.com/images/) as the base for each hosting plan. Based on the docker image, different services can be set per plan/user. For examples, we provide 2 docker iamges, one that has nginx pre-installed and another that uses apache. By creating a custom docker image, you can set in that image what to be pre-installed when you create a new user, for exmaple, set mariadb instead of mysql or install php ioncube loader extension.
To add a custom service pre-installed for users:
- [Create a custom docker image](/docs/articles/docker/building_a_docker_image_example_include_php_ioncubeloader/)
- [Create a new hosting plan with that docker image](/docs/admin/plans/hosting_plans/#create-a-plan)
- [Create a new user on that plan](/docs/admin/users/openpanel/#create-users)
## Localize the interface
OpenPanel is localization ready and can easily be translated into any language.
OpenPanel is shipped with the EN locale, [additional locales can be installed by the Administrator](https://dev.openpanel.com/localization.html#How-to-translate).
To install additional locales (replace `de-de` with your locale):
```bash
opencli locale de-de
```
To translate OpenPanel to another language follow these steps:
1. Fork [this repository](https://github.com/stefanpejcic/openpanel-translations).
2. Copy `en_us` to your locale e.g. `es_es`
3. Translate the `messages.pot` file
4. Send a [pull request](https://github.com/stefanpejcic/openpanel-translations/pulls)
## Set custom branding
Custom brand name and logo can be set from [OpenAdmnin > Settings > OpenPanel](/docs/admin/settings/openpanel/#branding) page.
To set a custom name visible in the OpenPanel sidebar and on login pages, enter the desired name in the "Brand name" option. Alternatively, to display a logo instead, provide the URL in the "Logo image" field and save the changes.
## Set a custom color scheme
To set a custom color-scheme for OpenPanel interface, edit the `/etc/openpanel/openpanel/custom_code/custom.css` file and in it set your preferred color scheme.
```bash
nano /etc/openpanel/openpanel/custom_code/custom.css
```
Set the custom css code, save and restart openpanel to apply changes:
```bash
cd /root && docker compose up -d openpanel
```
Example:
![custom_css_code](https://i.postimg.cc/YprhHZhg/2024-06-18-15-04.png)
## Replace How-to articles with your knowledge base
[OpenPanel Dashboard page](/docs/panel/dashboard) displays [How-to articles](/docs/panel/dashboard/#how-to-guides) from the OpenPanel Docs, however these can be changed to display your knowledgebase articles instead.
Edit the file `/etc/openpanel/openpanel/conf/knowledge_base_articles.json` and in it set your links:
```json
{
"how_to_topics": [
{"title": "How to install WordPress", "link": "https://openpanel.com/docs/panel/applications/wordpress#install-wordpress"},
{"title": "Publishing a Python Application", "link": "https://openpanel.com/docs/panel/applications/pm2#python-applications"},
{"title": "How to edit Nginx / Apache configuration", "link": "https://openpanel.com/docs/panel/advanced/server_settings#nginx--apache-settings"},
{"title": "How to create a new MySQL database", "link": "https://openpanel.com/docs/panel/databases/#create-a-mysql-database"},
{"title": "How to add a Cronjob", "link": "https://openpanel.com/docs/panel/advanced/cronjobs#add-a-cronjob"},
{"title": "How to change server TimeZone", "link": "https://openpanel.com/docs/panel/advanced/server_settings#server-time"}
],
"knowledge_base_link": "https://openpanel.com/docs/panel/intro/?source=openpanel_server"
}
```
## Edit any page template
Each OpenPanel template code is open and can easily be edited by just editing the HTML code.
Templates are located inside a Docker container named `openpanel`, so you first need to find the template that has the code that you want to edit.
For example, to edit the sidebar and hide the OpenPanel logo, follow these steps:
1. Create a new folder/file locally for your modified code.
```bash
mkdir /root/custom_template/
```
2. Copy the existing template code.
```bash
docker cp openpanel:/usr/local/panel/templates/partials/sidebar.html /root/custom_template/sidebar.html
```
3. Edit the code.
4. Configure OpenPanel to use your template.
Edit the `/root/docker-compose.yml` file and in it setyour file to overwrite the original template:
```bash
nano /root/docker-compose.yml
```
and in the file under [openpanel > volumes](https://github.com/stefanpejcic/openpanel-configuration/blob/180c781bfb7122c354fd339fbee43c1ce6ec017f/docker/compose/new-docker-compose.yml#L31) set local path and original:
```bash
- /root/custom_theme/sidebar.html:/usr/local/panel/templates/partials/sidebar.html
```
6. Restart OpenPanel to apply the new template.
```bash
cd /root && docker compose up -d openpanel
```
## Customize login page
OpenPanel login page template code is located at `/usr/local/panel/templates/user/login.html` inside the docker container.
To edit the login page:
1. Create a new folder/file locally for your modified code.
```bash
mkdir /root/custom_template/
```
2. Copy the existing template code.
```bash
docker cp openpanel:/usr/local/panel/templates/user/login.html /root/custom_template/login.html
```
3. Edit the code.
4. Configure OpenPanel to use your template.
Edit the `/root/docker-compose.yml` file and in it setyour file to overwrite the original template:
```bash
nano /root/docker-compose.yml
```
and in the file under [openpanel > volumes](https://github.com/stefanpejcic/openpanel-configuration/blob/180c781bfb7122c354fd339fbee43c1ce6ec017f/docker/compose/new-docker-compose.yml#L31) set local path and original:
```bash
- /root/custom_theme/login.html:/usr/local/panel/templates/user/login.html
```
6. Restart OpenPanel to apply the new login template.
```bash
cd /root && docker compose up -d openpanel
```
## Add custom CSS or JS code
To add custom CSS code to the OpenPanel interface, edit the file `/etc/openpanel/openpanel/custom_code/custom.css`:
```bash
nano /etc/openpanel/openpanel/custom_code/custom.css
```
To add custom JavaScript code to the OpenPanel interface, edit the file `/etc/openpanel/openpanel/custom_code/custom.js`:
```bash
nano /etc/openpanel/openpanel/custom_code/custom.js
```
To insert custom code within the `<head>` tag of the OpenPanel interface, modify the content of the file located at `/etc/openpanel/openpanel/custom_code/in_header.html` and include your custom code within it:
```bash
nano /etc/openpanel/openpanel/custom_code/in_header.html
```
To insert custom code within the `<footer>` tag of the OpenPanel interface, modify the content of the file located at `/etc/openpanel/openpanel/custom_code/in_footer.html` and include your custom code within it:
```bash
nano /etc/openpanel/openpanel/custom_code/in_footer.html
```

View File

@@ -0,0 +1,7 @@
{
"label": "Docker",
"position": 10,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,119 @@
# Building a Custom Docker image: pre-install IonCube Loader
Docker images are a base for every OpenPanel plan, and they define what Technology Stack is pre-installed for the user.
If you need something pre-installed or configured for all users on a plan, like the ionCube loader extension for the installed PHP version, follow these recommended steps:
1. Download example Docker image files.
2. Edit to include the new configuration/service.
3. Create the Docker image.
4. Create a new plan to use the image.
5. Test: create a new user on that plan.
### Download Docker Examples
Currently, we provide and maintain 2 Docker images, one that uses Nginx and the other with Apache. Download the image files that you want, either nginx or apache:
For Nginx:
```bash
git clone -n --depth=1 --filter=tree:0 \
https://github.com/stefanpejcic/OpenPanel/tree/main/docker/nginx
cd OpenPanel
git sparse-checkout set --no-cone docker/nginx
git checkout
```
For Apache:
```bash
git clone -n --depth=1 --filter=tree:0 \
https://github.com/stefanpejcic/OpenPanel/tree/main/docker/apache
cd OpenPanel
git sparse-checkout set --no-cone docker/apache
git checkout
```
After downloading the source files, there should be:
- **Dockerfile**: This file defines the software stack of the image and is used only to build the image.
- **entrypoint.sh**: Used by OpenPanel to monitor users' services status and versions, such as tracking the random IP of users' Docker containers, status of Redis/Memcached services, PHP versions installed, etc. This file is essential and should not be modified. It is executed on every restart of the user container.
- **my.cnf**: A MySQL service configuration file for customizing MySQL limits and settings.
- **pma.php**: A configuration file for phpMyAdmin to enable passwordless login from OpenPanel to phpMyAdmin.
### Edit Dockerfile
In this example, we will be adding the ionCube loader PHP extension to the image so that the pre-installed PHP 8.3 version already has ionCube enabled.
Open the **Dockerfile** with a text editor:
```bash
nano Dockerfile
```
Inside, include steps to download the ionCube extension and include it in the php.ini file for both CLI and FPM service.
First, add the part to download the extension. Ensure this is added after PHP install:
```bash
#download for PHP 8.3
RUN mkdir -p /usr/local/lib && curl -sSlL -o /tmp/ioncube.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz && tar -x --strip-components=1 -C /usr/local/lib -f /tmp/ioncube.tar.gz ioncube/ioncube_loader_lin_8.3.so
```
This downloads the extension from the ionCube website and adds it to the folder.
Now, add the part to include it in the php.fpm files:
```bash
# add for phpfpm service
RUN (echo 'zend_extension = /usr/local/lib/ioncube_loader_lin_8.3.so' && cat /etc/php/8.3/fpm/php.ini) > /etc/php/8.3/fpm/php.ini.new && mv /etc/php/8.3/cli/php.ini.new /etc/php/8.3/fpm/php.ini
# add for cli
RUN (echo 'zend_extension = /usr/local/lib/ioncube_loader_lin_8.3.so' && cat /etc/php/8.3/cli/php.ini) > /etc/php/8.3/cli/php.ini.new && mv /etc/php/8.3/cli/php.ini.new /etc/php/8.3/cli/php.ini
```
That Is it. Save the file and exit.
### Create Docker image
After adding the commands to download and install the ionCube loader, we now need to build a Docker image from the files.
Depending on the downloaded example, replace `nginx` or `apache` in this command:
```bash
docker build . -t my_custom_nginx_image
```
Make sure that the name contains either `nginx` or `apache`, as this is used by OpenPanel to determine the features to display to the user on their interface.
If the build fails, there will be an error message indicating which exact line caused the error. That line needs to be edited and the build repeated.
After successfully building the image, the next step is to create a new OpenPanel hosting plan to use it.
### Create Hosting Plan
Currently, new hosting plans with custom images can only be added from the terminal.
To create a new plan, run the following command:
```bash
opencli plan-create <NAME> <DESCRIPTION> <DOMAINS_LIMIT> <WEBSITES_LIMIT> <DISK_LIMIT> <INODES_LIMITS> <DATABASES_LIMIT> <CPU_LIMIT> <RAM_LIMIT> <DOCKER_IMAGE> <PORT_SPEED_LIMIT>
```
Example:
```bash
opencli plan-create cloud_8 "Custom plan with 8GB of RAM&CPU" 0 0 15 500000 0 8 8 my_custom_nxinx_image 200
```
### Create new user
After creating a plan that uses our newly built Docker image, the final step is to create a new user on the plan to test that the ionCube loader is indeed enabled.
Create a new user from the OpenAdmin interface or via terminal:
```bash
opencli user-add <USERNAME> <PASSWORD> <EMAIL> <PLAN_NAME>
```
Example:
```
opencli user-add stefan strongpass123 stefan@pejcic.rs cloud_8
```
After creating the user, log in to their OpenPanel and confirm that the extension is enabled by opening the PHP.INI editor or by creating a php.info file and searching for the ionCube loader.

View File

@@ -0,0 +1,28 @@
# High physical memory usage for new OpenPanel accounts
OpenPanel uses [Docker images](#) as a base for every user. We provide and maintain two official images that both use Ubuntu24 and Nginx or Apache webserver.
These images are optimized for both speed and performance, and new idle accounts will use from 10-150mb of RAM - depending if using Debian or Ubuntu as server OS.
If you want to fine tune the performanse and lower RAM usage for idle accounts, you can create a custom Docker image that will have only the services that you offer pre-installed.
Here is an example guide on creating a custom docker image:
## How OpenPanel uses RAM
When new user is created, it has a Ubuntu24 OS that has only PHP running. A unique feature of OpenPanel is that additional services are started only when needed.
For example, Nginx/Apache are started only after user adds its first domain. MySQL only after adding database/user, phpMyAdmin and WebTerminal only when opened, etc.
This allows to minimize resources needed for each user, and allows overselling of resources.
## Memory Usage shows High usage
Unlike other panels, all usage data is real-time and shows actuall usage for user. As on other panels, physical memory usage is counted in this total usage. This means that if a service or process used ram and exits, that ram is not automatically returned to the free ram and will still show as used, but in reallity its is cahced ram that can be made available at any time oif needed.
This often confuses users, so we added to periodically safely drop that cached ram after every hour.
## New Accounts
## Accounts with data

View File

@@ -0,0 +1,42 @@
# How to fix: failed to create runc console socket: mkdir /tmp/pty160439680
When running command:
```bash
opencli user-login stefan
```
If you receive an error:
> failed to create runc console socket: mkdir /tmp/pty1604396800: no space left on device: unknown
It indicates that the disk space is at 100% and you need to first free some space on the server in order to login.
First, find the partition that is full:
```bash
df -h
```
Example output:
```bash
df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 3.2G 307M 2.9G 10% /run
/dev/vda1 296G 296G 0 100% /
tmpfs 16G 252K 16G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/dm-1 10G 5.7G 4.4G 57% /var/lib/docker/devicemapper/mnt/ef7bedfb84a4b7d216944174518a29d79edbc11a17546f0a6f9f691128a0577d
/dev/dm-3 10G 1.1G 8.9G 11% /var/lib/docker/devicemapper/mnt/ff5c36635ee829daf9f9aef6b23b02afb7ee34431a2c37c4321b97a1568ba435
/dev/dm-5 160G 6.5G 154G 5% /var/lib/docker/devicemapper/mnt/77de40032c66f2f6926209de4e58a0eced5113cdc32bb363127857b1442a2989
```
In this example we see that the entire / is full, so we can use a tools such as `ncdu` do check what is using the disk space:
```bash
ncdu /
```
Navigate through directories and delete any old backups or log files by pressing `D` on the keyboard.
After freeing disk space, repeat the command.

View File

@@ -0,0 +1,12 @@
# How to fix: failed to create runc console socket: stat /tmp
When running command:
```bash
opencli user-login stefan
```
If you receive an error:
> failed to create runc console socket: stat /tmp: no such file or directory: unknown
It indicates that docker runtime files from the /tmp are missing (deleted by some program/user), so the quickest solution is to reboot the server.

View File

@@ -0,0 +1,7 @@
{
"label": "Domain Management",
"position": 1,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,20 @@
# All Domains show Nginx 502 error
This happens when a third party user/service restarted docker and the floatingip service failed to reload the `/etc/hosts` file with new docker private IP addresses.
To resolve this issue, run:
```bash
opencli server-recreate_hosts
```
Then restart Nginx service:
- soft restart (reload without downtime):
```bash
docker exec nginx bash -c "nginx -t && nginx -s reload"
```
- hard restart (stop and start again):
```bash
docker restart nginx
```

View File

@@ -0,0 +1,39 @@
# Failed to Make Connection to Backend: httpd-UDS
When loading a domain within a browser, you may receive the following error:
```
503 error
Service Unavailable
```
Check the error log for the webserver:
- For Nginx:
```bash
tail -f /var/log/nginx/error.log
```
- For Apache:
```bash
tail -f /var/log/apache2/error.log
```
Upon checking error log, the following error is appended:
> [Mon Jan 15 11:23:58.525837 2024] [proxy:error] [pid 63085:tid 140529576699456] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/phpphp8.2-fpm.sock (*) failed
In the error itself we can see that the domain is using invalid path to php-fpm service: **/run/php/phpphp8.2-fpm.sock** instead of **/run/php/php8.2-fpm.sock**
To fix this, from _OpenPanel > Domains_ click on the three dots for the domain and click on "_Edit VirtualHosts_"
![screenshot](https://i.postimg.cc/fRQqQSSb/2024-01-15-11-48.png)
then edit the _SetHandler_ part and make sure that the php path does not contain phpphp but just php
![screenshot](https://i.postimg.cc/XYcbRbJT/2024-01-15-11-50.png)
click on Save and from _Server Settings > Service Status_ restart Nginx/Apache service to apply changes.
![screenshot](https://i.postimg.cc/D08GN6PM/2024-01-15-11-52.png)

View File

@@ -0,0 +1,7 @@
{
"label": "Email",
"position": 6,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,36 @@
# Troubleshooting Email Errors
Email communication is crucial for any organization, but issues can arise that disrupt this essential service. This guide provides practical steps to diagnose and resolve common email errors encountered in [OpenPanel Enterprise edition](/product/openpanel-premium-control-panel/), ensuring your email systems run smoothly and efficiently.
## ERROR listmailuser: '/tmp/docker-mailserver/postfix-accounts.cf' does not exist
Dovecot is not started until the first email account is created, therefor listing email accounts with the command `opencli email-setup email list` before creating any email accounts, will produce error:
```bash
root@stefi:/usr/local/mail/openmail# opencli email-setup email list
2024-08-27 07:55:15+00:00 ERROR listmailuser: '/tmp/docker-mailserver/postfix-accounts.cf' does not exist
2024-08-27 07:55:15+00:00 ERROR listmailuser: Aborting
```
**Solution**: Create an email account first with [opencli email-setup email add](https://dev.openpanel.com/cli/email.html#Create-email).
----
## Error: auth-master: userdb lookup(user@example.net): connect(/run/dovecot/auth-userdb) failed: No such file or directory
Immediately after creating first email account, dovecot is still creating necessary files in the background, so running the `opencli email-setup email list` immediately after creating first email account will produce an error:
```
root@stefi:/usr/local/mail/openmail# opencli email-setup email list
doveadm(stefan@stefi.openpanel.site)<577><>: Error: auth-master: userdb lookup(stefan@stefi.openpanel.site): connect(/run/dovecot/auth-userdb) failed: No such file or directory
doveadm(stefan@stefi.openpanel.site): Error: User lookup failed: Internal error occurred. Refer to server log for more information.
2024-08-27 07:55:46+00:00 ERROR listmailuser: Supplied non-number argument '' to '_bytes_to_human_readable_size()'
2024-08-27 07:55:46+00:00 ERROR listmailuser: Aborting
2024-08-27 07:55:46+00:00 ERROR listmailuser: Supplied non-number argument '' to '_bytes_to_human_readable_size()'
2024-08-27 07:55:46+00:00 ERROR listmailuser: Aborting
* stefan@stefi.openpanel.site ( / ) [%]
```
**Solution**: Repeat the command `opencli email-setup email list`
----

View File

@@ -0,0 +1,7 @@
{
"label": "Extensions",
"position": 17,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,90 @@
# OpenPanel and FOSSBilling
OpenPanel Enterprise edition has billing integrations with [WHMCS](/docs/articles/extensions/openpanel-and-whmcs/) and FOSSBilling.
## OpenPanel
### Whitelist FOSSBillling
Before you can setup the OpenPanel server manager in FOSSBilling, you need to first whitelist your FOSSBilling server's IP address inside of OpenAdmin interface, and enable API access.
To enable access to the FOSSBilling server's IP, first check the ip address on that server, from terminal you can run:
```bash
curl ip.openpanel.co
```
Login to OpenAdmin and under **Settings > Firewall** add the FOSSBilling server's IP under **Allow IP address**:
![whitelist ip](https://i.postimg.cc/433M6LBr/2024-08-04-16-10.png)
### Enable API access
To enable API access on OpenPanel, navigate to **Settings > API Access** from the OpenAdmin interface and click on 'Enable API access' button:
![enable api](https://i.postimg.cc/VsthWbWL/2024-08-04-16-14.png)
## FOSSBilling
### Download OpenPanel Server Manager
On the FOSSBilling server navigate to the directory where FOSSBilling is installed and run this command to download the latest OpenPanel Server Manager:
```bash
wget -O library/Server/Manager/OpenPanel.php https://raw.githubusercontent.com/stefanpejcic/FOSSBilling-OpenPanel/main/OpenPanel.php
```
### Add OpenPanel Server
Login to your FOSSBilling admin panel and go to **System -> Hosting plans and servers** from within the navigation bar, then click on 'New server':
![new server](https://i.postimg.cc/bYV8DngC/2024-08-04-15-19.png)
in the new form we need to set:
![add openpanel server](https://i.postimg.cc/jKcjYwHJ/2024-08-04-15-21.png)
4. Name: anything that you want to identify the server
5. Hostname: if you are using domain to access OpenPanel, add it here, otherwise add the IP address.
6. IP: set the IP address of the OpenPanel server.
7. Assigned IP addresses: set IP addresses that are added on OpenPanel server.
8. Nameserver 1: Set nameserver to use for domains
9. Nameserver 2: Set nameserver to use for domains
10. Server manages: **Select OpenPanel**
11. Username: Set OpenAdmin panel username
12. Password: Set OpenAdmin panel password
13. Connection port: Set to `2087`
14. Use secure connection: *Yes* fi you are using domain name for panel access, otherwise *No*
and click on the 'Add server' button.
### Add Hosting Plan for OpenPanel
From your FOSSBilling admin panel go to **System -> Hosting plans and servers** from within the navigation bar, then click on 'New hosting plan'.
Set the name for the plan **same as on OpenPanel hosting plan** and click on 'Create hosting plan'.
![add plan](https://i.postimg.cc/02LsZqL7/2024-08-04-15-23.png)
### Assign OpenPanel Server to product
From your FOSSBilling admin panel go to **Products -> Products & Services** from within the navigation bar, then click on the edit icon for the plan:
![edit plan](https://i.postimg.cc/N0twqkGM/2024-08-04-15-24.png)
Click on 'Configuration' and for Server select the OpenPanel server and for hosting plan set it to match the plan name on OpenPanel server:
![important](https://i.postimg.cc/GmG155CV/2024-08-04-15-26.png)
### Test connection
Create a new client and order the product that is configured to create OpenPanel account.
User should be able to login to their OpenPanel account:
![login](https://i.postimg.cc/x882pjf3/2024-08-04-15-17.png)
and to reset the password:
![reset password](https://i.postimg.cc/PJ7kgGNs/2024-08-04-15-17-1.png)

View File

@@ -0,0 +1,69 @@
# OpenPanel and WHMCS
OpenPanel Enterprise edition has billing integrations with WHMCS and [FOSSBilling](/docs/articles/extensions/openpanel-and-fossbilling).
OpenPanel WHMCS module allows users to integrate billing automations with their OpenPanel server.
# OpenPanel
To setup WHMCS to use your OpenPanel server follow these steps:
## Enable API
First make sure that API access is enabled by going to `OpenAdmin > API` or by running `opencli config get api` from the terminal:
![enable_api](https://i.postimg.cc/L6vwMQ4t/image.png)
If API is not enabled, click on the "Enable API access" button or from terminal run
```bash
opencli config update api on
```
We recommend creating new Administrator user for API, to create a new user navigate to *OpenAdmin > OpenAdmin Settings* and create new admin user, or from terminal run:
```bash
opencli admin new USERNAME_HERE PASSWORD_HERE
```
## Whitelist on OpenPanel
On OpenPanel server make sure that the OpenAdmin port 2087 is open on `OpenAdmin > Firewall` or whitelist the IP adress of your WHMCS server.
to whitelist ip address from terminal run:
```bash
csf -a WHMCS_IP_HERE
```
or if using UFS:
```bash
ufw allow from WHMCS_IP_HERE
```
## Create hosting package
Hosting packages need to be created on both OpenPanel and WHMCS servers.
On OpenPanel server login to admin panel and on `OpenAdmin > Plans` create hosting packages that you will be assinging to users on WHMCS.
# WHMCS
## Install OpenPanel WHMC Module
Login to SSH for WHMCS server
Navigate to `path_to_whmcs/modules/servers`
Run this command to create a new folder and in it download the module:
```bash
git clone https://github.com/stefanpejcic/openpanel-whmcs-module.git openpanel
```
## Whitelist on WHMCS
On WHMCS server also make sure that the 2087 port is opened or whitelist the IP address of your OpenPanel server.
## WHMCS Module Setup
From WHMS navigate to: *System Settings > Products & Services > Servers*
![screenshot](https://i.postimg.cc/MHWpL3tc/image.png)
Click on *Create New Server* and under module select **OpenPanel** then add OpenPanel server IP, username and password for the OpenAdmin panel:
![create_whmcs_group](https://i.postimg.cc/3Jh3nqWY/image.png)
## Create hosting package
On the WHMCS server create first a new group and then create new plans under this group. When creating products, make sure to select OpenPanel for Module and the newly created group
![screenshot2](https://i.postimg.cc/NLvF4GSc/image.png)
## Test
Create an order and create a new order to test OpenPanel API.

View File

@@ -0,0 +1,7 @@
{
"label": "File Management",
"position": 8,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,7 @@
{
"label": "Install & Updates",
"position": 13,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,7 @@
{
"label": "Licensing",
"position": 12,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,39 @@
# Upgrading to OpenPanel Enterprise and activating License
OpenPanel is available in two editions:
- **Community** - a free hosting control panel for Debian and Ubuntu OS, suitable for VPS and private use.
- **Enterprise** - offers advanced features for user isolation and management, suitable for web hosting providers.
More information: [OpenPanel Community VS Enterprise edition](/beta)
## Purchase License
To purchase a license for the OpenPanel Enterprise edition [click here](https://my.openpanel.com/cart.php?a=add&pid=1).
After payment, license key is automatically issued and you will see it under the Services page:
![license key](https://i.postimg.cc/0ybCkTQX/2024-08-04-15-40.png)
## Add License Key
### To existing installation:
- From OpenAdmin:
If you already have OpenPanel Community edition installed, navigate to **OpenAdmin > Try Enterprise** and add the key into the form:
![add license key](https://i.postimg.cc/P5VTZwdr/2024-08-04-15-46.png)
- From terminal:
```bash
opencli license enterprise-XXX
```
Replace `enterprise-XXX` with your license key.
![opencli license](https://i.imgur.com/rxqjFsy.png)
### To new installation:
If you will be installing OpenPanel Enterprise on another server, copy the install command from your service page and paste it into new server:
![install command](https://i.postimg.cc/3xFDH9jf/2024-08-04-15-43.png)

View File

@@ -0,0 +1,7 @@
{
"label": "Operating Systems",
"position": 11,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,7 @@
{
"label": "Security",
"position": 7,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,47 @@
# Domain is loading the SSL of another unrelated domain
### Symptoms
Attempting to load an SSL returns a different domain website.
---
### Description
When accessing with `https://` a domain that has no SSL installed, the Nginx webserver will automatically serve the SSL of the first domain that it finds on the server. This will result with a SSL warning for the user in browser.
![ssl-warning](https://i.postimg.cc/dV9FTBN2/prva.png)
On 'Advanced' you can see that the SSL and domain name does not match:
![ssl-exception](https://i.postimg.cc/dVFv1X6Q/druga.png)
If ssl is accepted, it will redirect user to the domain that issued SSL.
---
### Workaround
If you have a domain name set for accessing OpenPanel, then you can set that domain ssl to be used for websites that have no SSL, and if accepted it will die:
```
nano /etc/nginx/sites-enabled/default
```
and add the following block **but replace server.stefan.rs with your domain and 11.22.33.44 with your server IP address**:
```
server {
listen 11.22.33.44 :443 ssl http2 default_server;
server_name _;
ssl_certificate /etc/letsencrypt/live/server.stefan.rs/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/server.stefan.rs/privkey.pem;
return 444;
}
```
Save and restart.
```
nginx -t && service nginx reload
```
then when user accepts the SSL it will show an error:
![444 error nginx](https://i.postimg.cc/02Yjc7HQ/treca.png)

View File

@@ -0,0 +1,7 @@
{
"label": "Server Management",
"position": 18,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,7 @@
{
"label": "Support Operations",
"position": 14,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,7 @@
{
"label": "Transfers",
"position": 3,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,22 @@
# Import cPanel backup
Import cPanel accounts from backup.
## Create cpanel backup
Create a cPanel account backup using backup wizard or download a backup from Jetbackup5 interface:
![cpanel backup wizard](https://i.postimg.cc/q7MbhszY/1.png)
## Download backup
Transfer the generated backup to your server
## Import backup
To start import from OpenPanel, navigate to OpenAdmin > Users and click on 'Import User' tab.
![import cpanel bakcup in openpanel](https://i.postimg.cc/MGPsynBG/2.png)
Insert full path to the cp backup archive, select a plan to use for that user and click on 'Import from Backup'.
## That's it
Import is running in background
![import progress in openpanel](https://i.postimg.cc/YCxDCnqY/3.png)

View File

@@ -0,0 +1,7 @@
{
"label": "User Experience",
"position": 15,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,21 @@
# Disable PHP errors or increase upload limits per website
If you have multiple websites in the same domain folder and only want to enable or disable php settings for a certain website, create a file `.user.ini` inside the website folder.
In the file set the desired php values, for example:
set post and upload max file size:
```bash
upload_max_filesize = 200M
post_max_size = 200M
```
display all php errors:
```bash
error_reporting = E_ALL
display_errors = on
```
After editingq restart the php service. Navigate to PHP.INI editor and select the php version that your domain is using. Simply click on the save button and the service will be restarted, immediately applying settings from the .user.ini file.

View File

@@ -0,0 +1,21 @@
# How to find OpenPanel version
You can do it the following ways:
in the panel interface in the lower left corner;
![openpanel version](https://i.postimg.cc/TdNFbxcX/Screenshot-2023-12-26-08-57-13-090-com-android-chrome-edit.jpg)
In the server terminal, using the `opencli --version` command.
```bash
opencli --version
```
Example output:
```bash
root@server:~# opencli --version
1.0.4
```

View File

@@ -0,0 +1,53 @@
# How to Setup Django on OpenPanel
OpenPanel features a custom AutoInstaller that provides one-click installations for a variety of popular CMS and frameworks. Unlike other autoinstallers that primarily support PHP-based applications, OpenPanel's AutoInstaller also supports Python, Ruby on Rails, and Node.js applications.
Heres a step-by-step guide to installing a Python-based application like Django on OpenPanel:
### Step 1: Create a Domain
Navigate to **OpenPanel > Domains** to add the domain name you will use for your app.
Ensure the domain name is pointed to the server's IP address, which you can find on the Dashboard page. Verify that you can access the domain.
### Step 2: Open AutoInstaller
In the OpenPanel menu, click on **Auto Installer** and select **Install** under the **NodeJS & Python** section.
[![2024-08-02-12-05.png](https://i.postimg.cc/qq6JhywP/2024-08-02-12-05.png)](https://postimg.cc/N2YqZyWD)
### Step 3. Fill the form
In the form, choose your domain name under 'Application URL'.
![2024-08-02-12-07-1.png](https://i.postimg.cc/fLLTs69T/2024-08-02-12-07-1.png)
In the 'Application Startup File' field, enter domainname/manage.py (replace domainname with your actual domain name).
![2024-08-02-12-07-2.png](https://i.postimg.cc/SKVNwyjv/2024-08-02-12-07-2.png)
In the 'Optional flags' section, set the Django runserver command as follows: `runserver 0.0.0.0:3000` (replace 3000 with your desired port number).
![2024-08-02-12-07-3.png](https://i.postimg.cc/FKhHWfFS/2024-08-02-12-07-3.png)
For the 'Type' field, select **Python**:
![2024-08-02-12-08.png](https://i.postimg.cc/5NFy6dkX/2024-08-02-12-08.png)
and in the 'Port' field, enter the same port number you used in the runserver flag (e.g., 3000).
![2024-08-02-12-08-1.png](https://i.postimg.cc/52BtS5J1/2024-08-02-12-08-1.png)
Click **Create** and wait a few minutes for the process to complete.
![2024-08-02-12-07.png](https://i.postimg.cc/850kztRd/2024-08-02-12-07.png)
Note: The initial setup might be slow as it installs PM2, Python, Django admin, and other dependencies. Subsequent application setups will be faster.
### Step 4. Test in browser
Once the installation is complete, open your domain in a web browser to test the setup.
![2024-08-02-12-08-3.png](https://i.postimg.cc/CM2dhLJy/2024-08-02-12-08-3.png)

View File

@@ -0,0 +1,104 @@
# Setup Remote SMTP Server for OpenPanel
To set up a remote SMTP server for all emails sent from OpenPanel user websites, follow these steps:
## Whitelist the Remote SMTP Server
On the server with OpenPanel installed, ensure that the IP address of the remote SMTP server is whitelisted on [firewall](/docs/admin/security/firewall/).
Similarly, on the remote SMTP server, make sure to whitelist the IP address of the OpenPanel server.
## Configure SMTP per User
For each user, SMTP settings are configured via the `/etc/msmtprc` file. An example file content is shown below:
```
# /etc/msmtprc
defaults
auth off
tls off
logfile /var/log/msmtp.log
account default
host openadmin_mailserver
port 25
from USERNAME@HOSTNAME
```
[Login as root for that user](https://dev.openpanel.com/cli/commands.html#Login-as-User) and edit the file. In this file, set the email address and server to be used for all outgoing emails.
For example, you can configure Gmail SMTP settings as shown in the [Arch Linux Wiki](https://wiki.archlinux.org/title/Msmtp).
Example configuration for Gmail:
```bash
# Set defaults.
defaults
# Enable or disable TLS/SSL encryption.
auth on
tls on
tls_certcheck off
# Set up a default account's settings.
account gmail
logfile /var/log/msmtp.log
host "smtp.gmail.com"
port 587
user email_account_here@gmail.com
password "password_here"
from "email_account_here@gmail.com"
# Set default account
account default: gmail
```
Example configuration for OpenPanel MailServer using a specific email account:
```bash
# Set defaults.
defaults
# Enable or disable TLS/SSL encryption.
#auth on
tls off
tls_certcheck off
#auth plain
# Set up a default account's settings.
account USERNAME
logfile /home/USERNAME/msmtp.log
host openadmin_mailserver
port 25
user "email_account_here@example.com"
password "password_here"
from "email_account_here@example.com"
# Set default account
account default: USERNAME
```
After saving the configuration, test sending emails from a PHP website like WordPress or directly from the terminal: [Simple PHP Mail test](https://conetix.com.au/support/simple-php-mail-test/)
## Configure SMTP for all existing users
Create a new file on the server, and in it copy the [default /etc/msmtprc file](https://github.com/stefanpejcic/OpenPanel/blob/main/docker/apache/email/msmtprc).
In the file set your remote SMTP server address and optionally logins.
When finished, run the bellow command to copy the file to each OpenPanel user:
```bash
for user in $(opencli user-list --json | grep -v 'SUSPENDED' | awk -F'"' '/username/ {print $4}'); do
echo "Processing user: $user"
docker cp filename $user:/etc/msmtp
done
```
## Configure SMTP automatically for new users
To automatically have all users pre-configured to use your remote SMTP server, [build a docker image](/docs/articles/docker/building_a_docker_image_example_include_php_ioncubeloader/) that has your custom [/etc/msmtprc](https://github.com/stefanpejcic/OpenPanel/blob/main/docker/apache/email/msmtprc) file.

View File

@@ -0,0 +1,7 @@
{
"label": "Web Servers",
"position": 5,
"link": {
"type": "generated-index"
}
}

View File

@@ -0,0 +1,47 @@
# After restarting server, Nginx cannot automatically start
### Symptoms
After restarting the server, Nginx cannot automatically start
![nginx failed](https://i.postimg.cc/CL80NY5s/66a8ae7a3d7ff.png)
---
### Description
Whhen clicking the 'Restart' or 'Start' buttons, it displays error:
![nginx failed](https://i.postimg.cc/tRwyW7qg/66a8aed75d65f.png)
`systemctl status nginx.service` displays:
```
Jul 29 16:32:12 ubuntu-s-2vcpu-4gb-120gb-intel-sgp1-01 nginx[933]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jul 29 16:32:12 ubuntu-s-2vcpu-4gb-120gb-intel-sgp1-01 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Jul 29 16:32:12 ubuntu-s-2vcpu-4gb-120gb-intel-sgp1-01 systemd[1]: nginx.service: Failed with result 'exit-code'.
Jul 29 16:32:12 ubuntu-s-2vcpu-4gb-120gb-intel-sgp1-01 systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Jul 29 16:32:12 ubuntu-s-2vcpu-4gb-120gb-intel-sgp1-01 systemd[1]: nginx.service: Unit cannot be reloaded because it is inactive.
```
---
### Solution
There are errors in configuration files of one or more domains, and now after the reboot, nginx refuses to start.
Run this command to dispaly the exact error, file and even line number that causes problem:
```
nginx -t
```
You need to edit the specified lines in files, example with nano editor:
```
nano /etc/nginx/sites-enabled/DOMAIN_NAME.conf
```
then again validate nginx configuration and restart it:
```
nginx -t && service nginx restart
```