Commands

Pritunl cli commands

Below is a list of the cli commands available in Pritunl.

start

Starts the server this should only be used for debugging. For normal operation the server should be started using the service system available in the Linux distro. Below is a table of the available options.

OptionDescription
--daemonDaemonize process
--pidfilePath to create pid file
--confPath to configuration file
--quietSuppress logging output

version

Pritunl the version information for the Pritunl installation.

reset-password

This command will reset the administrator username and password back to pritunl. It will also remove any single sign-on and two-step authentication settings for the administrator user if enabled.

reset-version

Pritunl will prevent running a version older then the version that was last used for the database. This prevents potential corruption that could occur when database layout changes are made during updates. If a Pritunl server has been downgraded this command will need to be run to reset the version in the database to the current version. You should contact support before running this command to ensure the downgraded version of Pritunl is still compatible with the current database layout. Before running all servers in the cluster should be stopped.

reset-ssl-cert

When custom ssl certificates are improperly configured the Pritunl web console can become inaccessible. This command will reset the ssl certificates and generate a new self signed certificate. Before running all servers in the cluster should be stopped.

reconfigure

During the initial setup of Pritunl the MongoDB uri is set. in the event that the MongoDB server is moved the uri can be reset by running this command. After running the command the Pritunl server will display the initial setup allowing a new MongoDB uri to be set. The server should be stopped before running this command.

set-mongodb

This command can be used to set the MongoDB uri. This is helpful for automating Pritunl installations. The server should be stopped before running this command.

logs

This command will allow viewing the logs for all the servers in the Pritunl cluster. Below is a table of the options available.

--archiveArchive all the logs to the provided location.
--tailTails the log output as it occurs.
--limitSets a limit on the number of lines outputted.

set

Sets an advanced configuration property using the format pritunl set category.property value

unset

Clears an advanced configuration property using the format pritunl unset category.property

get

Gets the current value of an advanced configuration property using the format pritunl get category.property