> ## Documentation Index
> Fetch the complete documentation index at: https://simplecloud.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Convert a stopped persistent server to a group

> Requires an inactive source with no server records. Copies shared settings and transfers plugin and collection assignments, then deletes the source atomically. Returns a new inactive group with a new ID. deployment.hosts must be supplied: [] allows all hosts (stored as an empty blacklist); a nonempty list is stored as a whitelist. Scaling must be supplied. World files and running instances are not migrated. Requires source read/delete and destination write permissions.



## OpenAPI

````yaml https://controller.simplecloud.app/swagger/doc.json post /v0/persistent-servers/convert-to-group
openapi: 3.1.0
info:
  contact:
    name: SimpleCloud support
    url: https://discord.simplecloud.app
  description: >-
    JWT sent in Authorization: Bearer <token>. Access depends on the token's
    network membership and permissions. The admin endpoint requires admin
    claims.
  title: SimpleCloud Controller API
  version: '1.0'
servers:
  - url: https://controller.simplecloud.app/
security: []
externalDocs:
  description: ''
  url: ''
paths:
  /v0/persistent-servers/convert-to-group:
    post:
      tags:
        - persistent-servers
      summary: Convert a stopped persistent server to a group
      description: >-
        Requires an inactive source with no server records. Copies shared
        settings and transfers plugin and collection assignments, then deletes
        the source atomically. Returns a new inactive group with a new ID.
        deployment.hosts must be supplied: [] allows all hosts (stored as an
        empty blacklist); a nonempty list is stored as a whitelist. Scaling must
        be supplied. World files and running instances are not migrated.
        Requires source read/delete and destination write permissions.
      operationId: convert_persistent_to_group
      parameters:
        - description: Network ID
          in: header
          name: X-Network-ID
          required: true
          schema:
            type: string
        - description: Source persistent server ID
          in: query
          name: persistent_server_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models.ConvertPersistentToGroupRequest'
        description: Destination deployment and scaling
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.CreateServerGroupResponse'
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
          description: Conflict
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
          description: Internal Server Error
      security:
        - BearerAuth: []
        - NetworkCredential: []
components:
  schemas:
    models.ConvertPersistentToGroupRequest:
      properties:
        deployment:
          $ref: '#/components/schemas/models.ConversionDeployment'
        scaling:
          $ref: '#/components/schemas/models.ScalingConfig'
      required:
        - deployment
        - scaling
      type: object
    models.CreateServerGroupResponse:
      description: Response for creating a new server group
      properties:
        active:
          example: true
          type: boolean
        created_at:
          example: '2023-01-01T12:00:00Z'
          type: string
        deployment:
          $ref: '#/components/schemas/models.DeploymentConfig'
        max_memory:
          example: 2048
          type: integer
        max_players:
          example: 50
          type: integer
        min_memory:
          example: 1024
          type: integer
        name:
          example: lobby
          type: string
        priority:
          example: 10
          type: integer
        properties:
          additionalProperties: {}
          type: object
        scaling:
          $ref: '#/components/schemas/models.ScalingConfig'
        server_group_id:
          example: 123e4567-e89b-12d3-a456-426614174000
          type: string
        source:
          $ref: '#/components/schemas/models.SourceConfig'
        tags:
          items:
            type: string
          type: array
          uniqueItems: false
        type:
          example: SERVER
          type: string
        updated_at:
          example: '2023-01-01T12:00:00Z'
          type: string
        workflows:
          $ref: '#/components/schemas/models.WorkflowsConfig'
      type: object
    models.ErrorResponse:
      description: Generic error response
      properties:
        error:
          type: string
      type: object
    models.ConversionDeployment:
      properties:
        hosts:
          items:
            $ref: '#/components/schemas/models.DeploymentHost'
          type: array
          uniqueItems: false
      required:
        - hosts
      type: object
    models.ScalingConfig:
      description: Scaling configuration for server groups
      properties:
        available_slots:
          example: 10
          type: integer
        max_servers:
          example: 3
          type: integer
        min_servers:
          example: 0
          type: integer
        player_threshold:
          example: 0.8
          type: number
        scale_down:
          $ref: '#/components/schemas/models.ScaleDownConfig'
        scaling_mode:
          $ref: '#/components/schemas/models.ScalingMode'
      type: object
    models.DeploymentConfig:
      description: Deployment configuration for a server group
      properties:
        hosts:
          items:
            $ref: '#/components/schemas/models.DeploymentHost'
          type: array
          uniqueItems: false
        strategy:
          example: whitelist
          type: string
      type: object
    models.SourceConfig:
      description: Source configuration for server groups
      properties:
        blueprint:
          example: 123e4567-e89b-12d3-a456-426614174000
          type: string
        image:
          example: ghcr.io/user/custom-image:latest
          type: string
        type:
          enum:
            - blueprint
            - image
          example: blueprint
          type: string
      type: object
    models.WorkflowsConfig:
      description: Workflows configuration for server groups
      properties:
        manual:
          items:
            type: string
          type: array
          uniqueItems: false
        when:
          $ref: '#/components/schemas/models.WorkflowWhen'
      type: object
    models.DeploymentHost:
      description: Host configuration for deployment
      properties:
        name:
          example: main-host-1
          type: string
        priority:
          example: 1
          type: integer
      type: object
    models.ScaleDownConfig:
      description: Scale down configuration
      properties:
        idle_time:
          example: 3m
          type: string
        ignore_players:
          example: true
          type: boolean
      type: object
    models.ScalingMode:
      description: Scaling mode for server groups
      example: SERVERS
      type: string
      x-enum-varnames:
        - ScalingModeSlots
        - ScalingModeServers
    models.WorkflowWhen:
      description: When workflows should be executed
      properties:
        start:
          items:
            type: string
          type: array
          uniqueItems: false
        stop:
          items:
            type: string
          type: array
          uniqueItems: false
      type: object
  securitySchemes:
    NetworkCredential:
      description: >-
        Network password or signed JWT. Password authentication also requires
        X-Network-ID and grants full access to that network. JWT permissions
        still apply.
      in: header
      name: X-Network-Credential
      type: apiKey

````