Skip to content

Portainer Servers

1. Server Overview

Portainer server connectors manage API connections to Portainer instances, enabling Docker stack and container management from Odoo.

Fields

  1. Name - Server display name (required, tracked)
  2. IP - Portainer server IP address (required, tracked)
  3. Portainer Link - Full URL to the Portainer instance, e.g., https://ip:9443 (required, tracked)
  4. Access Token - API access token for authentication
  5. State - Connector status: Draft, Confirmed, or Cancelled (tracked)
  6. Root Server - Associated root server
  7. Master Portainer - Whether this is the master Portainer instance (default: False)
  8. Skip SSL Verify - Skip SSL certificate verification for API calls (default: True)
  9. Country - Server location country
  10. State - Server location state/province
  11. Active - Archive toggle (default: True)

2. Server Lifecycle

Draft → Confirmed → Cancelled
Action Description
Confirm Validates configuration (requires link and access token)
Reset to Draft Returns to editable state
Cancel Deactivates the server
Open Portainer Panel Opens the Portainer UI in a new browser tab

3. Stack Management API

These methods are used by other modules (like sadeem_saas_docker) to manage Docker stacks.

Method Description
Create Stack Creates a Docker stack from a compose string in a specific environment
Update Stack Updates an existing stack's configuration
Start/Stop Stack Controls stack state
Delete Stack Removes a stack and its containers
Check Stack Status Queries stack and container health

4. Container Management API

Method Description
Docker Actions Restart, start, stop, pause, unpause, or remove a container
Docker Exec Execute a command inside a running container
Docker State Get container resource stats (CPU, memory)

5. Installation from Root Server

Portainer can be installed directly on a root server via SSH.

Action Description
Install Portainer Installs Docker and Portainer agent on the root server
Install Portainer Master Installs Docker and Portainer CE (full UI) on ports 9443 and 8000

Auto-Setup

When installing Portainer Master, the system automatically:

  1. Generates a 14-character admin password
  2. Creates the admin user via API
  3. Authenticates and obtains a JWT token
  4. Generates a permanent API key
  5. Creates the sadeem.portainer record with the API key