mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
pakcages
This commit is contained in:
6
website/docs/articles/000_intro.md
Normal file
6
website/docs/articles/000_intro.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Support Topics
|
||||
|
||||
7
website/docs/articles/accounts/_category_.json
Normal file
7
website/docs/articles/accounts/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Account Administration",
|
||||
"position": 9,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
69
website/docs/articles/accounts/forbidden-usernames.md
Normal file
69
website/docs/articles/accounts/forbidden-usernames.md
Normal 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 (a–z) and digits (0–9).
|
||||
- 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 (a–z) and digits (0–9).
|
||||
- Usernames cannot contain less than **5** characters.
|
||||
- Usernames cannot contain more than **20** characters.
|
||||
|
||||
Passwords may **only** use lowercase letters (a–z) and digits (0–9).
|
||||
- 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 (a–z) and digits (0–9).
|
||||
- Passwords cannot contain less than **8** characters.
|
||||
- Passwords cannot contain more than **20** characters.
|
||||
|
||||
## Reserved usernames
|
||||
|
||||
OpenPanel reserves some usernames for the system’s 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.
|
||||
7
website/docs/articles/backups/_category_.json
Normal file
7
website/docs/articles/backups/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Backups",
|
||||
"position": 2,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
7
website/docs/articles/databases/_category_.json
Normal file
7
website/docs/articles/databases/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Databases",
|
||||
"position": 4,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
@@ -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':
|
||||
|
||||

|
||||
|
||||
2. From OpenPanel > Process Manager
|
||||
|
||||
Login to OpenPanel and navigate to Process Manager to view under which PHP version is the phpMyAdmin interface running.
|
||||
|
||||

|
||||
|
||||
### 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.
|
||||
|
||||

|
||||
|
||||
### 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.
|
||||
|
||||

|
||||
|
||||
### Step 4. Start phpMyAdmin
|
||||
|
||||
Finally, start phpMyAdmin again with new limits, by opening phpMyAdmin from the OpenPanel menu.
|
||||
|
||||

|
||||
|
||||
Limits have been increased and you can proceed.
|
||||
7
website/docs/articles/dev-experience/_category_.json
Normal file
7
website/docs/articles/dev-experience/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Developer Experience",
|
||||
"position": 16,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
@@ -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:
|
||||
|
||||

|
||||
|
||||
## 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:
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## 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
|
||||
```
|
||||
|
||||
7
website/docs/articles/docker/_category_.json
Normal file
7
website/docs/articles/docker/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Docker",
|
||||
"position": 10,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
@@ -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.
|
||||
@@ -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
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
7
website/docs/articles/domains/_category_.json
Normal file
7
website/docs/articles/domains/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Domain Management",
|
||||
"position": 1,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
```
|
||||
@@ -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_"
|
||||
|
||||

|
||||
|
||||
then edit the _SetHandler_ part and make sure that the php path does not contain phpphp but just php
|
||||
|
||||

|
||||
|
||||
click on Save and from _Server Settings > Service Status_ restart Nginx/Apache service to apply changes.
|
||||
|
||||

|
||||
7
website/docs/articles/email/_category_.json
Normal file
7
website/docs/articles/email/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Email",
|
||||
"position": 6,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
36
website/docs/articles/email/troubleshooting-email-errors.md
Normal file
36
website/docs/articles/email/troubleshooting-email-errors.md
Normal 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`
|
||||
|
||||
----
|
||||
7
website/docs/articles/extensions/_category_.json
Normal file
7
website/docs/articles/extensions/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Extensions",
|
||||
"position": 17,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
@@ -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**:
|
||||
|
||||

|
||||
|
||||
### 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:
|
||||
|
||||

|
||||
|
||||
## 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':
|
||||
|
||||

|
||||
|
||||
in the new form we need to set:
|
||||
|
||||

|
||||
|
||||
|
||||
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'.
|
||||
|
||||

|
||||
|
||||
### 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:
|
||||
|
||||

|
||||
|
||||
Click on 'Configuration' and for Server select the OpenPanel server and for hosting plan set it to match the plan name on OpenPanel server:
|
||||
|
||||

|
||||
|
||||
### 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:
|
||||
|
||||

|
||||
|
||||
and to reset the password:
|
||||
|
||||

|
||||
69
website/docs/articles/extensions/openpanel-and-whmcs.md
Normal file
69
website/docs/articles/extensions/openpanel-and-whmcs.md
Normal 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:
|
||||

|
||||
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*
|
||||

|
||||
Click on *Create New Server* and under module select **OpenPanel** then add OpenPanel server IP, username and password for the OpenAdmin panel:
|
||||

|
||||
|
||||
## 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
|
||||

|
||||
|
||||
## Test
|
||||
Create an order and create a new order to test OpenPanel API.
|
||||
7
website/docs/articles/files/_category_.json
Normal file
7
website/docs/articles/files/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "File Management",
|
||||
"position": 8,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
7
website/docs/articles/install-update/_category_.json
Normal file
7
website/docs/articles/install-update/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Install & Updates",
|
||||
"position": 13,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
7
website/docs/articles/license/_category_.json
Normal file
7
website/docs/articles/license/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Licensing",
|
||||
"position": 12,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
@@ -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:
|
||||
|
||||

|
||||
|
||||
## 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:
|
||||
|
||||

|
||||
|
||||
- From terminal:
|
||||
```bash
|
||||
opencli license enterprise-XXX
|
||||
```
|
||||
Replace `enterprise-XXX` with your license key.
|
||||
|
||||

|
||||
|
||||
### 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:
|
||||
|
||||

|
||||
7
website/docs/articles/os/_category_.json
Normal file
7
website/docs/articles/os/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Operating Systems",
|
||||
"position": 11,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
7
website/docs/articles/security/_category_.json
Normal file
7
website/docs/articles/security/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Security",
|
||||
"position": 7,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
@@ -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.
|
||||

|
||||
|
||||
On 'Advanced' you can see that the SSL and domain name does not match:
|
||||

|
||||
|
||||
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:
|
||||
|
||||

|
||||
7
website/docs/articles/server/_category_.json
Normal file
7
website/docs/articles/server/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Server Management",
|
||||
"position": 18,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
7
website/docs/articles/support/_category_.json
Normal file
7
website/docs/articles/support/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Support Operations",
|
||||
"position": 14,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
7
website/docs/articles/transfers/_category_.json
Normal file
7
website/docs/articles/transfers/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Transfers",
|
||||
"position": 3,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
@@ -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:
|
||||

|
||||
|
||||
## 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.
|
||||

|
||||
|
||||
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
|
||||
|
||||

|
||||
7
website/docs/articles/user-experience/_category_.json
Normal file
7
website/docs/articles/user-experience/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "User Experience",
|
||||
"position": 15,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
@@ -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.
|
||||
@@ -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;
|
||||
|
||||

|
||||
|
||||
In the server terminal, using the `opencli --version` command.
|
||||
|
||||
```bash
|
||||
opencli --version
|
||||
```
|
||||
|
||||
Example output:
|
||||
|
||||
```bash
|
||||
root@server:~# opencli --version
|
||||
|
||||
1.0.4
|
||||
```
|
||||
@@ -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.
|
||||
|
||||
Here’s 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.
|
||||
|
||||
[](https://postimg.cc/N2YqZyWD)
|
||||
|
||||
|
||||
### Step 3. Fill the form
|
||||
|
||||
In the form, choose your domain name under 'Application URL'.
|
||||
|
||||

|
||||
|
||||
In the 'Application Startup File' field, enter domainname/manage.py (replace domainname with your actual domain name).
|
||||
|
||||

|
||||
|
||||
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).
|
||||
|
||||

|
||||
|
||||
For the 'Type' field, select **Python**:
|
||||
|
||||

|
||||
|
||||
and in the 'Port' field, enter the same port number you used in the runserver flag (e.g., 3000).
|
||||
|
||||

|
||||
|
||||
|
||||
Click **Create** and wait a few minutes for the process to complete.
|
||||
|
||||

|
||||
|
||||
|
||||
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.
|
||||
|
||||

|
||||
@@ -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.
|
||||
7
website/docs/articles/web-servers/_category_.json
Normal file
7
website/docs/articles/web-servers/_category_.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Web Servers",
|
||||
"position": 5,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
# After restarting server, Nginx cannot automatically start
|
||||
|
||||
### Symptoms
|
||||
After restarting the server, Nginx cannot automatically start
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
### Description
|
||||
|
||||
Whhen clicking the 'Restart' or 'Start' buttons, it displays error:
|
||||
|
||||

|
||||
|
||||
`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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user