# Portainer ## Description This docker compose run portainer on docker ## Requierments ### Folder ```bash sudo mkdir -p /home/docker/portainer/data ``` ### Certificats Copy crt and key files on `/home/docker/certs/` ## Run ```bash docker compose up -d ``` ## Config By default the lifetime of the password is 8 hours. For modify goto **Settings** -> **Authentication** The maximum lifetime is 1 year ## Reset admin password ```bash docker container stop portainer docker run --rm -v /home/docker/portainer/data:/data portainer/helper-reset-password ... 2024/11/15 21:22:13 Password successfully updated for user: admin 2024/11/15 21:22:13 Use the following password to login: 9fB1`%r50ZVH:(XutQqm#M<_LE387,w2 ``` ## Apache ### http-portainer.conf ``` DocumentRoot "/var/www/html" ServerName portainer.gmolab.net ServerAlias portainer CustomLog logs/portainer_access_log common ErrorLog logs/portainer_error_log # Redirect http to https Redirect / https://portainer.gmolab.net/ Options FollowSymLinks AllowOverride None Require all granted Options FollowSymLinks AllowOverride None Require all granted SSLProxyEngine On ProxyPreserveHost On ProxyRequests off ProxyPass "/" "https://127.0.0.1:9443/" ProxyPassReverse "/" "https://127.0.0.1:9443/" ``` ## Access https://portainer.gmolab.net ## Sources https://omar2cloud.github.io/rasp/psswd/ ## Changelog ### v1.0 - 2024-11-11 #### Added - initial version by [GMo](mailto:gilles.mouchet@gmail.com)