Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Private Grav Plugin

New version is Private Site

Private is a Grav Plugin.

Private provides an authentication form to keep your entire Grav site or part of it private from the general public.



Installing the Private plugin can be done in one of two ways. The GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method allows you to do so by downloading a zip file to place in the Grav plugins directory.

GPM Installation (Preferred)

The simplest way to install this plugin is via the Grav Package Manager (GPM) through your system's Terminal (also called the command line). From the root of your Grav install type:

bin/gpm install private

This will install the Private plugin into your /user/plugins directory within Grav. Its files can be found under /your/site/grav/user/plugins/private.

Manual Installation

To install this plugin, just download the zip version of this repository and unzip it under /your/site/grav/user/plugins. Then, rename the folder to private. You can find these files either on GitHub or via

You should now have all the plugin files under



By default, the password is password, username is not needed and Grav is fully private.

To customize this parameters (and more), you first need to create an override config. To do so, create the folder user/config/plugins (if it doesn't exist already) and copy the private.yaml config file in there and then make your edits.

Recommended changes to be made to ensure your site is secure (See Options section below)

  1. Change the default password in your user/config/plugins/private.yaml
  2. Change the default security salt in your user/config/plugins/private.yaml
  3. Customize your privacy rules



Enable or Disable the entire plugin (default: true).

enabled: (true|false)

Routes of login and logout. You can customize it by replacing value (e.g: login: "/admin" for "" )

    login: "/login"
    logout: "/logout"
Security Salt

Security Salt for session. IT MUST BE AN ALPHANUMERIC CHAR You can go to this generator for your own. (or similar SHA-1 Generator )

session_ss: random_value
Private Site

If true, the entire site is private. If false, then Private can be enabled on a page by page basis by using the private_tag ( See after ) (default: true)

private_site: (true|false)
Private Tag

If the private_site value is false, you will need to add the private_tag on your private page. (default: hidden) See Grav Taxonomy for more information.

private_tag: hidden
Username on login page

Enable (true) or Disable (false) the username field on the private page's login form. (default: false)

Note : If you disable the username, you need to keep no_user username in the users parameters. enable_username: (true|false)

Users list

List of users. For adding user, just create a new line keeping the identation. (default password: password)

Note : If enable_username is false, you must not delete the no_user user in the list.

Note : The password MUST BE a SHA1 value. For quick checking see SHA1 Online to generate your SHA1 password. But it is adwised to generate it locally as http and any transmission is not as secure as no transmission at all. Use command: echo -n "yourpassword" | sha1sum. You can remove it thereafter from bash history with history -d 1234 and sourcing the ~/bashrc.

    no_user : sha1_password

This section allows you to change the text which will appear on the login form on Private enabled pages.

        label: "Username"
        placeholder: "Enter your username"


As development for the Private plugin continues, new versions may become available that add additional features and functionality, improve compatibility with newer Grav releases, and generally provide a better user experience. Updating Private is easy, and can be done through Grav's GPM system, as well as manually.

GPM Update (Preferred)

The simplest way to update this plugin is via the Grav Package Manager (GPM). You can do this by navigating to the root directory of your Grav install using your system's Terminal (also called command line) and typing the following:

bin/gpm update private

This command will check your Grav install to see if your Private plugin is due for an update. If a newer release is found, you will be asked whether or not you wish to update. To continue, type y and hit enter. The plugin will automatically update and clear Grav's cache.

Manual Update

Manually updating Private is pretty simple. Here is what you will need to do to get this done:

  • Delete the your/site/user/plugins/private directory.
  • Download the new version of the Private plugin from either GitHub or
  • Unzip the zip file in your/site/user/plugins and rename the resulting folder to private.
  • Clear the Grav cache. The simplest way to do this is by going to the root Grav directory in terminal and typing bin/grav clear-cache.

Note: Any changes you have made to any of the files listed under this directory will also be removed and replaced by the new set. Any files located elsewhere (for example a YAML settings file placed in user/config/plugins) will remain intact.


Private is a Grav Plugin. It provide an authentification form to keep private your Grav site or part of it







No packages published