CLI configuration options
Configuration flags available at the command line
Creating an admin account and password
The commands in this section will automatically create an administrator account called admin
with the password you specify.
Method 1: Creating the account from the command line
You can specify a bcrypt-encrypted password from the command line for the admin account. If you have installed the apache2-utils
package, create the password using the following command:
If your system does not have that command, use a container to run the command instead:
Once the password has been created, specify the admin password from the command line by starting Portainer with the --admin-password
flag:
Method 2: Creating the account using a file
You can also store a plain text password inside a file and use the --admin-password-file
flag. First, add the password to a file using the following example command as a guide:
Next, start the Portainer container:
This also works well with Docker Swarm and Docker Secrets:
Hiding specific containers
Portainer lets you hide containers with a specific label by using the -l
flag. Here's an example showing a container labeled owner=acme
:
To hide this container, when starting Portainer add the -l owner=acme
option on the CLI:
To hide multiple containers, repeat the -l
flag:
Using your own logo
Images must be exactly 155px by 55px in size.
Replace our logo with your own using the --logo
flag to specify the location of the image file:
You can also update the logo in the Portainer UI (Settings menu).
Defining your own app templates
We suggest hosting template files on GitHub so Portainer can access them without authentication.
Portainer allows you to rapidly deploy containers using app templates. By default, Portainer templates will be used but you can also define your own.
Templates are loaded once when Portainer is first started. If you already deployed a Portainer instance then decide to use your own templates, you’ll need to clear the default templates either in the user interface or through the HTTP API. Use the --templates
flag to specify a URL where the template file can be accessed via HTTP.
Last updated