### Xdebug Configuration Output Example Source: https://serverpilot.io/docs/guides/php/extensions/xdebug Example output showing Xdebug configuration and enabled features after successful installation. ```text /etc/phpX.Y-sp/conf.d/xdebug.ini, xdebug Support Xdebug on Patreon, GitHub, or as a business: https://xdebug.org/support Enabled Features (through 'xdebug.mode' setting) 'xdebug://gateway' pseudo-host support => yes 'xdebug://nameserver' pseudo-host support => yes xdebug.auto_trace => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3) xdebug.cli_color => 0 => 0 xdebug.client_discovery_header => HTTP_X_FORWARDED_FOR,REMOTE_ADDR => HTTP_X_FORWARDED_FOR,REMOTE_ADDR xdebug.client_host => localhost => localhost xdebug.client_port => 9003 => 9003 xdebug.cloud_id => no value => no value ... ``` -------------------------------- ### Install and Start MongoDB Service Source: https://serverpilot.io/docs/guides/servers/packages/mongodb Updates package lists, installs the MongoDB package, and enables/starts the MongoDB service. ```bash apt-get update apt-get install -y mongodb-org systemctl daemon-reload systemctl enable mongod systemctl start mongod ``` -------------------------------- ### Example Apache Access Log Entry Source: https://serverpilot.io/docs/logs/apache/access An example of a single log entry, illustrating the format described previously. This entry shows a GET request with a 200 OK response. ```text 80.82.77.202 - - [06/Mar/2025:10:10:31 -0500] "GET / HTTP/1.0" 200 3403 ``` -------------------------------- ### Install AutoMySQLBackup Source: https://serverpilot.io/docs/guides/mysql/automysqlbackup Install the AutoMySQLBackup package using apt-get. This command should be run as the root user. ```bash sudo apt-get install automysqlbackup ``` -------------------------------- ### Start a Server Instance Source: https://serverpilot.io/docs/providers/google-cloud/resize Start the specified server instance after its machine type has been updated. ```bash gcloud compute instances start "${INSTANCE_NAME}" ``` -------------------------------- ### Example Redis Extension Output Source: https://serverpilot.io/docs/guides/php/extensions/redis Shows example output when the Redis extension is successfully enabled and detected by PHP. ```text /etc/php8.5-sp/conf.d/redis.ini, redis redis.arrays.algorithm => no value => no value redis.arrays.auth => no value => no value redis.arrays.autorehash => 0 => 0 redis.arrays.connecttimeout => 0 => 0 ... ``` -------------------------------- ### Install ImageMagick Source: https://serverpilot.io/docs/guides/servers/packages/imagemagick Run this command as root to install ImageMagick. This provides utilities like `convert` and `mogrify`. ```bash sudo apt-get install imagemagick ``` -------------------------------- ### Install Available Package Updates Source: https://serverpilot.io/docs/ubuntu/upgrade/2004-to-2204 Install any new or updated packages available from the repositories, including those from the newly added ServerPilot repository. ```bash sudo apt-get -y dist-upgrade ``` -------------------------------- ### Install AMQP Extension Dependencies Source: https://serverpilot.io/docs/guides/php/extensions/amqp Installs libssl-dev and librabbitmq-dev, which are necessary for building the AMQP extension. ```bash sudo apt-get -y install libssl-dev librabbitmq-dev ``` -------------------------------- ### Start App on Boot with Cron Source: https://serverpilot.io/docs/guides/apps/any-language Configure cron's @reboot functionality to automatically start your application's built-in web server when the server reboots. Ensure you are in the app's directory and use the correct command to start your app. ```bash @reboot cd /srv/users/SYSUSER/apps/APPNAME && npm run prod ``` -------------------------------- ### Example Nginx Log Entry Source: https://serverpilot.io/docs/logs/nginx/error An example of a single log entry, illustrating the defined format with sample data. ```text 2025/03/06 18:06:39 [error] 1859207#0: *1379265 log message contents here, client: 203.0.113.0, server: example.com, request: "GET / HTTP/1.1", host: "example.com" ``` -------------------------------- ### Example Nginx Log Entry Source: https://serverpilot.io/docs/logs/nginx/service An example of a single log entry, illustrating the defined format. ```text 2025/03/07 10:27:37 [emerg] 27279#0: unknown directive "example_invalid_directive" in /etc/nginx-sp/nginx.conf:11 ``` -------------------------------- ### Install Redis Server Source: https://serverpilot.io/docs/guides/servers/packages/redis Run this command via SSH as the root user to install the Redis server package. ```bash sudo apt-get install redis-server ``` -------------------------------- ### Example: Set InnoDB Buffer Pool Size to 500MB Source: https://serverpilot.io/docs/guides/mysql/config/innodb-buffer-pool-size This example demonstrates setting the InnoDB buffer pool size to 500 megabytes. ```ini [mysqld] innodb_buffer_pool_size = 500M ``` -------------------------------- ### Install ncdu for Interactive Disk Analysis Source: https://serverpilot.io/docs/guides/servers/disk-space Install the `ncdu` package using `sudo apt-get install ncdu`. This command-line tool provides an interactive interface for analyzing disk space usage. ```bash sudo apt-get install ncdu ``` -------------------------------- ### Install MongoDB GPG Key and Dependencies Source: https://serverpilot.io/docs/guides/servers/packages/mongodb Installs necessary packages and the MongoDB GPG key for repository verification. ```bash apt-get install gnupg curl curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg --dearmor ``` -------------------------------- ### Example: Execute Query in Interactive Shell Source: https://serverpilot.io/docs/guides/mysql/cli Shows an example of executing a COUNT query on the wp_posts table within the MySQL interactive shell. ```sql mysql> SELECT COUNT(*) from wp_posts; +----------+ | COUNT(*) | +----------+ | 6 | +----------+ 1 row in set (0.03 sec) ``` -------------------------------- ### Install a WordPress Theme Source: https://serverpilot.io/docs/guides/apps/wordpress/wp-cli Installs a specified theme using its unique ID. Refer to WP-CLI documentation for available flags. ```bash wp theme install THEME_ID ``` -------------------------------- ### List Available Locales for Installation Source: https://serverpilot.io/docs/guides/servers/locales This command searches the package manager for available language packs that can be installed. ```bash apt-cache search language-pack- | grep -v -E -- '-kde|-base|-gnome' ``` -------------------------------- ### Install Imagick Extension for PHP 7.1 Source: https://serverpilot.io/docs/guides/php/extensions/imagick Installs the Imagick extension for PHP 7.1 using PECL. The 'yes' command automatically answers 'yes' to any prompts during installation. ```bash yes '' | sudo pecl7.1-sp install imagick ``` -------------------------------- ### Example Package Manager Log Entry Source: https://serverpilot.io/docs/logs/package-manager An example log entry showing Linux kernel packages being updated during automated daily updates. ```text Start-Date: 2025-03-06 06:28:47 Commandline: /usr/bin/unattended-upgrade Install: linux-modules-6.8.0-55-generic:amd64 (6.8.0-55.57, automatic), linux-image-6.8.0-55-generic:amd64 (6.8.0-55.57, automatic), linux-headers-6.8.0-55-generic:amd64 (6.8.0-55.57, automatic), linux-tools-6.8.0-55:amd64 (6.8.0-55.57, automatic), linux-tools-6.8.0-55-generic:amd64 (6.8.0-55.57, automatic), linux-headers-6.8.0-55:amd64 (6.8.0-55.57, automatic) Upgrade: linux-tools-common:amd64 (6.8.0-54.56, 6.8.0-55.57), linux-virtual:amd64 (6.8.0-54.56, 6.8.0-55.57), linux-headers-generic:amd64 (6.8.0-54.56, 6.8.0-55.57), linux-image-virtual:amd64 (6.8.0-54.56, 6.8.0-55.57), linux-headers-virtual:amd64 (6.8.0-54.56, 6.8.0-55.57), linux-libc-dev:amd64 (6.8.0-54.56, 6.8.0-55.57) End-Date: 2025-03-06 06:29:06 Start-Date: 2025-03-06 06:29:12 Commandline: /usr/bin/unattended-upgrade Remove: linux-modules-6.8.0-54-generic:amd64 (6.8.0-54.56), linux-image-6.8.0-54-generic:amd64 (6.8.0-54.56) End-Date: 2025-03-06 06:29:14 Start-Date: 2025-03-06 06:29:18 Commandline: /usr/bin/unattended-upgrade Remove: linux-tools-6.8.0-54:amd64 (6.8.0-54.56), linux-tools-6.8.0-54-generic:amd64 (6.8.0-54.56) End-Date: 2025-03-06 06:29:19 Start-Date: 2025-03-06 06:29:23 Commandline: /usr/bin/unattended-upgrade Remove: linux-headers-6.8.0-54-generic:amd64 (6.8.0-54.56), linux-headers-6.8.0-54:amd64 (6.8.0-54.56) End-Date: 2025-03-06 06:29:25 ``` -------------------------------- ### Example SSH Log Entries Source: https://serverpilot.io/docs/logs/ssh These are example log entries showing a successful SSH login using public key authentication. ```text 2025-03-07T15:36:18.567155+00:00 example-server sshd[2491798]: Accepted publickey for root from 203.0.113.0 port 65350 ssh2: RSA SHA256:XaeoOmXzt2fEF67opjDlcTRDUiFksXVXKxCAJSSwzch 2025-03-07T15:36:18.577133+00:00 example-server sshd[2491798]: pam_unix(sshd:session): session opened for user root(uid=0) by root(uid=0) 2025-03-07T15:36:18.630644+00:00 example-server systemd-logind[808]: New session 36872 of user root. ``` -------------------------------- ### Install MongoDB Extension for PHP 7.1 Source: https://serverpilot.io/docs/guides/php/extensions/mongodb Uses PECL to compile and install the MongoDB extension for PHP 7.1. The 'yes' command pre-emptively answers prompts during installation. ```bash yes '' | sudo pecl7.1-sp install mongodb ``` -------------------------------- ### Install Memcached Source: https://serverpilot.io/docs/guides/servers/packages/memcached Run this command via SSH to install Memcached on your server. ```bash sudo apt-get install memcached ``` -------------------------------- ### Example: Use WordPress Database Source: https://serverpilot.io/docs/guides/mysql/cli Demonstrates setting the 'wordpress' database as the active database in the MySQL shell. ```sql mysql> use wordpress; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed ``` -------------------------------- ### Example PHP Access Log Entry Source: https://serverpilot.io/docs/logs/php/access An illustration of a single log entry, showing the values for each field defined in the log format. This example demonstrates a GET request. ```text 203.0.113.0 - [04/Mar/2025:06:52:33 -0500] "GET /index.php" 200 0 - 1955 24792 0.001 2097152 0.00% 0.00% "/blog" ``` -------------------------------- ### Hourly cron schedule example Source: https://serverpilot.io/docs/guides/servers/cron This example demonstrates a basic cron schedule format to run a command once per hour at the beginning of the hour. ```bash @hourly wget -q -O - "http://example.com/cron.php" >>/srv/users/SYSUSER/apps/APPNAME/cron.log 2>&1 ``` -------------------------------- ### Install Imagick Extension for PHP 7.3 Source: https://serverpilot.io/docs/guides/php/extensions/imagick Installs the Imagick extension for PHP 7.3 using PECL. The 'yes' command automatically answers 'yes' to any prompts during installation. ```bash yes '' | sudo pecl7.3-sp install imagick ``` -------------------------------- ### AMQP Extension Configuration Output Source: https://serverpilot.io/docs/guides/php/extensions/amqp Example output showing the configuration details of the AMQP extension when enabled in PHP. ```text Additional .ini files parsed => /etc/phpX.Y-sp/conf.d/amqp.ini, amqp amqp.auto_ack => 0 => 0 amqp.cacert => no value => no value amqp.cert => no value => no value amqp.channel_max => 256 => 256 amqp.connect_timeout => 0 => 0 amqp.deserialization_depth => 128 => 128 amqp.frame_max => 131072 => 131072 amqp.global_prefetch_count => 0 => 0 amqp.global_prefetch_size => 0 => 0 amqp.heartbeat => 0 => 0 amqp.host => localhost => localhost amqp.key => no value => no value amqp.login => guest => guest amqp.password => guest => guest amqp.port => 5672 => 5672 amqp.prefetch_count => 3 => 3 amqp.prefetch_size => 0 => 0 amqp.read_timeout => 0 => 0 amqp.rpc_timeout => 0 => 0 amqp.sasl_method => AMQP_SASL_METHOD_PLAIN => AMQP_SASL_METHOD_PLAIN amqp.serialization_depth => 128 => 128 amqp.timeout => no value => no value amqp.verify => 1 => 1 amqp.vhost => / => / amqp.write_timeout => 0 => 0 ``` -------------------------------- ### Valid RewriteRule Example Source: https://serverpilot.io/docs/guides/apache/htaccess Demonstrates a correctly formatted RewriteRule where the PATH_PATTERN does not start with a '/'. ```apache RewriteRule foo.html bar.html ``` -------------------------------- ### Install Pspell Development Library Source: https://serverpilot.io/docs/guides/php/extensions/pspell Installs the libpspell-dev package, which contains the necessary headers and libraries to build the Pspell extension. ```bash sudo apt-get -y install libpspell-dev ``` -------------------------------- ### Create VM Instance from Snapshot Source: https://serverpilot.io/docs/providers/google-cloud/snapshots Command to create a new VM instance using a specified snapshot as the boot disk source. Ensure all required variables like VM_NAME, MACHINE_TYPE, SNAPSHOT_NAME, and DISK_SIZE are set. ```bash gcloud compute instances create "${VM_NAME}" \ --machine-type="${MACHINE_TYPE}" \ --source-snapshot="${SNAPSHOT_NAME}" \ --boot-disk-size="${DISK_SIZE}" \ --boot-disk-type="pd-balanced" ``` -------------------------------- ### Start FTP Server in Background Source: https://serverpilot.io/docs/guides/ftp/server Starts the Python FTP server script in the background and redirects its output to a log file. Ensure the script path and log file path are correct for your setup. ```bash python3 /srv/users/SYSUSER/ftpserver.py >>/srv/users/SYSUSER/ftpserver.log 2>&1 & ``` ```bash python3 /srv/users/SYSUSER/ftpserver.py >>/srv/users/SYSUSER/ftpserver.log 2>&1 & ``` ```bash python3 /srv/users/SYSUSER/ftpserver.py >>/srv/users/SYSUSER/ftpserver.log 2>&1 & ``` ```bash python /srv/users/SYSUSER/ftpserver.py >>/srv/users/SYSUSER/ftpserver.log 2>&1 & ``` ```bash python /srv/users/SYSUSER/ftpserver.py >>/srv/users/SYSUSER/ftpserver.log 2>&1 & ``` ```bash python /srv/users/SYSUSER/ftpserver.py >>/srv/users/SYSUSER/ftpserver.log 2>&1 & ``` -------------------------------- ### List Installed Locales Source: https://serverpilot.io/docs/guides/servers/locales SSH into your server and run this command to see all currently installed locales. ```bash locale -a ``` -------------------------------- ### Example Output of Verified Extension Source: https://serverpilot.io/docs/guides/php/extensions/mailparse This is an example of the expected output when the mailparse extension is successfully enabled and verified. ```text /etc/phpX.Y-sp/conf.d/mailparse.ini, mailparse mailparse support => enabled mailparse.def_charset => us-ascii => us-ascii ``` -------------------------------- ### Install a WordPress Plugin Source: https://serverpilot.io/docs/guides/apps/wordpress/wp-cli Installs a specified plugin using its unique ID. Refer to WP-CLI documentation for available flags. ```bash wp plugin install PLUGIN_ID ``` -------------------------------- ### Invalid RewriteRule Example Source: https://serverpilot.io/docs/guides/apache/htaccess Illustrates an incorrect RewriteRule format where the PATH_PATTERN starts with a '/', which will prevent it from matching any requests. ```apache RewriteRule /foo.html bar.html ``` -------------------------------- ### Example Ubuntu Package Version Source: https://serverpilot.io/docs/servers/packages/backporting Illustrates the format of an Ubuntu package version number, separating the software version from the release identifier. ```text 3.0.13-0ubuntu3.7 ``` -------------------------------- ### Crontab comment example Source: https://serverpilot.io/docs/guides/servers/cron Lines starting with '#' in a crontab file are comments and are ignored by cron. This shows the typical commented header. ```bash # Edit this file to introduce tasks to be run by cron. # # Each task to run has to be defined through a single line # indicating with different fields when the task will be run # and what command to run for the task ``` -------------------------------- ### Install PHP YAML Extension for PHP 5.6 Source: https://serverpilot.io/docs/guides/php/extensions/yaml Installs the YAML extension for PHP 5.6 using the PECL installer. The 'yes "" |' command automatically confirms any prompts during the installation process. ```bash yes '' | sudo pecl5.6-sp install yaml-1.3.2 ``` -------------------------------- ### Install PHP YAML Extension for PHP 7.0 Source: https://serverpilot.io/docs/guides/php/extensions/yaml Installs the YAML extension for PHP 7.0 using the PECL installer. The 'yes "" |' command automatically confirms any prompts during the installation process. ```bash yes '' | sudo pecl7.0-sp install yaml-1.3.2 ``` -------------------------------- ### Update and Upgrade Packages Source: https://serverpilot.io/docs/ubuntu/upgrade/1404-to-1604 Run this command to ensure your server is ready for the Ubuntu upgrade by applying all available package updates. Do not proceed if this command fails. ```bash sudo apt-get update && sudo apt-get -y dist-upgrade && sudo dpkg --configure -a ``` -------------------------------- ### Display Package Manager Configuration Source: https://serverpilot.io/docs/ubuntu/upgrade/1404-to-1604 Verify that the ServerPilot repository configuration file has been correctly created. ```bash sudo cat /etc/apt/sources.list.d/serverpilot.list ``` -------------------------------- ### Install PHP YAML Extension for PHP 7.1 Source: https://serverpilot.io/docs/guides/php/extensions/yaml Installs the YAML extension for PHP 7.1 using the PECL installer. The 'yes "" |' command automatically confirms any prompts during the installation process. ```bash yes '' | sudo pecl7.1-sp install yaml ``` -------------------------------- ### Install PHP YAML Extension for PHP 7.2 Source: https://serverpilot.io/docs/guides/php/extensions/yaml Installs the YAML extension for PHP 7.2 using the PECL installer. The 'yes "" |' command automatically confirms any prompts during the installation process. ```bash yes '' | sudo pecl7.2-sp install yaml ``` -------------------------------- ### Install PHP YAML Extension for PHP 7.3 Source: https://serverpilot.io/docs/guides/php/extensions/yaml Installs the YAML extension for PHP 7.3 using the PECL installer. The 'yes "" |' command automatically confirms any prompts during the installation process. ```bash yes '' | sudo pecl7.3-sp install yaml ``` -------------------------------- ### Memcached Statistics Output Example Source: https://serverpilot.io/docs/guides/servers/packages/memcached This is an example of the output you can expect when viewing Memcached statistics. ```text STAT pid 15669 STAT uptime 1757436 STAT time 1392693208 STAT version 1.4.13 STAT libevent 2.0.16-stable STAT pointer_size 64 STAT rusage_user 28.753797 STAT rusage_system 30.577911 STAT curr_connections 5 STAT total_connections 38 STAT connection_structures 6 ... END ``` -------------------------------- ### Example Backup File Structure Source: https://serverpilot.io/docs/guides/mysql/automysqlbackup This output shows the typical directory structure and file naming convention for AutoMySQLBackup backups, including database name, date, and frequency. ```text /var/lib/automysqlbackup: daily monthly weekly /var/lib/automysqlbackup/daily: exampledb information_schema performance_schema test wordpress /var/lib/automysqlbackup/daily/exampledb: exampledb_2014-08-03_06h48m.Sunday.sql.gz ... ``` -------------------------------- ### Install PHP YAML Extension for PHP 7.4 Source: https://serverpilot.io/docs/guides/php/extensions/yaml Installs the YAML extension for PHP 7.4 using the PECL installer. The 'yes "" |' command automatically confirms any prompts during the installation process. ```bash yes '' | sudo pecl7.4-sp install yaml ``` -------------------------------- ### Example Redis Monitor Output Source: https://serverpilot.io/docs/guides/servers/packages/redis This is an example of the output you will see when monitoring Redis commands. ```text 1339518083.107412 [0 127.0.0.1:60866] "keys" "*" 1339518087.877697 [0 127.0.0.1:60866] "dbsize" 1339518090.420270 [0 127.0.0.1:60866] "set" "x" "6" 1339518096.506257 [0 127.0.0.1:60866] "get" "x" 1339518099.363765 [0 127.0.0.1:60866] "del" "x" 1339518100.544926 [0 127.0.0.1:60866] "get" "x" ``` -------------------------------- ### Install PHP YAML Extension for PHP 8.0 Source: https://serverpilot.io/docs/guides/php/extensions/yaml Installs the YAML extension for PHP 8.0 using the PECL installer. The 'yes "" |' command automatically confirms any prompts during the installation process. ```bash yes '' | sudo pecl8.0-sp install yaml ``` -------------------------------- ### Create Compute Engine Instance Source: https://serverpilot.io/docs/providers/google-cloud Creates a Compute Engine instance with specified configurations including image, machine type, disk size, and boot disk type. It uses predefined shell variables for customization. ```bash gcloud compute instances create "${INSTANCE_NAME}" \ --image-project="ubuntu-os-cloud" \ --image-family="${IMAGE_FAMILY}" \ --machine-type="${MACHINE_TYPE}" \ --boot-disk-size="${DISK_SIZE}" \ --boot-disk-type="pd-balanced" ``` -------------------------------- ### Example PHP-FPM Log Entries Source: https://serverpilot.io/docs/logs/php/service This example demonstrates log entries for slow requests and child process tracing within the PHP-FPM service. ```text [05-Mar-2025 17:33:05] WARNING: [pool example] child 320808, script '/srv/users/example/apps/example/public/wp-admin/admin-ajax.php' (request: "POST /wp-admin/admin-ajax.php?action=wp_gf_feed_processor") executing too slow (5.588836 sec), logging [05-Mar-2025 17:33:05] NOTICE: child 320808 stopped for tracing [05-Mar-2025 17:33:05] NOTICE: about to trace 320808 [05-Mar-2025 17:33:05] NOTICE: finished trace of 320808 ``` -------------------------------- ### Install PHP YAML Extension for PHP 8.1 Source: https://serverpilot.io/docs/guides/php/extensions/yaml Installs the YAML extension for PHP 8.1 using the PECL installer. The 'yes "" |' command automatically confirms any prompts during the installation process. ```bash yes '' | sudo pecl8.1-sp install yaml ``` -------------------------------- ### Install PHP YAML Extension for PHP 8.2 Source: https://serverpilot.io/docs/guides/php/extensions/yaml Installs the YAML extension for PHP 8.2 using the PECL installer. The 'yes "" |' command automatically confirms any prompts during the installation process. ```bash yes '' | sudo pecl8.2-sp install yaml ``` -------------------------------- ### Back up a file before editing Source: https://serverpilot.io/docs/guides/ssh/nano Use the `cp` command to create a backup of a file before making edits with nano. This ensures you have a copy of the original file. ```bash cp path/to/filename path/to/filename.bak ``` -------------------------------- ### Show Ubuntu Version Source: https://serverpilot.io/docs/servers/packages/curl Use this command to display the current Ubuntu version installed on your server. ```bash lsb_release -r ``` -------------------------------- ### Install PHP YAML Extension for PHP 8.3 Source: https://serverpilot.io/docs/guides/php/extensions/yaml Installs the YAML extension for PHP 8.3 using the PECL installer. The 'yes "" |' command automatically confirms any prompts during the installation process. ```bash yes '' | sudo pecl8.3-sp install yaml ``` -------------------------------- ### Install PHP YAML Extension for PHP 8.4 Source: https://serverpilot.io/docs/guides/php/extensions/yaml Installs the YAML extension for PHP 8.4 using the PECL installer. The 'yes "" |' command automatically confirms any prompts during the installation process. ```bash yes '' | sudo pecl8.4-sp install yaml ``` -------------------------------- ### Example Kernel Log Entry (Out of Memory) Source: https://serverpilot.io/docs/logs/system An example of a kernel log entry indicating an 'Out of memory' condition, showing a process being killed. ```text Mar 6 15:22:54 example-server kernel: [7789725.546207] Out of memory: Killed process 1716753 (php-fpm) total-vm:343080kB, anon-rss:78048kB, file-rss:12kB, shmem-rss:8332kB, UID:1025 pgtables:428kB oom_score_adj:1000 ``` -------------------------------- ### Create Server via API Source: https://serverpilot.io/docs/api Use this curl command to initiate the creation of a new server record in ServerPilot, which includes generating a Server ID and Server API Key. Authentication is required. ```bash curl https://api.serverpilot.io/v1/servers \ -u $CLIENTID:$APIKEY \ -H "Content-Type: application/json" \ -d '{"name": "www2"}' ``` -------------------------------- ### Install PHP YAML Extension for PHP 8.5 Source: https://serverpilot.io/docs/guides/php/extensions/yaml Installs the YAML extension for PHP 8.5 using the PECL installer. The 'yes "" |' command automatically confirms any prompts during the installation process. ```bash yes '' | sudo pecl8.5-sp install yaml ``` -------------------------------- ### Install IMAP Extension for PHP 8.4 Source: https://serverpilot.io/docs/guides/php/extensions/imap Compiles and installs the IMAP extension for PHP 8.4 using PECL. The 'yes' command pre-approves any prompts during the installation. ```bash yes '' | sudo pecl8.4-sp install imap ``` -------------------------------- ### Install IMAP Extension for PHP 8.5 Source: https://serverpilot.io/docs/guides/php/extensions/imap Compiles and installs the IMAP extension for PHP 8.5 using PECL. The 'yes' command pre-approves any prompts during the installation. ```bash yes '' | sudo pecl8.5-sp install imap ``` -------------------------------- ### Example output when APCu extension is enabled Source: https://serverpilot.io/docs/guides/php/extensions/apcu This is an example of the output you should see when the APCu extension is successfully enabled and detected by PHP. ```text Additional .ini files parsed => /etc/phpX.Y-sp/conf.d/apcu.ini, apcu ``` -------------------------------- ### Example MySQL Log Entries During Restart Source: https://serverpilot.io/docs/logs/mysql/service This example shows log entries generated during a MySQL restart, illustrating shutdown and startup messages, including system events and warnings. ```text 2025-03-06T18:40:04.327119Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user . Shutting down mysqld (Version: 8.0.41-0ubuntu0.24.04.1). 2025-03-06T18:40:05.242425Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.41-0ubuntu0.24.04.1) (Ubuntu). 2025-03-06T18:40:05.566462Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.41-0ubuntu0.24.04.1) starting as process 1631319 2025-03-06T18:40:05.582703Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-03-06T18:40:05.977001Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-03-06T18:40:06.395957Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2025-03-06T18:40:06.396121Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2025-03-06T18:40:06.466573Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '127.0.0.1' port: 33060, socket: /var/run/mysqld/mysqlx.sock 2025-03-06T18:40:06.467202Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.41-0ubuntu0.24.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu). ``` -------------------------------- ### Install MongoDB Extension for PHP 5.6 Source: https://serverpilot.io/docs/guides/php/extensions/mongodb Uses PECL to compile and install the MongoDB extension for PHP 5.6. The 'yes' command pre-emptively answers prompts during installation. ```bash yes '' | sudo pecl5.6-sp install mongodb ``` -------------------------------- ### Install OAuth extension for PHP 7.1 Source: https://serverpilot.io/docs/guides/php/extensions/oauth Use PECL to install the OAuth extension for PHP 7.1. The 'yes' command preempts the confirmation prompt. ```bash yes '' | sudo pecl7.1-sp install oauth ``` -------------------------------- ### Install MongoDB Extension for PHP 7.0 Source: https://serverpilot.io/docs/guides/php/extensions/mongodb Uses PECL to compile and install the MongoDB extension for PHP 7.0. The 'yes' command pre-emptively answers prompts during installation. ```bash yes '' | sudo pecl7.0-sp install mongodb ``` -------------------------------- ### Install Imagick Extension for PHP 5.6 Source: https://serverpilot.io/docs/guides/php/extensions/imagick Installs the Imagick extension for PHP 5.6 using PECL. The 'yes' command automatically answers 'yes' to any prompts during installation. ```bash yes '' | sudo pecl5.6-sp install imagick ``` -------------------------------- ### Install OAuth extension for PHP 7.0 Source: https://serverpilot.io/docs/guides/php/extensions/oauth Use PECL to install the OAuth extension for PHP 7.0. The 'yes' command preempts the confirmation prompt. ```bash yes '' | sudo pecl7.0-sp install oauth ``` -------------------------------- ### Example Output of Enabled GnuPG Extension Source: https://serverpilot.io/docs/guides/php/extensions/gnupg Shows the expected output when the GnuPG extension is successfully enabled and detected by PHP. ```text /etc/php8.4-sp/conf.d/gnupg.ini, gnupg gnupg support => enabled ``` -------------------------------- ### Successful HTTP/3 Response Example Source: https://serverpilot.io/docs/guides/apps/http3 Example output indicating a successful HTTP/3 connection. The presence of `alt-svc: h3` confirms HTTP/3 availability. ```text HTTP/3 200 server: nginx date: Fri, 21 Mar 2025 22:51:41 GMT content-type: text/html; charset=UTF-8 vary: accept-encoding alt-svc: h3=":443"; ma=86400 ``` -------------------------------- ### Install Imagick Extension for PHP 7.0 Source: https://serverpilot.io/docs/guides/php/extensions/imagick Installs the Imagick extension for PHP 7.0 using PECL. The 'yes' command automatically answers 'yes' to any prompts during installation. ```bash yes '' | sudo pecl7.0-sp install imagick ``` -------------------------------- ### Install Redis Extension for PHP 7.0 Source: https://serverpilot.io/docs/guides/php/extensions/redis Installs the Redis extension for PHP 7.0 using PECL, automatically answering 'yes' to prompts. ```bash yes '' | sudo pecl7.0-sp install redis ``` -------------------------------- ### Install Redis Extension for PHP 7.1 Source: https://serverpilot.io/docs/guides/php/extensions/redis Installs the Redis extension for PHP 7.1 using PECL, automatically answering 'yes' to prompts. ```bash yes '' | sudo pecl7.1-sp install redis ``` -------------------------------- ### Install MongoDB Extension for PHP 7.2 Source: https://serverpilot.io/docs/guides/php/extensions/mongodb Uses PECL to compile and install the MongoDB extension for PHP 7.2. The 'yes' command pre-emptively answers prompts during installation. ```bash yes '' | sudo pecl7.2-sp install mongodb ``` -------------------------------- ### Install SASL libraries for Postfix Source: https://serverpilot.io/docs/guides/email/relay-through-sendgrid Installs the libraries required for Postfix to authenticate with SendGrid using SASL. Run this command via SSH as root. ```bash sudo apt-get install libsasl2-modules ``` -------------------------------- ### Install AMQP Extension for PHP 7.4 Source: https://serverpilot.io/docs/guides/php/extensions/amqp Installs the AMQP extension for PHP 7.4 using PECL. The 'yes' command preempts confirmation prompts. ```bash yes '' | sudo pecl7.4-sp install amqp ``` -------------------------------- ### Install MongoDB Extension for PHP 7.3 Source: https://serverpilot.io/docs/guides/php/extensions/mongodb Uses PECL to compile and install the MongoDB extension for PHP 7.3. The 'yes' command pre-emptively answers prompts during installation. ```bash yes '' | sudo pecl7.3-sp install mongodb ``` -------------------------------- ### Install OAuth extension for PHP 7.3 Source: https://serverpilot.io/docs/guides/php/extensions/oauth Use PECL to install the OAuth extension for PHP 7.3. The 'yes' command preempts the confirmation prompt. ```bash yes '' | sudo pecl7.3-sp install oauth ``` -------------------------------- ### Install Imagick Extension for PHP 7.2 Source: https://serverpilot.io/docs/guides/php/extensions/imagick Installs the Imagick extension for PHP 7.2 using PECL. The 'yes' command automatically answers 'yes' to any prompts during installation. ```bash yes '' | sudo pecl7.2-sp install imagick ``` -------------------------------- ### Install Redis Extension for PHP 7.3 Source: https://serverpilot.io/docs/guides/php/extensions/redis Installs the Redis extension for PHP 7.3 using PECL, automatically answering 'yes' to prompts. ```bash yes '' | sudo pecl7.3-sp install redis ``` -------------------------------- ### Install OAuth extension for PHP 7.2 Source: https://serverpilot.io/docs/guides/php/extensions/oauth Use PECL to install the OAuth extension for PHP 7.2. The 'yes' command preempts the confirmation prompt. ```bash yes '' | sudo pecl7.2-sp install oauth ``` -------------------------------- ### Install MongoDB Extension for PHP 7.4 Source: https://serverpilot.io/docs/guides/php/extensions/mongodb Uses PECL to compile and install the MongoDB extension for PHP 7.4. The 'yes' command pre-emptively answers prompts during installation. ```bash yes '' | sudo pecl7.4-sp install mongodb ``` -------------------------------- ### Install AMQP Extension for PHP 8.1 Source: https://serverpilot.io/docs/guides/php/extensions/amqp Installs the AMQP extension for PHP 8.1 using PECL. The 'yes' command preempts confirmation prompts. ```bash yes '' | sudo pecl8.1-sp install amqp ``` -------------------------------- ### Install MongoDB Extension for PHP 8.0 Source: https://serverpilot.io/docs/guides/php/extensions/mongodb Uses PECL to compile and install the MongoDB extension for PHP 8.0. The 'yes' command pre-emptively answers prompts during installation. ```bash yes '' | sudo pecl8.0-sp install mongodb ``` -------------------------------- ### Install libmcrypt development package Source: https://serverpilot.io/docs/guides/php/extensions/mcrypt Installs the libmcrypt-dev package, which contains the necessary header files and libraries for building the mcrypt PHP extension. ```bash sudo apt-get -y install libmcrypt-dev ``` -------------------------------- ### Install Imagick Extension for PHP 7.4 Source: https://serverpilot.io/docs/guides/php/extensions/imagick Installs the Imagick extension for PHP 7.4 using PECL. The 'yes' command automatically answers 'yes' to any prompts during installation. ```bash yes '' | sudo pecl7.4-sp install imagick ``` -------------------------------- ### Open a file for editing with nano Source: https://serverpilot.io/docs/guides/ssh/nano Open a file in nano by providing its path as an argument to the `nano` command. This is the primary way to start editing a file. ```bash nano path/to/filename ``` ```bash nano apps/APPNAME/public/.htaccess ``` -------------------------------- ### Install MongoDB Extension for PHP 8.1 Source: https://serverpilot.io/docs/guides/php/extensions/mongodb Uses PECL to compile and install the MongoDB extension for PHP 8.1. The 'yes' command pre-emptively answers prompts during installation. ```bash yes '' | sudo pecl8.1-sp install mongodb ``` -------------------------------- ### Install Imagick Extension for PHP 8.0 Source: https://serverpilot.io/docs/guides/php/extensions/imagick Installs the Imagick extension for PHP 8.0 using PECL. The 'yes' command automatically answers 'yes' to any prompts during installation. ```bash yes '' | sudo pecl8.0-sp install imagick ``` -------------------------------- ### Create App via API Source: https://serverpilot.io/docs/api Use this curl command to create a new application on ServerPilot. You must provide the application name, system user ID, runtime, and domains. Authentication is required. ```bash curl https://api.serverpilot.io/v1/apps \ -u $CLIENTID:$APIKEY \ -H "Content-Type: application/json" \ -d '{"name": "example", "sysuserid": "RvnwAIfuENyjUVnl", "runtime": "php7.0", "domains": ["example.com", "www.example.com"]}' ``` -------------------------------- ### Install AMQP Extension for PHP 8.3 Source: https://serverpilot.io/docs/guides/php/extensions/amqp Installs the AMQP extension for PHP 8.3 using PECL. The 'yes' command preempts confirmation prompts. ```bash yes '' | sudo pecl8.3-sp install amqp ``` -------------------------------- ### Install MongoDB Extension for PHP 8.2 Source: https://serverpilot.io/docs/guides/php/extensions/mongodb Uses PECL to compile and install the MongoDB extension for PHP 8.2. The 'yes' command pre-emptively answers prompts during installation. ```bash yes '' | sudo pecl8.2-sp install mongodb ``` -------------------------------- ### Example Calculation for max_children Source: https://serverpilot.io/docs/guides/php/max-children Illustrates how to calculate the maximum number of visitors an app can support with a `max_children` setting of 100, given specific execution times and user interaction rates. ```text 100 * 5 / 0.1 = 5,000 ^ ^ ^ | | | | | └ Average request execution time in seconds (0.1s is 100ms) | └ Average seconds between page view for an individual visitor └ max_children setting ``` -------------------------------- ### Install Imagick Extension for PHP 8.1 Source: https://serverpilot.io/docs/guides/php/extensions/imagick Installs the Imagick extension for PHP 8.1 using PECL. The 'yes' command automatically answers 'yes' to any prompts during installation. ```bash yes '' | sudo pecl8.1-sp install imagick ``` -------------------------------- ### Install MongoDB Extension for PHP 8.3 Source: https://serverpilot.io/docs/guides/php/extensions/mongodb Uses PECL to compile and install the MongoDB extension for PHP 8.3. The 'yes' command pre-emptively answers prompts during installation. ```bash yes '' | sudo pecl8.3-sp install mongodb ``` -------------------------------- ### Install AMQP Extension for PHP 8.0 Source: https://serverpilot.io/docs/guides/php/extensions/amqp Installs the AMQP extension for PHP 8.0 using PECL. The 'yes' command preempts confirmation prompts. ```bash yes '' | sudo pecl8.0-sp install amqp ``` -------------------------------- ### Example output of successful mcrypt verification Source: https://serverpilot.io/docs/guides/php/extensions/mcrypt Shows the expected output when the mcrypt extension is successfully enabled and loaded in PHP. ```text /etc/phpX.Y-sp/conf.d/mcrypt.ini, Registered Stream Filters => zlib.*, convert.iconv.*, bzip2.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.* mcrypt mcrypt support => enabled mcrypt_filter support => enabled mcrypt.algorithms_dir => no value => no value mcrypt.modes_dir => no value => no value ``` -------------------------------- ### Install Imagick Extension for PHP 8.2 Source: https://serverpilot.io/docs/guides/php/extensions/imagick Installs the Imagick extension for PHP 8.2 using PECL. The 'yes' command automatically answers 'yes' to any prompts during installation. ```bash yes '' | sudo pecl8.2-sp install imagick ``` -------------------------------- ### Install MongoDB Extension for PHP 8.4 Source: https://serverpilot.io/docs/guides/php/extensions/mongodb Uses PECL to compile and install the MongoDB extension for PHP 8.4. The 'yes' command pre-emptively answers prompts during installation. ```bash yes '' | sudo pecl8.4-sp install mongodb ``` -------------------------------- ### Example Output of Enabled MongoDB Extension Source: https://serverpilot.io/docs/guides/php/extensions/mongodb Shows the expected output when the MongoDB extension is successfully enabled and loaded in PHP. ```text /etc/phpX.Y-sp/conf.d/mongodb.ini, mongodb mongodb support => enabled mongodb version => 1.1.8 mongodb stability => stable mongodb.debug => no value => no value ``` -------------------------------- ### Install Imagick Extension for PHP 8.3 Source: https://serverpilot.io/docs/guides/php/extensions/imagick Installs the Imagick extension for PHP 8.3 using PECL. The 'yes' command automatically answers 'yes' to any prompts during installation. ```bash yes '' | sudo pecl8.3-sp install imagick ``` -------------------------------- ### Install MongoDB Extension for PHP 8.5 Source: https://serverpilot.io/docs/guides/php/extensions/mongodb Uses PECL to compile and install the MongoDB extension for PHP 8.5. The 'yes' command pre-emptively answers prompts during installation. ```bash yes '' | sudo pecl8.5-sp install mongodb ``` -------------------------------- ### Install AMQP Extension for PHP 8.4 Source: https://serverpilot.io/docs/guides/php/extensions/amqp Installs the AMQP extension for PHP 8.4 using PECL. The 'yes' command preempts confirmation prompts. ```bash yes '' | sudo pecl8.4-sp install amqp ``` -------------------------------- ### Install Imagick Extension for PHP 8.4 Source: https://serverpilot.io/docs/guides/php/extensions/imagick Installs the Imagick extension for PHP 8.4 using PECL. The 'yes' command automatically answers 'yes' to any prompts during installation. ```bash yes '' | sudo pecl8.4-sp install imagick ``` -------------------------------- ### Install AMQP Extension for PHP 8.2 Source: https://serverpilot.io/docs/guides/php/extensions/amqp Installs the AMQP extension for PHP 8.2 using PECL. The 'yes' command preempts confirmation prompts. ```bash yes '' | sudo pecl8.2-sp install amqp ``` -------------------------------- ### Install SSH2 extension for PHP 7.0 Source: https://serverpilot.io/docs/guides/php/extensions/ssh2 Compiles and installs the SSH2 PECL extension for PHP 7.0. The 'yes' command pre-emptively answers 'yes' to any prompts during the installation process. ```bash yes '' | sudo pecl7.0-sp install ssh2 ``` -------------------------------- ### Connect Server Source: https://serverpilot.io/docs/api Initiates the process of connecting a new server to ServerPilot by creating a Server ID and API Key. ```APIDOC ## POST /v1/servers ### Description Initiates the process of connecting a new server to ServerPilot by creating a Server ID and API Key. Requires the server `name` in the request body. ### Method POST ### Endpoint /v1/servers ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **name** (string) - Required - The name for the new server. ### Request Example ```json { "name": "www2" } ``` ### Response #### Success Response (200) - **id** (string) - The Server ID. - **apikey** (string) - The Server API Key. #### Response Example ```json { "id": "server_id_xyz", "apikey": "server_api_key_abc" } ``` ``` -------------------------------- ### Install SSH2 extension for PHP 7.1 Source: https://serverpilot.io/docs/guides/php/extensions/ssh2 Compiles and installs the SSH2 PECL extension for PHP 7.1. The 'yes' command pre-emptively answers 'yes' to any prompts during the installation process. ```bash yes '' | sudo pecl7.1-sp install ssh2 ``` -------------------------------- ### Install PECL extension for PHP 7.1 Source: https://serverpilot.io/docs/guides/php/extensions Compiles and installs a PECL extension. Replace EXTENSION with the actual extension name. Run this command via SSH as root. ```bash sudo pecl7.1-sp install EXTENSION ``` -------------------------------- ### Install SSH2 extension for PHP 7.2 Source: https://serverpilot.io/docs/guides/php/extensions/ssh2 Compiles and installs the SSH2 PECL extension for PHP 7.2. The 'yes' command pre-emptively answers 'yes' to any prompts during the installation process. ```bash yes '' | sudo pecl7.2-sp install ssh2 ``` -------------------------------- ### Install SSH2 extension for PHP 7.3 Source: https://serverpilot.io/docs/guides/php/extensions/ssh2 Compiles and installs the SSH2 PECL extension for PHP 7.3. The 'yes' command pre-emptively answers 'yes' to any prompts during the installation process. ```bash yes '' | sudo pecl7.3-sp install ssh2 ``` -------------------------------- ### Install PECL extension for PHP 7.0 Source: https://serverpilot.io/docs/guides/php/extensions Compiles and installs a PECL extension. Replace EXTENSION with the actual extension name. Run this command via SSH as root. ```bash sudo pecl7.0-sp install EXTENSION ``` -------------------------------- ### Install SSH2 extension for PHP 7.4 Source: https://serverpilot.io/docs/guides/php/extensions/ssh2 Compiles and installs the SSH2 PECL extension for PHP 7.4. The 'yes' command pre-emptively answers 'yes' to any prompts during the installation process. ```bash yes '' | sudo pecl7.4-sp install ssh2 ``` -------------------------------- ### Update Package Manager Configuration Source: https://serverpilot.io/docs/ubuntu/upgrade/1804-to-2004 Configure APT to use ServerPilot's repositories for Ubuntu 20.04 (Focal Fossa). ```bash sudo bash -c "echo 'deb [signed-by=/usr/share/keyrings/serverpilot.gpg] https://download.serverpilot.io/ubuntu focal main' > /etc/apt/sources.list.d/serverpilot.list" ``` -------------------------------- ### Install SSH2 extension for PHP 8.0 Source: https://serverpilot.io/docs/guides/php/extensions/ssh2 Compiles and installs the SSH2 PECL extension for PHP 8.0. The 'yes' command pre-emptively answers 'yes' to any prompts during the installation process. ```bash yes '' | sudo pecl8.0-sp install ssh2 ``` -------------------------------- ### Install AMQP Extension 1.11.0 for PHP 7.1 Source: https://serverpilot.io/docs/guides/php/extensions/amqp Installs version 1.11.0 of the AMQP extension for PHP 7.1 using PECL. The 'yes' command preempts confirmation prompts. ```bash yes '' | sudo pecl7.1-sp install amqp-1.11.0 ``` -------------------------------- ### Install SSH2 extension for PHP 8.1 Source: https://serverpilot.io/docs/guides/php/extensions/ssh2 Compiles and installs the SSH2 PECL extension for PHP 8.1. The 'yes' command pre-emptively answers 'yes' to any prompts during the installation process. ```bash yes '' | sudo pecl8.1-sp install ssh2 ``` -------------------------------- ### Install PECL extension for PHP 7.3 Source: https://serverpilot.io/docs/guides/php/extensions Compiles and installs a PECL extension. Replace EXTENSION with the actual extension name. Run this command via SSH as root. ```bash sudo pecl7.3-sp install EXTENSION ``` -------------------------------- ### Install SSH2 extension for PHP 8.2 Source: https://serverpilot.io/docs/guides/php/extensions/ssh2 Compiles and installs the SSH2 PECL extension for PHP 8.2. The 'yes' command pre-emptively answers 'yes' to any prompts during the installation process. ```bash yes '' | sudo pecl8.2-sp install ssh2 ``` -------------------------------- ### Install AMQP Extension 1.11.0 for PHP 7.0 Source: https://serverpilot.io/docs/guides/php/extensions/amqp Installs version 1.11.0 of the AMQP extension for PHP 7.0 using PECL. The 'yes' command preempts confirmation prompts. ```bash yes '' | sudo pecl7.0-sp install amqp-1.11.0 ```