{
  "name": "Deploy Docker NextCloud, API backend for WHMCS/WISECP",
  "nodes": [
    {
      "id": "dc9d4284-0ff7-4068-af3d-2b7f38451118",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        540,
        920
      ]
    },
    {
      "id": "b015bca6-fe71-4eb4-8e99-2904911c03b3",
      "name": "Parametrs",
      "type": "n8n-nodes-base.set",
      "position": [
        320,
        920
      ]
    },
    {
      "id": "b0c5ccb8-0692-4bb0-99e1-769fde372e0f",
      "name": "API",
      "type": "n8n-nodes-base.webhook",
      "position": [
        0,
        920
      ]
    },
    {
      "id": "bcaf7ce1-464a-492e-b7f5-50ba8e465171",
      "name": "422-Invalid server domain",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        500,
        1240
      ]
    },
    {
      "id": "3c642087-bd6b-4996-890b-4d50fbca8c55",
      "name": "Container Actions",
      "type": "n8n-nodes-base.switch",
      "position": [
        940,
        1740
      ]
    },
    {
      "id": "396e6074-98ec-47df-956c-ce5c3b75e57e",
      "name": "Container Stats",
      "type": "n8n-nodes-base.switch",
      "position": [
        940,
        1080
      ]
    },
    {
      "id": "d0084a58-b157-4635-955a-8638f348bf72",
      "name": "Inspect",
      "type": "n8n-nodes-base.set",
      "position": [
        1260,
        760
      ]
    },
    {
      "id": "cec87c49-d7ea-4407-bc4c-21ea75b25baa",
      "name": "Stat",
      "type": "n8n-nodes-base.set",
      "position": [
        1260,
        920
      ]
    },
    {
      "id": "80dcd9b2-f1f5-44c3-98e8-38dae5ad4edb",
      "name": "Start",
      "type": "n8n-nodes-base.set",
      "position": [
        1400,
        1500
      ]
    },
    {
      "id": "9cde27ca-4749-4660-9d46-d3161946b627",
      "name": "Stop",
      "type": "n8n-nodes-base.set",
      "position": [
        1400,
        1660
      ]
    },
    {
      "id": "f957ffb7-ccb5-41b2-b89e-ef1a92942251",
      "name": "Mount Disk",
      "type": "n8n-nodes-base.set",
      "position": [
        1400,
        1820
      ]
    },
    {
      "id": "00cb7b5b-429e-494f-b2a9-1c0c45ac8d66",
      "name": "Unmount Disk",
      "type": "n8n-nodes-base.set",
      "position": [
        1400,
        1980
      ]
    },
    {
      "id": "49487b07-8b7f-48c4-b7d0-819336ce6691",
      "name": "Log",
      "type": "n8n-nodes-base.set",
      "position": [
        1420,
        1040
      ]
    },
    {
      "id": "f8dfb4a8-5887-4796-9d1e-f882947fe9e8",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 639,
        "height": 909,
        "content": "## 👋 Welcome to PUQ Docker NextCloud deploy!\n# Template for Docker NextCloud: API Backend for WHMCS/WISECP by PUQcloud\n\nThis is an Docker NextCloud template that creates an API backend for the WHMCS/W"
      }
    },
    {
      "id": "29bd957b-a5be-4a6e-81e3-ba7d88462d93",
      "name": "Deploy-docker-compose",
      "type": "n8n-nodes-base.set",
      "position": [
        1340,
        20
      ]
    },
    {
      "id": "4243c90b-de8a-4931-972b-5f700edb09d4",
      "name": "Version",
      "type": "n8n-nodes-base.set",
      "position": [
        1380,
        2640
      ]
    },
    {
      "id": "4f13c4f2-82dd-478f-915b-247a071db107",
      "name": "Users",
      "type": "n8n-nodes-base.set",
      "position": [
        1380,
        2780
      ]
    },
    {
      "id": "6d385bc7-01f1-4d42-b16e-a2e45927ef7f",
      "name": "Change Password",
      "type": "n8n-nodes-base.set",
      "position": [
        1380,
        2960
      ]
    },
    {
      "id": "dd283191-a5cd-4d29-8c2d-0ef42b63f69c",
      "name": "NextCloud",
      "type": "n8n-nodes-base.switch",
      "position": [
        920,
        2620
      ]
    },
    {
      "id": "9f5e3d3e-4f6d-4967-aefe-b953c5c3418b",
      "name": "nginx",
      "type": "n8n-nodes-base.set",
      "position": [
        1080,
        140
      ]
    },
    {
      "id": "fa40012b-0e58-4d6c-af19-b9dd6c72386d",
      "name": "Test Connection",
      "type": "n8n-nodes-base.set",
      "position": [
        1920,
        -40
      ]
    },
    {
      "id": "12240691-bcbe-407c-b53c-89cf84bc190f",
      "name": "ChangePackage",
      "type": "n8n-nodes-base.set",
      "position": [
        1920,
        840
      ]
    },
    {
      "id": "5c01e300-9eb2-42db-b609-1ddb1d0140e7",
      "name": "Terminated",
      "type": "n8n-nodes-base.set",
      "position": [
        1920,
        660
      ]
    },
    {
      "id": "264dac81-0eda-4a49-b209-c7dda4dd649d",
      "name": "Unsuspend",
      "type": "n8n-nodes-base.set",
      "position": [
        1920,
        480
      ]
    },
    {
      "id": "616b6f8b-707f-473f-8065-f3e1623ece2c",
      "name": "Suspend",
      "type": "n8n-nodes-base.set",
      "position": [
        1920,
        320
      ]
    },
    {
      "id": "e09ef109-d4bd-4d2f-acad-a442854bc299",
      "name": "Deploy",
      "type": "n8n-nodes-base.set",
      "position": [
        1920,
        160
      ]
    },
    {
      "id": "8b9f1482-cc21-4f7b-aa82-fdb47643d807",
      "name": "Service Actions",
      "type": "n8n-nodes-base.switch",
      "position": [
        1640,
        140
      ]
    },
    {
      "id": "b27da6f4-859b-4b8a-9542-f0cad5f2cbfc",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        920,
        320
      ]
    },
    {
      "id": "0af4d346-d369-412b-b8f1-9847c5deb645",
      "name": "Dependent containers Stat",
      "type": "n8n-nodes-base.set",
      "position": [
        1300,
        1180
      ]
    },
    {
      "id": "2e53a360-deb3-41e7-8ddd-c06a3733e4bd",
      "name": "GET ACL",
      "type": "n8n-nodes-base.set",
      "position": [
        1400,
        2140
      ]
    },
    {
      "id": "ec319d39-328f-4af6-a6d1-23ba6efb11d2",
      "name": "SET ACL",
      "type": "n8n-nodes-base.set",
      "position": [
        1400,
        2320
      ]
    },
    {
      "id": "a80322f9-1d95-4d09-b659-e98cfd31ed4b",
      "name": "GET NET",
      "type": "n8n-nodes-base.set",
      "position": [
        1400,
        2460
      ]
    },
    {
      "id": "3158fb78-50c5-4ee2-b9ff-34947867457d",
      "name": "If2",
      "type": "n8n-nodes-base.if",
      "position": [
        3240,
        -320
      ]
    },
    {
      "id": "8076c40a-793b-4831-af1d-6afe0bb46f35",
      "name": "Split domain",
      "type": "n8n-nodes-base.code",
      "position": [
        2740,
        -320
      ]
    },
    {
      "id": "042d1043-a64e-4aa9-84b5-fa4f47591542",
      "name": "DNS Service Actions",
      "type": "n8n-nodes-base.switch",
      "position": [
        3640,
        -400
      ]
    },
    {
      "id": "38117189-c233-40c3-8dd0-67d94f4e868a",
      "name": "DNS Parametrs",
      "type": "n8n-nodes-base.set",
      "position": [
        3000,
        -320
      ]
    },
    {
      "id": "f9cf3c3e-83d0-46ea-983b-7f536ae8356d",
      "name": "Add record",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4000,
        -440
      ]
    },
    {
      "id": "f50c9fd0-efaa-42b3-aa03-ff66ca400299",
      "name": "Delete record",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4000,
        -280
      ]
    },
    {
      "id": "d1823b67-662c-4bab-815b-0dda8da8284e",
      "name": "API answer1",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        4000,
        -580
      ]
    },
    {
      "id": "446fdfae-adf1-45c1-b237-705a235e735a",
      "name": "d01-test.uuq.pl",
      "type": "n8n-nodes-base.ssh",
      "position": [
        2900,
        1560
      ]
    },
    {
      "id": "0a52c410-c82a-4cb6-872d-3dd328224db0",
      "name": "d02-test.uuq.pl",
      "type": "n8n-nodes-base.ssh",
      "position": [
        2900,
        1840
      ]
    },
    {
      "id": "9721b93a-4b20-4ea6-965e-44277613edee",
      "name": "Servers Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        2560,
        1700
      ]
    },
    {
      "id": "84d45b2c-e8bc-4a68-9c6a-051e12451c48",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        3400,
        1740
      ]
    },
    {
      "id": "d7e8d93c-0292-44ef-ac21-8c934d60a750",
      "name": "API answer2",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3800,
        1740
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Container Stats",
            "type": "main",
            "index": 0
          },
          {
            "node": "Container Actions",
            "type": "main",
            "index": 0
          },
          {
            "node": "NextCloud",
            "type": "main",
            "index": 0
          },
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "422-Invalid server domain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API": {
      "main": [
        [
          {
            "node": "Parametrs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "nginx",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Service Actions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "DNS Service Actions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "API answer2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Stat": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Stop": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Users": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "nginx": {
      "main": [
        [
          {
            "node": "Deploy-docker-compose",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deploy": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET ACL": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET NET": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Inspect": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SET ACL": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Suspend": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Version": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "NextCloud": {
      "main": [
        [
          {
            "node": "Version",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Users",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Change Password",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parametrs": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Unsuspend": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mount Disk": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Terminated": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split domain": {
      "main": [
        [
          {
            "node": "DNS Parametrs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Unmount Disk": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ChangePackage": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DNS Parametrs": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Servers Switch": {
      "main": [
        [
          {
            "node": "d01-test.uuq.pl",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "d02-test.uuq.pl",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Change Password": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Container Stats": {
      "main": [
        [
          {
            "node": "Inspect",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Stat",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Dependent containers Stat",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Split domain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Service Actions": {
      "main": [
        [
          {
            "node": "Test Connection",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Deploy",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split domain",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Suspend",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Unsuspend",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Terminated",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split domain",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "ChangePackage",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split domain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Test Connection": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d01-test.uuq.pl": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d02-test.uuq.pl": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Container Actions": {
      "main": [
        [
          {
            "node": "Start",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Stop",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Mount Disk",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Unmount Disk",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "GET ACL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "SET ACL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "GET NET",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DNS Service Actions": {
      "main": [
        [
          {
            "node": "Add record",
            "type": "main",
            "index": 0
          },
          {
            "node": "API answer1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add record",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Delete record",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add record",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Delete record",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deploy-docker-compose": {
      "main": [
        [
          {
            "node": "Service Actions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Dependent containers Stat": {
      "main": [
        [
          {
            "node": "Servers Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}