Skip to content
OSPanel edited this page Jan 4, 2024 · 394 revisions

Attention!

This documentation has been translated into English using machine technologies. The text may contain typos, inaccuracies and semantic errors.

About the program

Open Server Panel is an advanced analog of such WAMP assemblies like Xampp, Denwer, Vertrigo, Wampserver and other similar programs. If you have previously worked with such software, then it will not be difficult for you to quickly master the Open Server Panel.

Open Server Panel can work without installation, only preliminary preparation of the system is required. This means that you can safely transfer the program directory to any place on the disk or even copy it to another computer. The package already includes a tool for preparing Windows to work with the Open Server Panel — System Preparation Tool.

The software package can be managed via the web interface (in development), the command line interface (CLI), as well as using the tray menu.

Features

Open Server Panel 6 is, in fact, a new software product, the source code of which was written by us from scratch without regard to old developments.

The main differences between OSPanel 6 and OSPanel 5:

  • Full user access to the entire configuration of modules
  • Program management in console mode and via the web interface
  • Full control over processes (including monitoring and recovery after a failure)
  • The possibility of parallel operation of any modules (you can turn on at least all at the same time)
  • Ability to create module configuration profiles (including configuration files)
  • Personalization of settings for each domain (from IP to PHP version)
  • Pre-configured environment for each module (up to the entry into the shell/cli with one command)
  • 100% stable operation without bugs/freezes and encoding problems
  • Public access to all settings/templates/languages/documentation on GitHub

The web interface is under development, so at the moment the program management is available only in console mode, and changing the settings is possible only by manually editing the configuration files.

Please let us know about any problems that have arisen while working with the program, as well as about your ideas for improving/changing the functionality and interface. Join our group Telegram and read about the new versions first!

System requirements

Type Description
Operating system Windows 10 v1607 / Windows Server 2016 or later
There are no versions for Linux and macOS
32-bit systems are not supported
Free hardware resources from 3 GB of RAM and from 10 GB of disk space
Mandatory software MSVC++ 2005-2022 Redistributable Packages (it is included)
File system NTFS (network drives are not supported)

You may need to limit the number of modules running at the same time if less than 3 GB of free RAM is available on your system. Owners of low-performance computers are advised to run no more than one module of each type at a time.

Running Open Server Panel is also possible on legacy operating systems with some reservations (not all modules are available, paths longer than 255 characters are not supported):

Operating system (x64) Version number Compatibility
Windows 7 SP1 6.1.7601 limited support
Windows Server 2008 R2 SP1 6.1.7601 limited support
Windows Home Server 2011 6.1.8400 limited support
Windows Server 2012 6.2.9200 limited support
Windows 8 6.2.9200 limited support
Windows 8.1 6.3.9600 limited support
Windows Server 2012 R2 6.3.9600 limited support
Windows 10 v1507 10.0.10240 limited support
Windows 10 v1511 10.0.10586 limited support

Start of use

It is recommended to use a system based on Windows 10 or a newer version of Windows. It is advisable to install on an SSD drive (if available), which will significantly increase the speed of all modules.

Do not use the Open Server Panel on USB flash drives (fast wear and extremely slow operation) and on external storage media with an old USB 2.0 interface (extremely slow operation).

ℹ️ Attention! Do not run the program with administrator rights, this is potentially unsafe and is not a prerequisite for the operation of the Open Server Panel. Administrator rights will be requested only when the System Preparation Tool is started.

Step #1

Download the distribution and install it in the selected directory (preferably in the root of the disk). Allowed characters in the path to the root directory with the program: A-Za-z0-9-+_.\:. At the end of the installation, run the System Preparation Tool and prepare the system to work with the Open Server Panel.

Step #2

Before starting work, be sure to add the program directory to the exceptions of your firewall/antivirus and remove protection from the HOSTS file (if your firewall/antivirus has such a protective function and it does not take into account directories and programs added to exceptions).

If the firewall/antivirus is not configured correctly, then due to the continuous scanning of files accessed by working modules, the Open Server Panel will work noticeably slower. On outdated and weak computers with HDD disks instead of SSD, a drop in performance as a result of excessive activity of the antivirus program can completely paralyze the normal operation of the software package.

Step #3

Run the program and make sure that in the notification area Windows has a program icon. If the program does not start, then examine the contents of the file .\logs\general.log. Most often, program startup errors are associated with the inability to start the embedded web server:

Address already in use (#10048 in listen: Bind) — the address is already in use. The error indicates that the ip:port pair is already being used by another service or program on your system. Change the ip/port settings in the OSPanel config, or in the settings of the service or program that occupies them.

Permission denied (#10013 in listen: Bind) — permission denied. The program was forbidden to take the required ip:port pair. Configure the system firewall to allow the program to access the network.

Step #4

If during the installation (unpacking) of the program you missed the creation of the root CA certificate, then after launching the program, click on its icon in the notification area, launch the command line interface and execute the osp cacert init command there.

If during the installation (unpacking) of the program you missed the launch of the System Preparation Tool, then after launching the program, click on its icon in the notification area and launch the System Preparation Tool by selecting the menu item System Preparation Tool, this can also be done by launching the command line interface and executing the osp sysprep command there. Prepare the system and be sure to restart the computer. After restarting the computer, the program is ready for use, you can activate the necessary modules.

ℹ️ Attention! Without system preparation using the System Preparation Tool, the correct operation of the Open Server Panel on your computer will be impossible!

Step #5

Launch the Open Server Panel and open the command line interface. If, after launching the CLI, the console displays the message The system cannot write to the specified device, then set a font compatible with UTF-8 encoding in the console settings (for example: Consolas) and restart the command line interface.

Done!

If you forgot to install any modules, then you can always reinstall them by running the Open Server Panel installer again.

Directory structure

.
├── bin                       # Shared executables
├── config                    # Settings
│   ├── <module_name>         # Module settings
│   │   ├── default           # Default profile directory
│   │   │   ├── templates     # Configuration templates
│   │   │   └── settings.ini  # Module settings for the Default profile
│   │   └── module.ini        # Basic module settings (on/off + profile name)
│   ├── domains.ini           # Domain settings
│   ├── menu.ini              # Menu settings
│   └── program.ini           # Program settings
├── data                      # Data storage (databases, etc.)
├── home                      # User projects (domains)
├── licenses                  # Licenses for third-party components
├── logs                      # Log files
├── modules                   # Modules
│   └── <module_name>         # Main module directory
│       └── ospanel_data      # Service files (source files of settings and configs)
├── system                    # Service directory of the program
│   └── lang                  # Language files
├── temp                      # Temporary files
└── user                      # User data
    └── ssl                   # SSL user files (keys, certificates, etc.)

Management (CLI)

Using: osp <command> [<arguments>]

Environment management:

add     <MODULE>            Merge the environment of the module with the current environment
                            Attention! Creating a common environment for several modules from the
                            same category can lead to unpredictable errors in their work!
info                        Show information about the current environment
project <DOMAIN>            Activate the project environment and go to its root directory
reset   [init]              Reset the current environment (original system environment)
                            Use the "init" flag to initialize the command line interface
use     <MODULE>            Apply the environment of the specified module
                            If the module is disabled, then working with some of its utilities or
                            commands, including working with data (databases), may not be available!

Module management:

init    <MODULE> [PROFILE]  Re-read the module settings and recreate temporary files (configs)
                            If necessary, specify a new active module settings profile
                            This command is not available for modules in the active state!
                            Apply the module environment again (the "use" or "add" command) if it
                            is currently active and the settings/profile have changed!
off     <MODULE>            Disable the module
on      <MODULE> [PROFILE]  Enable the module (if necessary, specify a new active profile)
restart <MODULE> [PROFILE]  Restart the module (if necessary, specify a new active profile)
shell   <MODULE>            Launch the shell or command line interface of the module (if available)
status  <MODULE>            Show module status information

Other commands:

cacert  <init|show|deinit>  Generate and install | show | delete a root certificate (CA)
                            When installing a new one, all old root certificates (CA) will be deleted
convert <DOMAIN>            Convert domain name from/to Punycode
domains                     Show information about domains
exit                        Shutting down the program (the current environment will be reset)
log     <MODULE|main>  [N]  Show module/program log (last N lines, by default: 10)
modules                     Show information about modules
sysprep [silent|ssd]        Launch the Operating System Preparation tool
                            Add the "silent" flag to start the system preparation in silent mode
                            The "ssd" flag is similar to "silent" (but with SSD settings optimized)
                            Preparation in silent mode occurs automatically and without tracking
                            progress, and after its completion, a reboot will be performed!
                            To start the silent preparation process without a confirmation request
                            from Windows, the console must be started with Administrator rights
version                     Show information about the program version

Usage examples:

osp exit & ospanel          Restarting the program
osp use PostgreSQL-9.6      Using the PostgreSQL-9.6 module environment in the console
osp on PHP-8.1 myprofile    Enabling the PHP-8.1 module with changing the settings profile to MyProfile
osp restart mysql-8.0       Restarting the MySQL-8.0 module (module name is accepted in any case)
osp log main 20             Output to the console of the last 20 lines from the program log
osp reset & osp add perl    Combining the system environment with the Perl environment

Service arguments

For the commands osp add ..., osp project ..., osp reset, osp reset init and osp use ... you can use an additional argument silent, which suppresses the output of all informational messages except warnings and error messages.

For the osp reset init command, noprint can be used as the third argument instead of silent (do not output information about the environment).

For the osp init, osp off, osp on, osp restart, osp status and osp log commands, the all argument can be used instead of the module name. Use it only if you are sure exactly what you are doing.

Program setup

Program and module settings (global options) are set in the file .\config\program.ini.

ℹ️ Attention! To apply the changes, you need to restart the program.

Section [main]

The section contains the main settings of the program.

Parameter Description
api_domain The local domain of the API and web interface. If the use of the HOSTS file is enabled, then the web interface will be available in the browser on the specified domain.
If a VPN/proxy is used in the browser, then an exception for this domain must be set in the VPN/proxy settings.

Default value: ospanel
api_ip IPv4 address of the API and web interface. If a VPN/proxy is used in the browser, then an exception must be set for this IP in the VPN/proxy settings.

Default value: 127.127.127.127
api_port API and Web interface port. The program will not be able to run if such a port is already in use.

Default value: 80
clear_dns_cache Clear the DNS system cache when changing the HOSTS file (on/off). Disable this option only if you have manually made changes to the HOST file, cleared the DNS cache and no longer plan to make changes to the program and modules settings. You can also disable this option if you use a single domain — localhost.

Default value: on
hosts_file Use the HOSTS file (on/off). If disabled, the following features will become unavailable: using module names as domains (connection will be possible only by IP), using local domains (localhost only), including using a local domain to access the control panel (see domain).

Default value: on
hosts_file_encoding Encoding of the HOSTS file. Acceptable encoding values: UTF8, ANSI, ASCII.

Default value: UTF8
lang The language of the program. As a value, use the name of any language file from the directory .\system\lang.

You can use the value auto (default), in this case the system language will be used (if there is such a language file).
log_max_filesize Maximum log size (0 — disables the limit). The option sets limits for the following logs: program, api and mail server. If the size of any log exceeds the specified one, then the file of such a log will be automatically recreated.

The following designations are acceptable: B — bytes, K — kilobytes, M — megabytes, G — gigabytes, T — terabytes. To force the logs to be cleared at each start, set the value to 1 (B bytes are applied to numbers without symbols).
smtp_port Port of the built-in mail server (0 — disables the mail server).

Default value: 25
terminal_ansi_fix Activation of support for ANSI color management codes in the console (on/off/auto). By default, the value auto is used:

- The fix is applied only to systems based on Windows 7, Windows 8, Windows 10 up to version 1903 (inclusive) and is not applied to newer versions of Windows, because they already have support for ANSI codes.
- The fix does not apply to some advanced terminal emulators: Windows Terminal, ConEmu and Cmder.

Section [menu]

The section contains the settings of the program menu.

Parameter Description
group_projects_by_tld Use grouping by domain zone in the projects menu

Default value: off
show_projects Show the project management menu

Default value: on
show_modules Show the module management menu

Default value: on
show_modules_in_groups Group modules in the menu

Default value: on
show_modules_in_submenu Display the menu of modules in a separate submenu.

Default value: on
show_projects_in_submenu Display the menu of projects in a separate submenu.

Default value: off
show_tray_icon Show the program icon. Disable this option if you are running the program in the Windows Server Core environment or plan to use the autorun type of the program that does not require a Windows user login (Windows Task Scheduler -> Startup when the computer boots).

Default value: on

Section [modules]

The section contains global module settings. They are used if the value auto (default) is specified in the module settings. These values can be redefined in the settings file for any module with the ability to turn on/off, and the values of the options allowed_env_vars, terminal_codepage and time_zone can be redefined in the settings of any modules. See the file .\config\<module_name>\<profile_name>\settings.ini.

Parameter Description
allowed_env_vars List of Windows environment variables (separated by a space) transmitted to the module environment. The white list of variables is necessary to filter the working environment of modules from the environment of similar software installed in the system.

Make changes to this list only if you know exactly what you are doing, because this may disrupt the normal operation of the modules.
log_max_filesize Maximum log size (0 — disables the limit). If the size of any log exceeds the specified one, its log file will be recreated when the module is started again.

The following designations are acceptable: B — bytes, K — kilobytes, M — megabytes, G — gigabytes, T — terabytes. To force the logs to be cleared at each start, set the value to 1 (B bytes are applied to numbers without symbols).
log_write_title Add a header to the module log at each startup (on/off). It is useful for visual differentiation of work sessions if automatic clearing of the module log is not used.
max_probation_fails The maximum number of consecutive (consecutive) failures of the trial period, after which the module will enter the "Error" state (see probation).
max_shutdown_time Maximum module shutdown time (0 — disables the limit). If the workflow of the module did not have time to complete its work within the specified time, then upon completion of the wait, it will be forcibly stopped (terminated). It is unacceptable to set the value to less than 30 seconds. (a lower value other than zero will not be used by the program).

You should not set this limit if you do not know exactly what you are doing, because premature forced shutdown of the module workflow can lead to various problems (database corruption, incomplete logging, etc.).

It is permissible to use the following notation: s — seconds, m — minutes, h — hours, d — days (s — seconds are applied to numbers without notation).
probation The time of checking the module's operability (trial period). The countdown starts from the moment the module workflow is successfully started.

If, during the trial period, the module workflow unexpectedly terminated its work, it will not be automatically restarted and the module will enter the "Error" state, waiting for additional actions from the user (for example, correcting configuration files). The "Error" status will also be set if the process being started could not start at the system level.

The value 0 completely disables the trial period, in case of an unexpected shutdown, the process will always restart automatically, in case of a cyclic failure — indefinitely. It is not recommended to set the value to 0 or to set the verification period too short (less than 30 seconds).

It is permissible to use the following notation: s — seconds, m — minutes, h — hours, d — days (s — seconds are applied to numbers without notation).
silent_mode Quiet operation mode (on/off). Pop-up error messages generated by the Windows Error Reporting service or the module itself are not displayed in this mode. Disable this mode only when you need to deal with problems in the module, the rest of the time it should be constantly on.
terminal_codepage Encoding of the console when working with the module environment. You can use the value system, in this case the system encoding will be used.

If you set an empty value or do not set it at all, then the encoding in the console will not change when the module environment or its SHELL shell is activated (the current active encoding is used).
time_zone Time zone (time zone). As the value of this parameter, you must specify the time zone in the Etc/GMT format (for example: Etc/GMT-3). You can use the value system, in this case the system time zone will be used.

Attention! The Etc/GMT format differs from UTC in reverse order, for example: Etc/GMT-3=UTC/GMT+3=UTC+03:00=Europe/Moscow.

Section [environment]

The section contains global module environment variables.

For any module, these variables can be redefined/deleted in its settings file .\config\<module_name>\<profile_name>\settings.ini.

To remove a variable from the environment, set an empty value or use a special filter (see allowed_env_vars).

The following template variables are available:

Variable Description
{root_dir} The root directory of the program (full path)
{root_drive} Root directory disk
{root_path} The path to the root directory of the program
{terminal_codepage} Console encoding (see terminal_codepage)
{time_zone} Time zone in Etc/GMT format (see time_zone)

In addition to template variables, you can use any Windows environment variables, for example: %SYSTEMDRIVE%, %USERNAME%, %PATH%, etc.

Section values set "by default":

[environment]

CURL_CA_BUNDLE = {root_dir}\data\ssl\cacert.pem
HOMEDRIVE      = {root_drive}
HOMEPATH       = {root_path}\user
PATH           = {root_dir}\bin;%SYSTEMROOT%\system32;%SYSTEMROOT%;%SYSTEMROOT%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0
TEMP           = {root_dir}\temp
TMP            = {root_dir}\temp

Setting up domains

Domains and their settings are set in the file .\config\domains.ini. To create a domain, add a new section with the domain name and its settings to this file. To apply the changes, you need to restart the program or PHP module that you specified in the domain settings, and, if necessary, clear the DNS cache in the browser.

Section [domain_name]

The section contains the main project settings, all parameters of this section are optional. Internationalized domain names must be specified exclusively in Punycode format. It is forbidden to specify an IP address as a domain name, and if you need direct access to the domain by IP, then the IP address can be specified as an alias (see aliases).

Parameter Description
aliases Domain aliases (separated by a space). If an alias does not contain a dot ., then it is considered a subdomain and will be supplemented with a domain name, for example: www->www.test.local. You can also specify other domains as an alias, for example, when you need to use the old domain after moving the site to a new one.

Default value: www
auto_configure Enabling/disabling automatic domain configuration. If disabled, the configuration of this domain for the Apache server will not be created automatically, you need to add virtual host yourself in the Apache configuration template. The necessary entries in the HOSTS file are always made, regardless of the value of this option.

Default value: on
enabled Enabling/disabling domain usage

Default value: on
engine PHP module. The specified engine will be used to process all PHP files of this domain. If the PHP module is not specified or does not exist (not installed), then such a domain is ignored.

Default value: (empty)
ip IP address of the domain. You can specify multiple IP (separated by a space) and IP in IPv6 format. If you specify multiple IP addresses, then when updating the HOSTS file the domain will be assigned the first specified IP.

You can use the value auto, in this case the IP address from the main settings of the PHP module that is assigned to this domain will be used.

Default value: auto
log_format Logging format

Default value: combined
cgi_dir Directory for CGI and Perl scripts. Template variables can be used.

Default value: {root_dir}\home\{host}\cgi-bin
public_dir The domain's public directory. Template variables can be used.

Default value: {root_dir}\home\{host}\public_html
ssl Enabling/disabling the use of SSL. If SSL is disabled, then working with the domain over HTTPS will be impossible.

Default value: auto
ssl_auto_cert Automatic generation and use of SSL certificate files. The value of the option is always off if it is not enabled in the settings of the module that is assigned to the domain as an engine (see engine). The domain itself, all its aliases and IP addresses are registered in the certificate. If you missed importing the ROOT certificate during the installation of the Open Server Panel, or if the ROOT certificate was lost (deleted), then run the osp cacert init command in the Open Server Panel console.

If your browser does not use the Windows Certificate Store (for example, Firefox browser), then you need to import it into the browser yourself (for Firefox: Settings->Certificates->View certificates...-> "Certificate Authorities" tab->Import...) the root certificate of the program: data\ssl\root\cert.crt. Do not forget to do a similar import after each re-creation of the root certificate with the command osp cacert init.

Default value: on
ssl_cert_file Certificate file. Template variables can be used.

Default value if the ssl_auto_cert option is enabled: {root_dir}\data\ssl\domains\{host}\cert.crt

Default value if the ssl_auto_cert option is disabled: {root_dir}\user\ssl\default\cert.crt
ssl_key_file Key file. Template variables can be used.

Default value if the ssl_auto_cert option is enabled: {root_dir}\data\ssl\domains\{host}\cert.key

Default value if the ssl_auto_cert option is disabled: {root_dir}\user\ssl\default\cert.key
project_add_commands An additional set of commands executed when activating the project environment. Usually this option is not set (empty) or is equal to cd .. (to clarify the working directory of the project). The encoding is "default" during command execution = 65001 (UTF-8), it can be changed with the command chcp <ENCODING>.

Important! To call subroutines, be sure to use call!

Example of incorrect command: cd .. & {root_dir}\home\{host}\test.bat
Example of a correct command: cd .. & call {root_dir}\home\{host}\test.bat

Default value: (empty)
project_add_modules Enumeration of additional modules that are used by the project (separated by a space). These modules are attached to the project environment when it is activated by the command osp project <DOMAIN>.

Default value: (empty)
project_home_dir The root directory of the project. If the parameter is omitted, the value of the public_dir option is used.

Default value: (empty)
project_use_sys_env Enabling/disabling the use of the Windows environment for the project.

Default value: off
terminal_codepage The encoding of the console when working with the project environment (for example, 65001 or 1251). If the parameter is not specified, the encoding specified for the PHP module environment will be used, or, if additional modules are specified for the project, the last activated module from the project_modules list. If the encoding is specified, it is activated AFTER executing all service commands, including project_command.

Default value: (empty)

The following template variables are available:

Variable Description
{host} Domain name
{root_dir} The root directory of the program (full path)
{root_drive} Root directory disk
{root_path} The path to the root directory of the program

Menu Settings

Using the program menu, you can perform some of the basic settings (selecting the PHP version, selecting a profile, etc.) and commands (restarting modules, launching shell, etc.).

ℹ️ Attention! Along with changing the current PHP version of the domain or the current settings profile of the module, the affected modules are automatically initialized or restarted using the menu! Keep this in mind if any long-term operation is being performed on the server at the time of changing the settings.

The menu configuration is located in the file .\config\menu.ini, you can also create additional menu items there. To create a new menu item, add a new section with the name of the item and its settings to this file. To apply the changes, you need to restart the program.

Section [menu_item_name]

The section contains the main settings of the menu item, all the parameters of this section are optional. You can use language constants in the section name, for example: {lang_xxx}, and specify a path with a nesting level of no more than two, for example: My Bookmarks\Work\menu_item_name. If the path is not specified in the section name, a new item will be created at the root of the menu.

You can also use special values in the section name: domains, modules, domains\domain_name or modules\module_name. In the first case, a new item will be added to the menu of actions on domains or modules, and in the second there, but only for a specific domain or module.

Parameter Description
command The command that will be executed when this menu item is selected.

If the command is not specified, the menu item will be ignored.

Default value: (empty)
enabled Display this menu item or not.

Default value: on
hide Hide the window of the called application.

The option affects only the called subroutine and does not affect new processes created by the called subroutine in any way.

The option does not work when the value for command is not set or is a web link.

Default value: off
hr_after Horizontal separator under the menu item.

Default value: off
hr_before Horizontal separator in front of the menu item.

Default value: off
need_active_state Show this menu item only when the module indicated in the parent menu item or used as a domain engine is in the active state, i.e. enabled. This option only works when the section name starts with domains, modules, domains\domain_name or modules\module_name.

Default value: off
need_active_type Show the menu item for modules of the active type only (with the possibility of launching).

Default value: off
need_inactive_state Show this menu item only when the module indicated in the parent menu item or used as a domain engine is in an inactive state, i.e. turned off. This option only works when the section name starts with domains, modules, domains\domain_name or modules\module_name.

Default value: off
need_module_class Show the menu item only for those modules that correspond to the specified class. This option only works when the section name starts with modules or modules\module_name.

Default value: (empty)
need_module_category Show the menu item only for those modules that correspond to the specified category. This option only works when the section name starts with modules or modules\module_name.

Default value: (empty)
need_module_shell Show this menu item only when the module designated in the parent menu item or used as a domain engine has the ability to launch its shell/cli shell. This option only works when the section name starts with modules or modules\module_name.

Default value: off
work_directory The working directory where the command will be executed (see command).

Attention! When executing some commands (osp project ... etc.) the current directory may change, i.e. it does not match the directory specified in work_directory.

Default value: {root_dir}

The following template variables are available for the command and work_directory parameters:

Variable Description
{root_dir} The root directory of the program (full path)
{root_drive} Root directory disk
{root_path} The path to the root directory of the program
{web_panel_url} URL of the web interface
{default_browser} The path to the "default browser" executable file (if it is set in the system settings)
Special variables Available only when the section name starts with domains or domains\domain_name
{cgi_dir} Domain directory for CGI and Perl scripts
{engine} Domain PHP module
{host} Domain name (Punycode format is used for internationalized domains)
{host_decoded} Domain display name (Punycode format is not used for internationalized domains)
{project_home_dir} The root directory of the project
{public_dir} Domain public directory
Special variables Available only when the section name starts with modules or modules\module_name
{module_name} Module name
{profile_name} Name of the current module settings profile

In addition to template variables for the command and work_directory parameters you can use any Windows environment variables, for example: %COMSPEC%, %SYSTEMDRIVE%, %USERNAME%, %PATH% и т.д.

Usage examples

[domains\Open in PHPStrom]

command              = "%COMSPEC%" /c "osp project {host} & start "" "C:\Program Files\JetBrains\PhpStorm 2018.2\bin\phpstorm64.exe" "{project_home_dir}""
hide                 = on

[My Bookmarks\Search\Google]

command              = "{default_browser}" https://google.com

Options: /c — run Command and then terminate, /k — run Command and then remain open, at the CMD prompt.

Configuring Modules

The settings of any of the modules in the Open Server Panel are set in the file .\config\<module name>\<profile name>\settings.ini. By default, the Default profile is used. The name of the working profile is set via the program control panel.

A backup copy of the original settings and the original configuration files of the module is stored in the directory .\modules\<module_name>\ospanel_data\default and in the future will be used in the control panel for the function of restoring the original configuration.

You can create additional module settings profiles yourself. To create a new profile, for example MyProfile, it is enough to create a copy of any existing profile of the selected module, for example by copying the directory of the original profile .\config\<module_name>\Default to .\config\<module_name>\MyProfile. If the module works with data in the .\data directory, then you will need to create a directory with data for the new profile, for example by copying the directory of the original profile .\data\<module_name>\Default to .\data\<module_name>\MyProfile. Instead of copying an existing profile, you can also use the original module settings and data storage (.\modules\<module_name>\ospanel_data\default and.\modules\<module_name>\ospanel_data\default_data respectively).

ℹ️ Attention! To apply the changes, the module must be restarted/reinitialized.

⚠️ Warning! Do not edit the module's basic settings file .\config\<module_name>\module.ini. The process of working with it is fully automated and does not require user intervention.

Section [main]

The section contains the basic settings of the module, all parameters of this section are optional.

Parameter Description
ip IP address of the module. You can specify multiple IP (separated by a space) and IP in IPv6 format in cases when the module supports it. If you specify multiple IP addresses, then when updating the HOSTS file the first specified IP will be used as the IP for the module name. The IP setting is ignored for DNS modules.
port Module port. The port setting is ignored for modules of the Web Server and DNS classes.
clean_directories Directories to be cleaned before starting the module (separated by a space). For example: cache, temporary files, and the like. Template variables can be used.
log_directory A directory for storing the module's own logs. If the directory does not exist, it will be created during the module startup. Template variables can be used.
log_level_values Available logging levels (takes different values and is not supported by all modules)
log_level Logging level (must be equal to any value from log_level_values)
query_log_values Available query logging levels (takes different values and is not supported by all modules)
query_log_level Query logging level (must be equal to any value from query_log_values)
shell_command The command to launch the SHELL shell or the CLI interface of the module. Template variables can be used.
ssl_auto_cert Automatic generation and use of SSL certificate files. The value of the option is always off if no IP address is set for the module. The domain and IP address(s) of the module are registered in the certificate.

If your browser does not use the Windows Certificate Store (for example, Firefox browser), then you need to import it into the browser yourself (for Firefox: Settings->Certificates->View certificates...-> "Certificate Authorities" tab->Import...) the root certificate of the program: data\ssl\root\cert.crt. Do not forget to do a similar import after each re-creation of the root certificate with the command osp cacert init.

Important! If this option is disabled, you will need to reconfigure the module configs yourself (disable SSL or specify your keys and certificates), otherwise the module may stop running or work correctly.
start_command The command to start the module. Template variables can be used.
start_directory The module startup directory (the directory must exist). Template variables can be used.
work_directories Directories required for the module to work (separated by a space). If the directory does not exist, it will be created during the module startup. Template variables can be used.
allowed_env_vars List of Windows environment variables (separated by a space) transmitted to the module environment. The white list of variables is necessary to filter the working environment of modules from the environment of similar software installed in the system.

Make changes to this list only if you know exactly what you are doing, because this may disrupt the normal operation of the modules.

You can use the value auto, in this case the global value from the main program settings will be used.
log_max_filesize Maximum log size (0 — disables the limit). If the size of any log exceeds the specified one, its log file will be recreated when the module is started again.

You can use the value auto, in this case the global value from the main program settings will be used.

The following designations are acceptable: B — bytes, K — kilobytes, M — megabytes, G — gigabytes, T — terabytes. To force the logs to be cleared at each start, set the value to 1 (B bytes are applied to numbers without symbols).
log_write_title Add a header to the module log at each startup (on/off). It is useful for visual differentiation of work sessions if automatic clearing of the module log is not used.

You can use the value auto, in this case the global value from the main program settings will be used.
max_probation_fails The maximum number of consecutive (consecutive) failures of the trial period, after which the module will enter the "Error" state (see probation).

You can use the value auto, in this case the global value from the main program settings will be used.
max_shutdown_time Maximum module shutdown time (0 — disables the limit). If the workflow of the module did not have time to complete its work within the specified time, then upon completion of the wait, it will be forcibly stopped (terminated). It is unacceptable to set the value to less than 30 seconds. (a lower value other than zero will not be used by the program).

You should not set this limit if you do not know exactly what you are doing, because premature forced shutdown of the module workflow can lead to various problems (database corruption, incomplete logging, etc.).

You can use the value auto, in this case the global value from the main program settings will be used.

It is permissible to use the following notation: s — seconds, m — minutes, h — hours, d — days (s — seconds are applied to numbers without notation).
probation The time of checking the module's operability (trial period). The countdown starts from the moment the module workflow is successfully started.

If, during the trial period, the module workflow unexpectedly terminated its work, it will not be automatically restarted and the module will enter the "Error" state, waiting for additional actions from the user (for example, correcting configuration files). The "Error" status will also be set if the process being started could not start at the system level.

The value 0 completely disables the trial period, in case of an unexpected shutdown, the process will always restart automatically, in case of a cyclic failure — indefinitely. It is not recommended to set the value to 0 or to set the verification period too short (less than 30 seconds).

You can use the value auto, in this case the global value from the main program settings will be used.

It is permissible to use the following notation: s — seconds, m — minutes, h — hours, d — days (s — seconds are applied to numbers without notation).
silent_mode Quiet operation mode (on/off). Pop-up error messages generated by the Windows Error Reporting service or the module itself are not displayed in this mode. Disable this mode only when you need to deal with problems in the module, the rest of the time it should be constantly on.

You can use the value auto, in this case the global value from the main program settings will be used.
terminal_codepage Encoding of the console when working with the module environment. You can use special values system (system encoding) or auto (global value from the main program settings).

If you set an empty value or do not set it at all, then the encoding in the console will not change when the module environment or its SHELL shell is activated (the current active encoding is used).
time_zone Time zone (time zone). As the value of this parameter, you must specify the time zone in the Etc/GMT format (for example: Etc/GMT-3). You can use special values system (system time zone) or auto (global value from the main program settings).

Attention! The Etc/GMT format differs from UTC in reverse order, for example: Etc/GMT-3=UTC/GMT+3=UTC+03:00=Europe/Moscow.

The following template variables are available:

Variable Description
{module_name} Module name
{profile_name} Name of the current module settings profile
{root_dir} The root directory of the program (full path)
{root_drive} Root directory disk
{root_path} The path to the root directory of the program

The following template variables are also available for the cmd and shell parameters of the [main] section (if the parameters of the same name are set in the same section):

Variable Description
{ip} IP address(s) of the module
{port} Module port
{log_level} Logging level
{query_log_level} Request logging level
{terminal_codepage} Console encoding
{time_zone} Time zone in Etc/GMT format

In addition to template variables, you can use any Windows environment variables, for example: %SYSTEMDRIVE%, %USERNAME%, %PATH%, etc.

Section [environment]

The section is used to set/redefine module environment variables (supported variables depend on the module). To remove a variable from the environment, set an empty value.

The following template variables are available:

Variable Description
{module_name} Module name
{profile_name} Name of the current module settings profile
{root_dir} The root directory of the program (full path)
{root_drive} Root directory disk
{root_path} The path to the root directory of the program

The following template variables are also available if the parameters of the same name are set in the [main] section:

Variable Description
{ip} IP address(s) of the module
{port} Module port
{log_level} Logging level
{query_log_level} Request logging level
{terminal_codepage} Console encoding
{time_zone} Time zone in Etc/GMT format

In addition to template variables, you can use any Windows environment variables, for example: %SYSTEMDRIVE%, %USERNAME%, %PATH%, etc.

Section [file_name]

Sections of this type describe working with templates of configuration files and with templates of other service files of the module (the number of sections is not limited). The templates are located in the directory .\config\<module_name>\<profile_name>\templates. During the initialization of the module, the templates described in such sections are converted into temporary working files that are necessary for the module to work.

Parameter Required Description
comment yes A comment character to use in the configuration file.
destination yes Destination file. This is a temporary file, it is recreated every time the module is initialized and cannot be edited.
enabled no Enabling/disabling the use of this configuration file. Set the value to off if this file is temporarily not required for the module to work (by silence on).
encoding no Encoding of the configuration file (by default UTF8).
Valid values are UTF8, ANSI, ASCII.
path_separator yes The separator character used in the names of paths to the necessary resources.
source_dir no Directory to search for the source template file. If the directory is not specified (by default), then the template file is searched in the .\config\<module_name>\<profile_name>\templates directory.

The following template variables are available:

Variable Description
{module_name} Module name
{profile_name} Name of the current module settings profile
{root_dir} The root directory of the program (full path)
{root_drive} Root directory disk
{root_path} The path to the root directory of the program

In addition to template variables, you can use any Windows environment variables, for example: %SYSTEMDRIVE%, %USERNAME%, %PATH%, etc.

In the source code of template files described in similar sections, you can use the following template variables:

Variable Description
{module_name} Module name
{profile_name} Name of the current module settings profile
{root_dir} The root directory of the program (full path)
{root_drive} Root directory disk
{root_path} The path to the root directory of the program
Special variables Available only if specified in the [main] section of the module settings file
{ip} IP address(s) of the module
{port} Module port
{log_level} Logging level
{query_log_level} Request logging level
{shell_command} Command to run shell/cli module shell
{terminal_codepage} Console encoding
{time_zone} Time zone in Etc/GMT format
Service variables Only for module writing specialists
{active_modules_list} List of available active modules (separated by a colon)
{api_domain} API domain
{cmd_api_url} URL for accessing the API via the command line interface
{environment} Module environment generation block (Batch script format)
{lang_N} A text string with the number (N) from the language file (currently used language)
{modules_list} List of available modules (separated by a colon)
{osp_version} Program version
{osp_version_datetime} Release date of the version (compilation date)
{passive_modules_list} List of available passive modules (separated by a colon)
{web_api_url} URL for accessing the API via the web interface
{web_panel_url} URL of the web interface
{windows_environment} Windows environment (original, formed at the time of the program launch)

Working with modules

By default, no modules are enabled. Before you start working with the Open Server Panel, make sure that you have enabled the modules you need.

All modules are configured to use only local IP addresses (except Bind and Unbound), standard ports for them and standard logins, passwords or any restrictions are not used by default. You can always change these settings yourself at your discretion.

ℹ️ Attention! It is not possible to run PostgreSQL modules with account Control (UAC) disabled or with Administrator rights!

⚠️ Warning! Do not run Open Server Panel on public IP without additional protection and prior careful configuration, this is extremely dangerous and can lead to unauthorized access to your computer, up to full control over the system and loss of all files.

Be sure to set strong passwords for all users (if the module has such an opportunity) and configure remote access rights before you launch any module on a public IP (if you plan to).

Types of modules

The Open Server Panel includes active (startup) and passive (non-startup) modules. Passive modules (Perl) are used as add-ons for active modules or for the working environment in the console.

Any modules can be turned on in parallel and do not interfere with each other's work in any way. Each module has its own Windows-isolated environment and does not conflict with other similar software on your system. In parallel, even modules of the same type can be enabled, for example: MySQL-5.5 and MySQL-8.0.

Initialization

When the program starts, all available modules are initialized, during which their configuration is read and checked, temporary files are created and data is written to the HOSTS file. Thus, you can always use the console utilities and commands of the module, regardless of whether it is enabled now or not, but do not forget that some utilities and commands may not work when the module is turned off. This can be useful if you need to repair databases, update the data warehouse before starting the module, check the temporary configuration file for correctness, as well as in many other situations.

%%{init: {'theme':'forest'}}%%
graph TD;

      A(Launching<br>the Open Server Panel)-->B(Initializing the module);
      B-->|"&nbsp;Failure&nbsp;"| C(Status<br>'Error');
      B-->|"&nbsp;Success&nbsp;"| D(Determining the module type);
      D-->|"&nbsp;Passive module&nbsp;"| E(Status<br>'Initialized');
      D-->|"&nbsp;Active module&nbsp;"| F(Status<br>'Disabled');
      F-->|"&nbsp;If enabled&nbsp;"| G(Launching);
      G-->|"&nbsp;Failure&nbsp;"| C;
      G-->|"&nbsp;Success&nbsp;"| H(Status<br>'Enabled');
      H-->|"&nbsp;If the process died&nbsp;<br>&nbsp;during the probation period&nbsp;"| C;
      H-->|"&nbsp;If the process has died&nbsp;"| G;

Connecting

To connect to modules from PHP scripts and any third-party software, use the standard port of the module and the name of the module itself as the address (host, server), examples:

Connecting to MySQL-5.7

Host: MySQL-5.7 (the hostname can be used in any case, for example: mysql-5.7 or mysql-5.7.local)
Port: 3306
Username: root
Password: (empty)

Connecting to PostgreSQL-12

Host: PostgreSQL-12
Port: 5432
Username: postgres
Password: (empty)

Connecting to MongoDB-4.4

Host: MongoDB-4.4
Port: 27017
Username: (empty)
Password: (empty)

Connecting to Redis-5.0

Host: Redis-5.0
Port: 6379

etc...

For those scripts and software that check the correctness of the domain name, you can use the domain zone as the connection address.local, for example: MySQL-5.7.local.

Working in the console

All modules in the Open Server Panel have pre-configured environment variables, as well as the ability to quickly launch the shell/cli, if any. To launch the shell/cli of a module (if available), it is not necessary to activate or attach its environment, it is enough to use the command osp shell ....

To switch between web projects in the console, it is enough to use the command osp project ..., which immediately activates the project environment (PHP domain module + modules specified in the variable project_add_modules) and performs a transition to its root directory.

PHP modules are combined, they combine Apache and PHP, and also use the Perl module environment, so when activating the environment of any PHP module, Apache and Perl utilities will also be available to you.

When working with the console, the current environment is always displayed in the window title (or in the tab name), for example: PHP-8.0 + MySQL-5.7 | Open Server Panel. Modules of different types can be easily combined into one common environment with the command osp add .... When combining among modules and matching variable names in such a combined environment, the value of the variable of the module that is connected last becomes final (except for the PATH variable, whose values are combined).

Example of enabling multiple modules:

osp on PHP-7.4
osp on MySQL-5.7
osp on Redis-7.0

Example of a combination of environments of these modules without isolation from Windows (not recommended method):

osp reset
osp add PHP-7.4
osp add MySQL-5.7
osp add Redis-7.0

Example of a combination of environments of these modules with complete isolation from Windows (recommended method):

osp use PHP-7.4
osp add MySQL-5.7
osp add Redis-7.0

You will get something like this output to the console:

PHP-7.4: The module workflow has been successfully launched
MySQL-5.7: The module workflow has been successfully launched
Redis-7.0: The module workflow has been successfully launched
Current environment: PHP-7.4
Current environment: PHP-7.4 + MySQL-5.7
Current environment: PHP-7.4 + MySQL-5.7 + Redis-7.0

The current environment will allow you to simultaneously work with PHP-7.4, Apache-2.4 and Perl (since PHP is a combined module), as well as with MySQL—5.7 and Redis-7.0, for example:

php -v
httpd -V
perl -v
mysql -V
redis-cli -v

Working with Composer

Composer is installed and available "out of the box", no configuration is required. To work with Composer in the console, it is enough to activate the environment of any PHP module. It is worth considering that each PHP module has its own version of Composer and a separate home directory for Composer.

Example of installing Zephyr in PHP 7.4 using Composer:

In the php.ini PHP 7.4 template .\config\PHP-7.4\default\templates\php.ini, we uncomment the zephir_parser extension and save the changes. Then all actions are performed in the console (Menu->Command Line Interface).

osp restart php-7.4
osp use php-7.4
cd %COMPOSER_HOME%
composer require phalcon/zephir
zephir help

How to create modules

Before creating your first module, let's look at its intended structure. The minimum file structure of any module looks like this:

.
├── data
│   └── <имя_модуля>              # Module data storage (optional directory)
└── modules
    └── <имя_модуля>              # The main directory of the module
        └── ospanel_data          # Service files (source files of settings and configs)
            ├── default           # Directory of the initial profile (source)
            │   ├── settings.ini  # Module settings file
            │   └── templates     # Directory for placing templates
            ├── default_data      # Directory with initial profile data (if required)
            ├── module.dat        # Descriptive module file
            └── lang              # Directory for placing language files (English.ini, Russian.ini, etc.)

Now you can create your own module using the above example directory structure.

Language files can be placed in the directory .\modules\<new_module_name>\ospanel_data\lang and should contain only module constants in the [main] section. If your module will include language files, be sure to use a unique prefix in the name of all constants inside such files, for example: mymod_....

The settings file settings.ini must be created in the directory .\modules\<new_module_name>\ospanel_data\default, and the configuration file templates must be placed in the directory .\modules\<new_module_name>\ospanel_data\default\templates. Place the initial data, if any (for example databases), in the directory .\modules\<new_module_name>\ospanel_data\default_data.

⚠️ Warning! Never use directories .\modules\<new_module_name>\ospanel_data\default and .\modules\<new_module_name>\ospanel_data\default_data for everyday work, because it won't have any effect. These directories are the repository of the original profile and are no longer used by the program. In the future, they will be used to restore the original profile when resetting the module settings.

You also need to create and fill in a descriptive module file .\modules\<new_module_name>\ospanel_data\module.dat. The file format is similar to the format of .ini files, in it you need to create a section [main] with the following parameters:

Variable Description
architecture Module architecture: x64 or x86
category Module category (you can use categories of other modules or come up with your own)
class Module class (you can use classes of other modules or come up with your own)
ipv6_support IPv6 support: yes or no
ip_separator The sign of the IP address separator in the module configs (if multiple IP addresses are supported)
license Link to the module license
license_type Module license designation
min_windows_ver The minimum version of Windows supported by the module (see the list of versions below)
timestamp Timestamp of the release date/time of this version of the module
version Module version

When filling in the value of the variable min_windows_ver, follow the following table:

Version number Traditional designation
6.1.7601 Windows 7 SP1
6.2.9200 Windows 8
6.3.9600 Windows 8.1
10.0.10240 Windows 10 1507
10.0.10586 Windows 10 1511
10.0.14393 Windows 10 1607
10.0.15063 Windows 10 1703
10.0.16299 Windows 10 1709
10.0.17134 Windows 10 1803
10.0.17763 Windows 10 1809
10.0.18362 Windows 10 1903
10.0.18363 Windows 10 1909
10.0.19041 Windows 10 2004
10.0.19042 Windows 10 20H2
10.0.19043 Windows 10 21H1
10.0.19044 Windows 10 21H2
10.0.19045 Windows 10 22H2
10.0.22000 Windows 11 21H2
10.0.22621 Windows 11 22H2

When everything is ready, create the .\config\<new_module_name>\default directory and copy the contents of the .\modules\<new_module_name>\ospanel_data\default directory there. If your module has initial data, then create the .\data\<new_module_name>\default directory and copy the contents of the .\modules\<new_module_name>\ospanel_data\default_data directory there. Now you can restart the program so that it sees the module you created.

Third-party extensions

We have added 117 PHP extensions and 14 Apache extensions from third-party developers to the distribution. All these extensions are disabled by default, to activate the extension, it is enough to comment it out in the PHP configuration template and restart the PHP module.

PHPINFO: PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 | PHP 8.0 | PHP 8.1 | PHP 8.2 | PHP 8.3

If an extension is not available for a certain version of PHP, it means that the extension developers either do not distribute, or have not developed, or have not compiled the windows version of the extension for this version of PHP.

Compatibility of PHP extensions

⚠️ Warning! Do not change the order of connection of extensions in the PHP configuration template. Extensions are connected in the order of dependence on each other and may not work if the order of their activation is changed.

Extension Dependence Incompatibility
blackfire opcache, opencensus, pcov, xdebug, xhprof
crypto openssl
ev openssl, sockets
event openssl, sockets
exif mbstring
http curl, intl, propro, psr, raphf, sockets
http_message psr
libevent sockets
mailparse mbstring
memcached igbinare
oauth curl
opcache blackfire
When activating xdebug or pcov, Jit compilation is disabled!
opencensus blackfire, pcov, xdebug, xhprof
pcov blackfire, opencensus, xdebug, xhprof
phalcon curl, fileinfo, gd2, gettext,
imagick, mbstring, openssl, pdo
rdkafka simple_kafka_client
redis igbinary
simple_kafka_client rdkafka
solr curl
ssh2 openssl
stomp openssl
xdebug blackfire, opencensus, pcov, xhprof
xhprof blackfire, opencensus, pcov, xdebug
yac Simultaneous activation in several PHP modules is unacceptable!
yar curl

Apache extensions

Extension Apache
2.4.41 VC14
PHP
7.1.33 VС14 TS
Apache
2.4.54 VC15
PHP
7.2.34 VС15 TS
Apache
2.4.54 VC15
PHP
7.3.33 VС15 TS
Apache
2.4.54 VC15
PHP
7.4.33 VС15 TS
Apache
2.4.58 VS17
PHP
8.0.30 VS16 TS
Apache
2.4.58 VS17
PHP
8.1.27 VS16 TS
Apache
2.4.58 VS17
PHP
8.2.14 VS16 TS
Apache
2.4.58 VS17
PHP
8.3.1 VS16 TS
mod_antiloris 0.6.0 0.6.0 0.6.0 0.6.0 0.6.0 0.6.0 0.6.0 0.6.0
mod_apreq2 2.15 2.16 2.16 2.16 2.16 2.16 2.16 2.16
mod_authn_ntlm 1.0.8 1.0.8 1.0.8 1.0.8 1.0.8 1.0.8 1.0.8 1.0.8
mod_fcgid 2.3.9 2.3.10 2.3.10 2.3.10 2.3.10 2.3.10 2.3.10 2.3.10
mod_jk 1.2.42 1.2.46 1.2.46 1.2.46 1.2.48 1.2.48 1.2.48 1.2.48
mod_limitipconn 0.24 0.24 0.24 0.24 0.24 0.24 0.24 0.24
mod_log_dbd 1.0.6 1.0.6 1.0.6 1.0.6 1.0.6 1.0.6 1.0.6 1.0.6
mod_log_rotate 1.00a 1.00a 1.00a 1.00a 1.0.2 1.0.2 1.0.2 1.0.2
mod_maxminddb 1.1.0 1.1.0 1.1.0 1.2.0 1.2.0 1.2.0 1.2.0
mod_perl 2.0.11 2.0.12 2.0.12 2.0.12 2.0.12 2.0.12 2.0.12 2.0.12
mod_vhost_dbd 1.0.6 1.0.6 1.0.6 1.0.6 1.0.6 1.0.6 1.0.6 1.0.6
mod_view 2.2 2.2 2.2 2.2 2.2 2.2 2.2 2.2
mod_watch 4.3P 4.3P 4.3P 4.3P 4.3P 4.3P 4.3P 4.3P
mod_xsendfile 1.0-P1 1.0-P1 1.0-P1 1.0-P1 1.0-P1 1.0-P1 1.0-P1 1.0-P1
Clone this wiki locally