PhotoPrism Print

  • 0

How to Install PhotoPrism on Ubuntu

1. Create the playbook mkdir ~/photoprism cd ~/photoprism nano install.yml 2. Short YAML playbook --- - name: Install PhotoPrism hosts: all become: true vars: photoprism_dir: /opt/photoprism photoprism_password: "ChangeMe123!" tasks: - name: Install Docker and Compose ansible.builtin.apt: name: - docker.io - docker-compose-v2 state: present update_cache: true - name: Start Docker ansible.builtin.service: name: docker state: started enabled: true - name: Create PhotoPrism directory ansible.builtin.file: path: "{{ photoprism_dir }}" state: directory mode: "0755" - name: Download PhotoPrism Compose file ansible.builtin.get_url: url: https://dl.photoprism.app/docker/compose.yaml dest: "{{ photoprism_dir }}/compose.yaml" mode: "0644" - name: Set admin password ansible.builtin.replace: path: "{{ photoprism_dir }}/compose.yaml" regexp: 'PHOTOPRISM_ADMIN_PASSWORD:.*' replace: 'PHOTOPRISM_ADMIN_PASSWORD: "{{ photoprism_password }}"' - name: Start PhotoPrism ansible.builtin.command: cmd: docker compose up -d chdir: "{{ photoprism_dir }}" 3. Create the inventory nano inventory Put: [photoprism] YOUR_SERVER_IP ansible_user=root Replace YOUR_SERVER_IP with your VPS IP. 4. Test the server ansible -i inventory photoprism -m ping You should get: pong 5. Install PhotoPrism ansible-playbook -i inventory install.yml 6. Open PhotoPrism After installation: http://YOUR_SERVER_IP:2342 Login: Username: admin Password: ChangeMe123! That's it. This is the compact version I recommend if your goal is simply to get PhotoPrism running with Ansible.


¿Fue útil la respuesta?
Back