Login/Register
Installatron Server
API Documentation

Defining Website Paths for Installatron Server On Demand

Usually, the path value for each website (a local file path or a URI to a remote location) is directly defined within the websites of each user.

The optional customization described here allows the path value to be omitted from user's websites definition and then provided to Installatron each time (and only when) Installatron Server needs to use the path value.

This can provide a superior level of security since path authentication information can be activated or created only when needed, rather than having it stored permanently in the Installatron Server database.

There are two custom methods involved with this approach: enablePathByWebsite is called to ask for the path, and then disablePathByWebsite is called between 30 minutes and 4 hours after a session's last action.

Implementing Paths On Demand

To use this solution, implement these PHP methods:

public function enablePathByWebsite($websiteInfo)
public function disablePathByWebsite($websiteInfo)

-in this file:

/usr/local/installatron/etc/panel.php

Sample Code

Here is an example implementation of these methods in panel.php, to get you started:


<?php
class i_custom extends i_panel
{
    /**
     * Return the path URI for the provided website.
     *
     * @param   array   An array of website information as defined in the Installatron Server API Request Header.
     * @return  string  The URI for the website path, as it would have been defined for the Installatron Server Request Header.
     */
    public function enablePathByWebsite($websiteInfo)
    {
        return "ssh://".urlencode("user").":".urlencode("pass")."@11.42.62.82/domains";
    }

    /**
     * Disable the path, if necessary, when Installatron Server no longer requires access.
     *
     * @param   array   An array of website information as defined in the Installatron Server API Request Header.
     * @return  bool    true if successful; false otherwise
     */
    public function disablePathByWebsite($websiteInfo)
    {
        return true;
    }
}

With those methods performing their required tasks you are free to leave the path value out of the websites definition for your users.

Don't hesitate to contact Installatron Support if you have questions.



© 2004 - 2025 Installatron LLC. All rights reserved. Privacy Policy.