Remove Obelisk, stop an interrupted uninstall or install again
Use the guided uninstall to archive the website and choose whether to keep its SQL data. Use the manual procedure at the end of this chapter to delete the installation yourself, without an automatic backup or archive. To update a working installation, use Administration → Updates; uninstalling is unnecessary.
Before you start
Connect through an interactive SSH terminal with root access. For a new operation, extract the current complete kit into a new folder outside the Obelisk website and open that folder. It contains uninstall.sh. A web update does not replace a kit already extracted on the server. You can uninstall after the trial expires.
The examples use /var/www/html/obelisk. Replace it with your actual website path. Guided removal needs the original installation journal and administrative SQL profile: private files that record completed setup steps and the database connection. Do not run install.sh just to obtain an uninstaller, or substitute a legacy removal script.
Save any SQL and file backups you will need. Finish interrupted updates or restores first. If uninstall or reinstall has already started, keep using its original kit and saved files; follow the corresponding continuation instructions below.
These examples use the original kit in /root/obelisk-install, the site in /var/www/html/obelisk, PHP at /usr/bin/php and the FreePBX source database asteriskcdrdb. Replace any value that differs with the one chosen during installation. Keep the original kit and its journal: this private file records completed steps so that the installer can continue an interrupted operation.
See what will be removed before confirming
Run this first. It shows the proposed removal, what will remain and where the website archive will be stored. It does not change the website, SQL data or configuration.
If it stops, correct the reported problem and run the preview again. If it reports an uninstall already saved, use “The uninstall stopped” below. Do not start another --apply to continue an operation you already confirmed.
cd /root/obelisk-install &&
sudo bash uninstall.sh --path /var/www/html/obeliskRemove the website but keep Obelisk’s SQL data
Choose this after reading the preview if you want to stop using Obelisk while retaining its application database data. The command repeats the checks and asks you to type the displayed confirmation. It disables Obelisk jobs and SQL events, then moves the complete website into a private archive outside the web root.
If another job is busy, the uninstaller does not terminate it. Wait and follow the final message. Normal changes to sessions, logs and standard cache/lock/tmp files are included when the site is finally archived; changed configuration and custom paths are still checked.
FreePBX CDR, queue log and external recordings stay in place. In FreePBX custom files, only recognized installer changes are undone; uncertain content is kept and reported. Save the final summary and perform a FreePBX reload if it requests one. The reload also applies other pending FreePBX changes. The website archive contains private configuration, not a SQL backup.
cd /root/obelisk-install &&
sudo bash uninstall.sh --path /var/www/html/obelisk --applyAlso delete Obelisk’s application data
This is an alternative to keeping SQL data. If you may need the data later, make your own SQL backup before continuing. --remove-data deletes the verified Obelisk SQL objects and their contents. The website archive cannot restore that data.
Run the preview, read the list, then run the apply command and type its confirmation. The database itself, SQL/AMI accounts, FreePBX sources, external audio and existing recovery copies remain. If the database contains unrelated objects, the utility stops rather than deleting them.
Preview the deletion
Check each SQL object and what the command will retain.
Commandcd /root/obelisk-install && sudo bash uninstall.sh --path /var/www/html/obelisk --remove-dataConfirm only after checking your backup
The command repeats the checks before requesting confirmation. After deletion, recovery requires your separate SQL backup.
Commandcd /root/obelisk-install && sudo bash uninstall.sh --path /var/www/html/obelisk --remove-data --apply
The uninstall stopped: decide how to continue
Read the last message. If you had already run --apply and typed its confirmation, the utility may have saved the operations it must finish. It calls this saved list a plan. Use --resume only when the message confirms that this saved operation can continue.
Use the same kit and --path. If you originally selected --remove-data, include it again. --resume continues the removal, including the SQL deletion you approved. It does not cancel it or bring the website back. install.sh --resume is for installation and is not the correct command here.
A busy lock means another process is using the required files or data: let it finish. Keep the installation journals and any uninstall/failure.json for diagnosis. Do not delete files or change the saved SQL connection to force the command to continue.
Only if the original removal also included SQL data
This is an alternative to the command below, not another step. Use it only if the original confirmed removal included --remove-data. Keep the same kit and destination; do not add this option to a removal that was meant to preserve SQL data.
Commandcd /root/obelisk-install && sudo bash uninstall.sh --path /var/www/html/obelisk --remove-data --resume
cd /root/obelisk-install &&
sudo bash uninstall.sh --path /var/www/html/obelisk --resume| What happened | What to do now |
|---|---|
| You confirmed --apply and the message tells you to resume | Correct the reported cause, then use --resume with the original options. |
| You were cancelling, but the terminal, typed code or a lock prevented completion | Correct that problem and repeat --cancel-confirmed. Do not use --resume to cancel. |
| A journal exists but the utility cannot verify it | Keep the file and ask the administrator or support to inspect it. Its presence alone does not mean resume or cancellation is allowed, including if another process created it while you were confirming. |
| No confirmed operation was saved | Correct the cause and start again with a preview. |
You confirmed uninstall but want to stop
You ran uninstall.sh with --apply and typed the requested confirmation, but the program stopped before changing the installation. If you now want to keep Obelisk, use --cancel-confirmed. It is allowed only when the utility can verify that no removal step has started.
Run the command from the same kit in an interactive SSH terminal. Add --remove-data if it was in your original command. Read the result and type the CANCEL confirmation exactly as displayed. If cancellation succeeds, the saved instructions are moved to the private cancelled-uninstalls folder. Your data and schedules are not changed.
This does not undo work already performed. Ordinary changes inside the website are kept and reported, but the utility must still verify the same website, SQL connection, object definitions, event state and managed system files. If those checks fail, keep the message and files for the administrator; do not edit them to obtain a different result.
For a terminal problem, incorrectly typed code or busy lock, correct the cause and retry --cancel-confirmed. For other refusals, ask for assistance. Never substitute --resume: that continues uninstall. A future uninstall starts again with a new preview and confirmation.
Only if the original removal also included SQL data
This is an alternative to the command below, not another step. Use it only if the original confirmed removal included --remove-data. Keep the same kit and destination; do not add this option to a removal that was meant to preserve SQL data.
Commandcd /root/obelisk-install && sudo bash uninstall.sh --path /var/www/html/obelisk --remove-data --cancel-confirmed
cd /root/obelisk-install &&
sudo bash uninstall.sh --path /var/www/html/obelisk --cancel-confirmedFind the files left after guided uninstall
Save the final summary: it shows the actual archive and private-file paths for your installation. The table explains their contents. These files can contain passwords, so keep them private. The archive does not contain a SQL dump and the uninstaller does not put the website back automatically.
The guided operation requires the website and archive on the same filesystem. If there are links, mounted filesystems or recordings inside the website, arrange their handling before removal. Before deleting old archives or revoking accounts, verify backups, unfinished recoveries and whether other installations use them.
| Retained location | Contents and responsibility |
|---|---|
| /var/lib/obelisk-installer/<journal-id>/uninstall/site/ | The previous website, including settings, uploads, sessions, logs, license file, update payloads and file-recovery copies. It is not a SQL backup. |
| /var/lib/obelisk-installer/<journal-id>/ | Installation and removal journals, locks and installer backups. Diagnostic logs remain under /var/lib/obelisk-installer/diagnostics/. |
| /etc/obelisk/ and /var/lib/obelisk/schema-updates/<site-id>/ | The site’s administrative SQL profile and any existing SQL update/recovery backups. Items never created remain absent. |
| Cron, SQL scheduler and FreePBX custom files | Recognized Obelisk entries in /etc/cron.d/obelisk remain disabled. Other jobs, the global SQL scheduler and its startup file remain unchanged. AMI accounts remain; only proven installer changes in the other custom files are undone. |
| Database, accounts and external recordings | The database container, SQL accounts and grants, FreePBX CDR/queue sources, cdr.id and recordings in the configured external path remain. Application SQL data and disabled events also remain unless you selected --remove-data. |
Before starting again with an empty Obelisk
The --reinstall procedure is for a completed guided uninstall. It needs the original installation records and the unchanged website archive at its recorded location. It starts a new empty application at the same path and SQL destination. It is not the procedure to use after manual removal.
Before uninstalling, have the database administrator review custom procedures or events and save their definitions and a separate SQL backup. Conflicting custom settings, unknown SQL objects or a database not created and tracked by the installer prevent automatic reinstall. Restore official objects only if that is the configuration you want.
Removing Obelisk does not automatically make those problems compatible with reinstall. Ask for a planned alternative if needed. A different website folder alone does not separate SQL databases, FreePBX files or jobs. Do not delete private state files or SQL objects to bypass the checks.
Install an empty application after guided uninstall
Run from the complete kit with the original --path and any custom --php option. Read the displayed SQL database, number of objects to delete and website URL before confirming. If the URL is wrong, cancel the prompt and use the next section.
Before asking for REINSTALL confirmation, the command checks the old archive, saved installation records, SQL access, custom settings and web protection. It briefly creates and removes test files. An unreachable address or downloadable private files stops the procedure before SQL cleanup.
Confirmation deletes the remaining verified application objects and their data. Make a separate SQL backup beforehand if you need them: this step creates no dump. The web check runs again before the new installation’s database work. Accept HTTP or an untrusted HTTPS certificate only when the prompt asks; exposed private files still prevent continuation.
The result is empty Obelisk at the same path, SQL server and databases. Existing SQL/AMI accounts and passwords, FreePBX sources and external audio stay in place. Previous users and settings are not imported. Enter a new web password for the original administrator name, then complete activation and first sign-in. Reinstalling does not renew the license or trial.
cd /root/obelisk-install &&
sudo bash install.sh --reinstall --path /var/www/html/obelisk --php /usr/bin/php --database asteriskcdrdbThe reinstall shows the wrong website address
Enter the FreePBX server URL without /obelisk. Include a port if it is not the default. Replace the example IP below, keep your original --path and add the original --php if used.
Choose according to the last message you saw. These commands change only the URL. They cannot change the SQL server or installation folder. If the program says it is too late to change the URL, keep its files and ask for assistance.
You have not yet reached “Preparation complete”
Cancel the incorrect-address prompt and repeat --reinstall with --base-url. If preparation stopped, correct the cause and repeat with the same kit. Check the new address before confirming.
Commandcd /root/obelisk-install && sudo bash install.sh --reinstall --path /var/www/html/obelisk --base-url=http://192.168.1.50 --php /usr/bin/php --database asteriskcdrdbYou saw “Preparation complete”
Use --resume with --base-url only while the new installation’s web check has not succeeded and database work has not started. The full web check runs again and asks again about HTTP or an untrusted certificate. Later stages refuse the change.
Commandcd /root/obelisk-install && sudo bash install.sh --resume --path /var/www/html/obelisk --base-url=http://192.168.1.50 --php /usr/bin/php --database asteriskcdrdb
The reinstall stopped before finishing
Find the last message. Before “Preparation complete”, correct the reported cause and repeat --reinstall with the same kit. After “Preparation complete”, use the --resume command below.
Keep --path, any --php option, the original kit and its saved files. Repeating --reinstall after preparation completed does not repeat deletion. If the previous uninstall is still unfinished, complete that uninstall first using its own command.
If preparation stopped before Preparation complete
This command is for the clean reinstall already requested after guided removal. Correct the reported cause and use the same kit and original options. Review the remaining data to be removed before confirming. After Preparation complete use the resume command below instead; do not start a second operation.
Commandcd /root/obelisk-install && sudo bash install.sh --reinstall --path /var/www/html/obelisk --php /usr/bin/php --database asteriskcdrdb
cd /root/obelisk-install &&
sudo bash install.sh --resume --path /var/www/html/obelisk --php /usr/bin/php --database asteriskcdrdbSQL access failed: what the administrator should check
Give the administrator the complete message and its numeric codes. A timeout, network error or missing permission does not prove that the password is wrong. The table separates the causes so you do not keep trying passwords for a different problem.
For the SQL administrator: inspection requires global PROCESS, schema SELECT and EVENT, and readable definitions including SHOW VIEW. Data removal also requires DROP, ALTER ROUTINE and TRIGGER, and the ability to preserve event DEFINER accounts. A protected DEFINER, including MySQL SYSTEM_USER, may need separate administrator action. Global SELECT is unnecessary.
Grant the required rights directly to the account. MariaDB default-role metadata is recognized, but inherited role rights are not counted or activated. These uninstall/preparation checks do not grant missing rights. During continuation, keep the original SQL profile: localhost uses its local socket, explicit sockets are retained and the actual port is verified.
Reactivate jobs only on the completed installation you are keeping
Do not run this during an uninstall or a partially completed reinstall. Once the SQL problem is resolved, use this on the completed installation and read both the current scheduler result and its startup configuration result.
Commandcd /root/obelisk-install && sudo bash install.sh --activate-jobs --path /var/www/html/obelisk --php /usr/bin/php --database asteriskcdrdb
| Reported condition | What to check |
|---|---|
| Multiple SQL errors | Review the complete failed operation and all codes with the DBA. One authentication or privilege code within a group is not enough to choose a password retry or continue with a warning. |
| Ambiguous or multiline response | Recognizable numbers may be shown as diagnostic-only codes. They help support investigate, but do not prove authentication or privilege causes and do not authorize automatic retry or continuation. |
| Single classified authentication error: 1045 / 1698 | Check the account, allowed connection host and authentication method. During reinstall, the current password for the same runtime account may be requested; its password is not reset. |
| Network, timeout or local client failure | Check server availability, address, port, pending database work and the local client as indicated. These failures do not trigger another runtime password request during reinstall. |
| Insufficient privileges | Ask the DBA to review the required scoped privileges. Uninstall and reinstall-preparation checks do not grant missing permissions automatically. |
| MySQL view access denied: 1142 / 1143 | When the message identifies obelisk_routine_grants, the runtime account needs SELECT on that view. This is not a password-change instruction. |
| MySQL view missing: 1146 | When the message identifies obelisk_routine_grants, ask the DBA to verify its creation first, then runtime access. Adding SELECT alone does not create the view. MariaDB does not require this view. |
Keep these files until the reinstall is finished
Keep the kit, journals and website archive while recovering an interrupted operation. Journals record which steps have finished. reinstall.json records the progress of the reinstall. Older kits may not read newer files: continue with the kit that started the operation.
During reinstall, earlier journals and website archives move under /var/lib/obelisk-installer/<journal-id>/history/<generation-id>/. Use the actual path from the summary. Existing SQL backup copies stay in their original location. These private files are not automatically deleted.
Once the new installation has completed and its records are verified, later maintenance no longer requires unchanged files from earlier archives. An unfinished operation still needs its own original files. Decide any cleanup only after checking backups, completed recovery and use by other installations.
Remove Obelisk manually: the complete procedure
The following six steps delete Obelisk and its data without creating a backup or archive. Use them only for a completed installation with no update, restore, installation or uninstall still in progress. Save anything you want to keep before starting.
Work with whoever administers FreePBX and SQL. The examples use website /var/www/html/obelisk, database obelisk and extracted kit /root/obelisk. Replace each with the actual value before running a command. These are separate steps, not a script to paste and run all at once.
Follow all steps below, including the remaining-state cleanup if you intend to install again at the same path.
1. Record the settings and stop new Obelisk jobs
Before deleting the website, read kernel_settings.php and note APP_DB_HOST, APP_DB_PORT, APP_DB_NAME and APP_DB_USER. Also note the AMI account and server and OBELISK_REC_PATH, the recording location. You need these values for the following steps.
Open the extracted kit folder containing install.sh and run the command below. If you originally selected a custom PHP executable, add the same --php option.
Disable Obelisk’s scheduled work
The result must confirm that both Linux cron jobs and the two SQL events are disabled. If it reports an error, resolve it before continuing. Ask users to sign out and wait for already running processes to finish: this command does not interrupt them. Do not stop global cron, Asterisk or FreePBX.
Commandcd /root/obelisk-install && sudo bash install.sh --disable-jobs --path /var/www/html/obelisk --php /usr/bin/php --database asteriskcdrdb
2. Delete the website and its cron entries
First unmount any filesystem mounted inside the website folder. Move out any recordings you want to retain. Check the actual path before deleting it: rm -r removes the folder and everything beneath it.
Read /etc/cron.d/obelisk. If it also contains jobs for other services, move those entries into another file under /etc/cron.d before deleting it. Remove any Obelisk cron entries you added manually elsewhere, while keeping unrelated jobs.
Delete the verified website folder
Run only after unmounting internal mounts and moving the recordings you want to keep. Replace the example path first.
Commandsudo rm -r -- /var/www/html/obeliskDelete the Obelisk cron file
Run only after preserving any other services’ entries in that file.
Commandsudo rm -- /etc/cron.d/obelisk
3. Delete the dedicated database and SQL account
Use the database name and connection details you recorded in step 1. Delete only the database dedicated to this Obelisk installation. Do not delete the FreePBX databases asterisk or asteriskcdrdb, or the Linux user asterisk.
Choose one of the following connection methods. A local command does not connect to a remote database automatically. The --password option asks for the password; do not put the password itself in the command.
For local MariaDB
Use this when the administrator connects locally through sudo.
Commandsudo mariadbIf local SQL root uses a password
Use this instead of the preceding command.
Commandmysql -u root -pFor a remote SQL server
Replace HOST_SQL, PORTA_SQL and ADMIN_SQL with the actual host, port and administrative account.
Commandmysql --protocol=TCP --host=HOST_SQL --port=PORTA_SQL --user=ADMIN_SQL --passwordInside the SQL client: delete the database
Replace obelisk if you used a different dedicated database name. This deletes all its data. It is an SQL statement, not a Linux shell command.
CommandDROP DATABASE `obelisk`;Delete the SQL account only if no other service uses it
Use the actual account name and host; SQL accounts are identified by both. This example is the default local account. Keep a shared account. If you retain the old local account and later install again, choose a different account name for the new installation.
CommandDROP USER 'obelisk-app'@'127.0.0.1';Return to the Linux shell
Leave the SQL client before the next step.
Commandexit;
4. Remove the dedicated AMI account and listening context
Work on the PBX that hosts the AMI account noted in step 1. Edit only the relevant blocks, never delete whole FreePBX custom files. Keep any account or context used by another installation. If FreePBX manages the AMI account, remove it through FreePBX instead.
Remove the AMI block from manager_custom.conf
In /etc/asterisk/manager_custom.conf, remove the account dedicated to Obelisk. For an installer-created account, remove the whole block, including both marker lines below. Replace obelisk with the actual account name. These lines identify file content; they are not commands to execute.
Lines in the configuration file; BEGIN OBELISK MANAGED AMI obelisk ; END OBELISK MANAGED AMI obeliskRemove the listening context from extensions_custom.conf
In /etc/asterisk/extensions_custom.conf, remove [custom-obelisk-spy] and its complete block, including both lines below. Keep it if another installation still uses it.
Lines in the configuration file; BEGIN OBELISK MANAGED SPY CONTEXT ; END OBELISK MANAGED SPY CONTEXTKeep optional changes that the PBX still uses
You may leave the E.164 contexts: trunks using them continue normalizing numbers because this is Asterisk dialplan and works without Obelisk. You may also leave log_membername_as_agent = yes and the cdr.id column.
Apply the FreePBX changes when ready
Like Apply Config, this applies ALL pending FreePBX changes, including changes unrelated to Obelisk. Check them with the PBX administrator before running it.
Commandsudo fwconsole reload
5. Remove the remaining private files and extracted kit
These folders hold SQL connection profiles, update copies and installation records. Removing the extracted kit alone does not remove them. Check how many Obelisk installations use this server before choosing the cleanup below.
If this server has only one Obelisk installation
After verifying that these folders belong only to the installation you removed, delete them with this command. Do not use it if another Obelisk installation needs them.
Commandsudo rm -r -- /etc/obelisk /var/lib/obelisk /var/lib/obelisk-installerIf there are multiple Obelisk installations
Do not delete those three folders wholesale. Before deleting any records, read the installer records to identify this installation’s /etc/obelisk/schema-updater-<site-id>.json, /var/lib/obelisk/schema-updates/<site-id>/ and /var/lib/obelisk-installer/<journal-id>/. Remove only its files and folders. site-id and journal-id are not interchangeable; do not insert the same ID in every path. Keep shared files and other installations’ records.
Leave the kit folder, then delete that extracted kit
Use the real kit path; /root/obelisk is an example. Do not delete a kit still needed by an unfinished operation or another installation. Finally remove installation ZIPs you no longer need.
Commandcd / sudo rm -r -- /root/obelisk
6. Decide whether to keep the MySQL configuration file — optional
You may leave z-obelisk.cnf, normally under /etc/mysql/mariadb.conf.d/. It enables the global SQL event scheduler. Remove it only if that setting is no longer needed by any other application. Removing Obelisk does not require a MySQL restart.
Check the result and prepare any later installation
Verify that the old URL no longer opens Obelisk and that FreePBX works. External recordings, normally in /var/spool/asterisk/monitor, remain unless you deliberately handled them separately. Removing Obelisk is not an instruction to erase that recording folder.
To install again at the same path, complete step 5 as well. Deleting /root/obelisk does not delete /var/lib/obelisk-installer; if the old state remains, the installer still detects the previous installation. If you kept the old local SQL account, choose a different account name for the new installation.
After manual removal, extract a fresh complete kit and follow the normal installation procedure. Do not use --reinstall: that command requires the records and archive created by guided uninstall.