Applications¶
What are Applications?¶
Applications created via the dashboard are used to run your sites. An application can take many forms, such as a directory of static files, a PHP script (or several), or even a complex back-end server spawning several long-running processes.
You serve applications from your sites by assigning them to site routes. Please refer to Building A Site for more information.
Adding an Application¶
-
Click Applications in the dashboard sidebar.
-
Click the button "Add Application" at the top of the page. A form will appear.
-
Select a shell user from the Shell User selection list, or use the "New Shell User" button to create one.
Important
Your site applications run as the shell user that owns them. This means that any application owned by a single shell user can potentially spawn proccesses to access or modify files and data for any other application belonging to that same shell user.
For this reason, we very strongly recommend that you use a separate shell user for each website or project that you operate on your Opalstack account.
Doing so will, for example, ensure that malware introduced via an outdated application cannot spread to the applications belonging to your other shell users. -
Select the desired application stack. Note that additional options may appear on the form after you've selected your application type.
-
Configure the applicable options for the application stack that you've selected.
-
Enter a name for the application. This will be the name of the directory on the server that will be created for your application.
-
Enter a name for the new application.
-
When all of the inputs are valid the button "Add Open App Stack" will appear on the form. Click the button to save your new application.
-
The new application will appear in the application list with an initial status of "Starting". Some types of applications may take several minutes to create. When the installation is complete the status will change to "Ready".
-
Check your dashboard notice log for additional details about your application such as your initial username and password (if applicable).
If a new application's status is not "Ready" following an installation then you can check for the cause of the failure in the application's install log. The log is located in the shell user's home directory at /home/shelluser/logs/apps/appname/install.log.
Custom Installers for Applications¶
Viewing API Details for Applications¶
You can view the API details for your applications via your Opalstack dashboard.
-
Click on Applications in the dashboard sidebar.
-
Click the API icon (brackets) for the shell user in the upper section of the page. A window with the JSON API representation of the shell user will appear.
-
When you are finished, click the "Close" button.
Modifying an Application¶
Some apps have parameters that can be modified via the dashboard after the app has been installed. To modify an app:
-
Click on Applications in the dashboard sidebar.
-
In the application list in the lower half of the page click the Edit icon (a pencil) in the rightmost column for the application that you want to modify. A form will appear.
-
Adjust your app's parameters as needed.
-
Click the green "Update Application" button to save your changes.
Deleting an Application¶
Important
Deleting an application will delete the related application directory and all of its contents.
-
Click on Applications in the dashboard sidebar.
-
Click the delete icon (a trash bin) for your application in the right edge of the application list.
-
A confirmation prompt will appear. Click the red button to confirm the operation, or click the cancel button to cancel it.
-
After you delete the application its status will update while the operation is pending, and the app will disappear a few seconds later when the operation is complete.
Application Logs¶
Most applications have log files that you can use for analysis and troubleshooting. The logs for each application are located in the application's shell user home directory under /home/shelluser/logs/apps/.
Application logs are kept for 7 days. Older logs are automatically deleted.
When an application is deleted, its logs are moved into /home/shelluser/logs/deleted/apps/.
