Reference
Commands
All luckybx commands. luckybx help shows the same list.
luckybx menu
luckybx status services, versions, sites
luckybx check what is wrong: services, disk, sites, certificates, agents, backups
luckybx notify [email ADDRESS | telegram TOKEN CHAT | test | off]
where to report problems (the check runs by itself every 15 minutes)
luckybx lang [ru|en] program language: Russian or English
luckybx maint run nightly maintenance now: sessions, temporary files, tables, updates
Sites
luckybx site list list of sites
luckybx site add DOMAIN [--php 8.4] [--distro NAME] [--alias NAME]
create a site: folders, database, PHP pool, nginx
luckybx site add DOMAIN --link MAIN
second site on the core and database of the main one (multisite)
luckybx site finish DOMAIN set the site up after the Bitrix wizard: push, cron, cache, checks
luckybx site info DOMAIN paths, database and password
luckybx site del DOMAIN turn the site off; files and a database dump go to the trash
luckybx site del DOMAIN --purge delete the site for good, without a copy
luckybx site check [DOMAIN] check sites: do they answer, PHP, certificate, cron, PHP errors
luckybx site rebuild rebuild the nginx configs of all sites
luckybx site trash [clean [DAYS]] trash with removed sites: show or empty
luckybx site php DOMAIN VERSION move the site to another PHP version (linked sites move together)
luckybx site cache DOMAIN [redis|files] where Bitrix keeps the cache: in Redis or in files
luckybx site search DOMAIN which search the site uses and how many records it has
luckybx site search DOMAIN bitrix|mysql|sphinx|opensearch choose the search and build the index
luckybx site search DOMAIN reindex [quick] rebuild the index or only add changes
luckybx site option DOMAIN [OPTION on|off]
site options: https_redirect, cron, composite_nginx, search, login_limit, apache
luckybx site mail DOMAIN how the site sends mail
luckybx site mail DOMAIN smtp HOST PORT USER [SENDER]
mail through an external SMTP (asks for the password or takes LBX_SMTP_PASS)
luckybx site mail DOMAIN local mail through the local postfix
luckybx site mail DOMAIN test ADDRESS send a test letter
luckybx site cert DOMAIN le Let's Encrypt certificate (renews itself)
luckybx site cert DOMAIN own CERT KEY your own certificate
luckybx site cert DOMAIN self go back to the self-signed one
Services
luckybx service what is running
luckybx service restart|stop|start NAME
nginx, php (or php8.4), db, redis, cache, push, search, sphinx, mail, cron
Backups
luckybx backup run [DOMAIN] back up a site (all sites without a domain): database and files, no caches
luckybx backup list [DOMAIN] list of backups
luckybx backup restore DOMAIN [BACKUP]
put the site back (last backup by default); the current state is saved first
luckybx backup schedule [on HH:MM|off] daily backups by timer
luckybx backup offsite backups on another server or in a cloud: where, when, what is wrong
luckybx backup offsite sftp USER@SERVER [FOLDER] [--port N]
luckybx backup offsite s3 https://ADDRESS/BUCKET [--region REGION]
luckybx backup offsite dir /FOLDER attached disk or network folder
luckybx backup offsite run [DOMAIN] | list [DOMAIN] | check | key | off
luckybx backup offsite restore DOMAIN [NUMBER] put the site back; if it is not here, it is created
luckybx site clone FROM TO copy of a site under a new domain: its own database, cache, cron, search
luckybx site update DOMAIN [check|status] Bitrix updates in the background, no browser needed
luckybx site import DOMAIN --from root@SERVER [--port 22] [--path FOLDER] [--old-domain NAME]
move a site from BitrixVM, hosting or another server over SSH
luckybx site import DOMAIN --from FOLDER --dump FILE.sql.gz move from a saved copy
Server
luckybx server name, time zone, memory, uptime
luckybx server update update packages
luckybx server reboot reboot
luckybx server shutdown shut down
luckybx server bitrix-password password of the bitrix user for SSH and SFTP (files of all sites)
luckybx server bitrix-key [KEY] add an SSH key for the bitrix user
luckybx server timezone [ZONE] time zone in the system, PHP and database at once
luckybx server hostname [NAME] server name
luckybx server tune recalculate PHP, database, Redis, Apache and OpenSearch settings for memory and cores
luckybx server login-menu [on|off] menu when root logs in to the terminal, as in BitrixVM
(done at boot if memory or cores have changed: comp autotune)
Add --yes at the end to skip questions.
LuckyBX itself
luckybx self-update install the new version if there is one
luckybx self-update check only see if there is a new one
luckybx self-update 0.1.0 install this version
luckybx self-update rollback go back to the previous version
Server components
luckybx comp what is on
luckybx comp NAME on|off turn on or off: push, cache, search, apache, mail, firewall, protect,
autotune, monitor
Protection
luckybx protect how many addresses are blocked for password guessing
luckybx protect unban ADDRESS unblock an address
luckybx site db-password DOMAIN new database password for the site (in the database and in Bitrix)
luckybx site admin-password DOMAIN [LOGIN]
new password for the Bitrix administrator if the old one is lost
luckybx site admin-ip DOMAIN [add ADDRESS|del ADDRESS|off]
allow /bitrix/admin/ only from these addresses
luckybx site activity DOMAIN [on|off|LIMIT]
Bitrix activity filter: show, turn off or raise the limit
PHP
luckybx php list installed versions
luckybx php add VERSION install one more version: 8.2, 8.3, 8.4, 8.5, 8.6
luckybx php ext [VERSION] optional extensions: imagick, xdebug, ssh2, xhprof
luckybx php ext VERSION NAME on|off turn an extension on or off
Distributions for --distro: start, standard, small_business, business, bitrix24, setup, restore, none