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

# Settings

> Manage server configuration and control server lifecycle

## Overview

Update server settings, manage SSH keys, and control server lifecycle for your shared hosting servers. Configure basic server information and manage access tokens for automated deployments.

## Server Configuration

### Editable Fields

<CardGroup cols={3}>
  <Card title="Name" icon="tag">
    Human-readable server identifier (must be unique)
  </Card>

  <Card title="Port" icon="network">
    SSH port for server connection (usually 21002)
  </Card>

  <Card title="Server IP" icon="server">
    Public IP address of your hosting server
  </Card>
</CardGroup>

<CardGroup cols={2}>
  <Card title="Server Username" icon="user">
    Hosting account username for SSH access
  </Card>

  <Card title="Branch" icon="git">
    Active deployment branch for your repository
  </Card>
</CardGroup>

### Directory Configuration

<AccordionGroup>
  <Accordion title="Files Directory">
    **Purpose**: Where your application files are stored

    **Default**: Repository name (e.g., "myapp")

    **Location**: `/home/username/myapp/`
  </Accordion>

  <Accordion title="Public Directory">
    **Purpose**: Publicly accessible web directory

    **Default**: `public_html` or domain folder

    **Location**: `/home/username/public_html/`
  </Accordion>
</AccordionGroup>

### Update Process

<Steps>
  <Step title="Modify settings">
    Change name, port, IP, username, directories, and/or branch as needed
  </Step>

  <Step title="Save changes">
    Click "Save" to apply configuration updates
  </Step>

  <Step title="Verification">
    Changes are immediately reflected across the dashboard
  </Step>
</Steps>

<Info>
  **Name Validation**: Must be unique across your account, cannot be empty
</Info>

<Warning>
  Changing the branch affects future deployments. Ensure the new branch exists in your repository.
</Warning>

## SSH Key Management

### Loupp SSH Key

<AccordionGroup>
  <Accordion title="Key Information">
    **Purpose**: SSH key added to your server during setup

    **Access**: View and copy the public key

    **Security**: Keep this key secure
  </Accordion>

  <Accordion title="Key Recovery">
    **Use Case**: If key is accidentally deleted from server

    **Solution**: Copy from Loupp and add back to hosting account

    **Process**: Add to cPanel SSH Access section
  </Accordion>
</AccordionGroup>

### SSH Key Setup

<Steps>
  <Step title="Access cPanel">
    Log into your hosting control panel
  </Step>

  <Step title="SSH Access">
    Navigate to "SSH Access" section
  </Step>

  <Step title="Add Key">
    Copy the Loupp SSH key and paste it in the public key field
  </Step>

  <Step title="Authorize">
    Make sure to authorize the key after addition
  </Step>
</Steps>

<Info>
  **Provider Note**: Most shared hosting providers use cPanel. Contact your provider if you need help with SSH setup.
</Info>

## Personal Access Token (PAT)

### GitLab Integration

<AccordionGroup>
  <Accordion title="Token Purpose">
    **Use**: Same token for all shared hosting server deployments

    **Security**: Update at least twice monthly for security

    **Scope**: Repository access and deployment automation
  </Accordion>

  <Accordion title="Token Management">
    **Update Process**: Enter new token and click "Save"

    **Scope**: Automatically updates for all your shared servers

    **Format**: Starts with "glpat-" for GitLab
  </Accordion>
</AccordionGroup>

### Token Security

<Warning>
  **Security Warning**: Personal access tokens provide access to your repositories. Keep them secure and rotate regularly.
</Warning>

<AccordionGroup>
  <Accordion title="Best Practices">
    * Update tokens every 2-4 weeks
    * Use strong, unique tokens
    * Limit token scope to necessary permissions
    * Monitor token usage
  </Accordion>

  <Accordion title="Token Scope">
    * Repository read access
    * Webhook management
    * Deployment automation
  </Accordion>
</AccordionGroup>

## Server Lifecycle Management

### Server Destruction

<Warning>
  **Destructive Action**: Server destruction is irreversible. All data will be permanently lost.
</Warning>

### Destruction Process

<Steps>
  <Step title="Access section">
    Scroll to "Delete Shared Hosting" section at bottom
  </Step>

  <Step title="Review consequences">
    All site data will be permanently lost, SSL certificates preserved
  </Step>

  <Step title="Confirm action">
    Click "Delete" and confirm in the dialog
  </Step>

  <Step title="Monitor process">
    Server status changes to "Deleting" and removal begins
  </Step>
</Steps>

### What Gets Removed

<AccordionGroup>
  <Accordion title="Services & Workers">
    Stops all services, removes queue workers, deletes scheduled tasks
  </Accordion>

  <Accordion title="Files & Configs">
    Removes site directory, Nginx configs, environment files
  </Accordion>

  <Accordion title="System Integration">
    Restarts web services, updates server configurations
  </Accordion>
</AccordionGroup>

<Info>
  SSL certificates are preserved and can be reused for new sites on the same domain.
</Info>
