Thinking. 1. Analyze the Request: * Topic: "Как создать публичный сервер Minecraft" (How to create a public Minecraft server). * Platform/Hosting: proxify.cloud, Proxmox panel, dedicated server with Ubuntu. * Format: Markdown instructions. * Title: # matching the topic exactly. * Sections: Markdown headers ##, numbered steps, code blocks ```. * Content Requirements: * Mention proxify.cloud panel where appropriate. * Specific commands, file paths, examples. * Length: 800-1500 words. * No fluff, only practical steps. * End section: "Возможные проблемы и решения" (Possible problems and solutions). * No HTML tags, only markdown. * Language: Russian.

*   *Self-Correction on Structure:* The user wants the title to be the H1. Then the steps should be under H2s or numbered. Let's do a clear structured guide.
*   *Target Audience:* Someone who has a server on proxify.cloud with Proxmox. They have a Ubuntu VM or a dedicated server managed through it.
*   *Key Actions:*
    1.  Getting the server ready (System update, Java installation).
    2.  Setting up a Minecraft user (security).
    3.  Downloading the server software (Vanilla, Paper, Forge).
    4.  First launch and EULA.
    5.  Configuration (server.properties - online mode, port, whitelist, etc.).
    6.  Firewall (UFW) and port forwarding (if proxify.cloud has a NAT/firewall layer).
    7.  Running the server in a screen/tmux session or setting up a systemd service.
    8.  Making it public (IP/Domain, DNS, proxify.cloud specific IP management).
*   *Proxify.cloud Specifics:*
    *   Proxmox panel usually gives direct console access to the VM.
    *   The dedicated server might have a public IP directly attached or behind a NAT. Usually dedicated servers have their own public IPs.
    *   Often there is a firewall panel within the Proxmox/Hosting interface. I should instruct the user to check the proxify.cloud panel for port blocking (allow 25565).
    *   *Wait, the user said "панель Proxmox, выделенный сервер с Ubuntu".* This implies a single dedicated server with Proxmox installed by the hosting provider, or a VM on a Proxmox cluster. Either way, it's a virtual environment (Proxmox VM / CT) or a dedicated server. Let's assume a VM/CT on Proxmox managed by proxify.cloud.

*   **Drafting the structure:**

    # Как создать публичный сервер Minecraft

    ## 1. Подготовка сервера (в панели proxify.cloud)
    - Подключение к консоли (VNC/SSH).
    - Обновление системы.
    ```bash
    sudo apt update && sudo apt upgrade -y
    ```
    - Установка Java (Minecraft 1.20+ требует Java 17 или 21).
    ```bash
    sudo apt install openjdk-17-jdk -y
    java -version
    ```

    ## 2. Создание отдельного пользователя (Безопасность)
    ```bash
    sudo useradd -m -r -s /bin/bash minecraft
    sudo passwd minecraft
    ```
    *Optional: Or we could use a directory in `/opt/minecraft`.*

    ## 3. Загрузка серверного файла (Minecraft)
    - Выбор версии (Paper recommended for performance).
    - Создание директории.
    ```bash
    sudo mkdir -p /opt/minecraft
    cd /opt/minecraft
    sudo wget https://api.papermc.io/v2/projects/paper/versions/1.21.3/builds/XXX/downloads/paper-1.21.3-XXX.jar -O minecraft-server.jar
    ```
    (Better to explain how to get the latest build number or use vanilla).
    - Скачивание Vanilla:
    ```bash
    wget https://piston-data.mojang.com/v1/objects/.../server.jar -O minecraft-server.jar
    ```

    ## 4. Первый запуск и согласие с EULA
    ```bash
    sudo -u minecraft java -Xmx4G -Xms4G -jar minecraft-server.jar nogui
    ```
    (It will fail and generate eula.txt).
    ```bash
    sudo nano eula.txt
    # eula=true
    ```

    ## 5. Настройка server.properties (Открываем сервер для всех)
    ```bash
    sudo nano server.properties
    ```
    - `online-mode=true` (Рекомендуется для публичного сервера, чтобы игроки с лицензией могли зайти).
    - `server-port=25565`
    - `motd=Мой крутой сервер`
    - `max-players=20`
    - `difficulty=hard`
    - `enable-command-block=true` (по желанию)

    ## 6. Настройка файрвола (UFW) и панели proxify.cloud
    - Открываем порт 25565 на самой Ubuntu.
    ```bash
    sudo ufw allow 25565/tcp
    sudo ufw enable
    ```
    - **Важно!** Проверяем панель управления `proxify.cloud`.
        - Раздел "Сеть" / "Network" / "Firewall".
        - Если есть встроенный файрвол перед сервером, нужно создать правило:
            - Action: `ACCEPT`
            - Protocol: `TCP`
            - Port: `25565`
            - Source: `0.0.0.0/0` (потом можно ограничить).
        - Если используется NAT (несколько IP на одном сервере), нужно настроить проброс портов в панели Proxmox/Proxify.

    ## 7. Автоматический запуск (Systemd Service)
    Создаем юнит для systemd.
    ```bash
    sudo nano /etc/systemd/system/minecraft.service
    ```
    ```
    [Unit]
    Description=Minecraft Server
    After=network.target

    [Service]
    User=minecraft
    WorkingDirectory=/opt/minecraft
    ExecStart=/usr/bin/java -Xmx6G -Xms6G -jar minecraft-server.jar nogui
    Restart=on-failure
    RestartSec=20

    [Install]
    WantedBy=multi-user.target
    ```
    ```bash
    sudo systemctl daemon-reload
    sudo systemctl enable minecraft
    sudo systemctl start minecraft
    sudo systemctl status minecraft
    ```

    ## 8. Доступ к консоли сервера
    ```bash
    sudo journalctl -u minecraft -f
    ```
    Или через screen:
    ```bash
    sudo -u minecraft screen -S minecraft
    ```

    ## 9. Публикация сервера
    - Узнать внешний IP.
    ```bash
    curl ifconfig.me
    ```
    - Настроить A-запись у доменного регистратора для удобства.
    - Игроки подключаются к `ваш-ip:25565` или `mc.ваш-домен.ru:25565`.

    ## 10. Дополнительные плагины и защита (Paper/Spigot)
    - Скачивание плагинов (EssentialsX, LuckPerms, WorldEdit, CoreProtect).
    ```bash
    cd /opt/minecraft/plugins
    sudo wget <url-плагина>
    ```

    # Возможные проблемы и решения

    **1. "Connection timed out" при попытке подключения**
    - *Проблема:* Порт закрыт файрволом.
    - *Решение:* Проверить `ufw status`. Проверить панель firewall в `proxify.cloud`. Проверить, не занят ли порт другим процессом (`sudo lsof -i :25565`).
    - *Решение для proxify.cloud:* В панели управления Proxmox (или собственной панели хостинга) убедиться, что нет блокирующего правила на порт 25565. Если есть встроенный DDoS-фильтр, временно отключить его для теста.

    **2. "Out of Memory" / Kernel panic / Server crashes**
    - *Проблема:* Мало ОЗУ выделено Java.
    - *Решение:* Уменьшить `-Xmx`. Проверить, сколько ОЗУ выделено виртуальной машине в панели proxify.cloud (Proxmox VE -> Hardware -> Memory). Увеличить, если доступно.
    - *Решение:* Настроить swap.

    **3. "Outdated server!" / "Outdated client!"**
    - *Проблема:* Версия сервера не совпадает с версией клиента.
    - *Решение:* Обновить серверный jar или указать игрокам правильную версию.

    **4. "Failed to load eula.txt"**
    - *Проблема:* Не принято EULA.
    - *Решение:* `sudo nano eula.txt` -> `eula=true`.

    **5. Спам от ботов / Griefing**
    - *Проблема:* Сервер атакуют боты или игроки портят постройки.
    - *Решение:*
        - Установить `online-mode=true` (только лицензионные игроки).
        - Использовать плагин на анти-гриф (CoreProtect, LogBlock).
        - Использовать белый список (`white-list=true` в server.properties).
        - Настроить DDoS-защиту (в панели proxify.cloud часто есть опция "Анти-DDoS").

    **6. Server drops connection (Таймаут чтения)**
    - *Проблема:* Проблемы с сетью хостинга или настройками ядра.
    - *Решение:* Обратиться в поддержку proxify.cloud.

    **7. Cannot keep up! Is the server overloaded?**
    - *Проблема:* Не хватает мощностей CPU.
    - *Решение:* Уменьшить кол-во чанков для загрузки (`view-distance` в server.properties). Перейти на более легкое ядро (PaperMC вместо Vanilla). Проверить нагрузку на CPU/HDD в панели proxify.cloud.

    Let's refine the "Публичный сервер" aspect to make it clear.
    "Публичный" implies anyone can connect, but we should stress security (online-mode, whitelist if needed, command permissions, port exposure).

    Let's refine the proxify.cloud specific commands/panels.
    Proxify.cloud uses Proxmox VE. The user likely has a CT or VM.
    How to check IP in Proxmox context? Usually shown in the panel.
    Firewall in Proxmox:
    Datacenter -> Node -> VM/CT -> Firewall.
    Or the user might have an external firewall (DDoS protection) from proxify.cloud.
    I will instruct them to check both `ufw` inside the VM and the Proxmox host firewall / proxify.cloud client panel.

    Let's check the word count requirement. 800-1500 words.
    Russian language instructions.

    Structure:
    # Как создать публичный сервер Minecraft

    ## Введение
    (Brief intro, focusing on proxify.cloud setup context).

    ## Шаг 1: Подготовка операционной системы
    - Accessing the server (SSH/Console from proxify.cloud Proxmox Panel).
    - System updates.
    - Java Installation (OpenJDK 17 or 21).

    ## Шаг 2: Загрузка и настройка серверного ПО
    - Creating directories.
    - Downloading the jar (Paper or Vanilla).
    - EULA acceptance.

    ## Шаг 3: Базовая конфигурация мира (server.properties)
    - Key settings for a public server.
    - online-mode, whitelist, port.

    ## Шаг 4: Настройка сети и фаервола (Ключевой момент для proxify.cloud)
    - UFW setup inside the VM.
    - **Proxify.cloud / Proxmox Firewall Setup:**
      - Checking the "Firewall" tab in the Proxmox panel for the specific VM/CT.
      - Adding a rule to allow TCP 25565.
      - Checking if the hosting provider's external panel (proxify.cloud client area) has a separate DDoS/firewall filter that needs port 25565 open.
    - IP Address Management (Public IP vs NAT setup).

    ## Шаг 5: Создание systemd-сервиса для автозапуска
    - Creating the service file.
    - Enabling and starting the service.
    - Using `journalctl` for logs / console.

    ## Шаг 6: Защита и управление публичным сервером
    - Screen/Tmux console access.
    - Installing basic plugins (LuckPerms, EssentialsX).

    ## Шаг 7: Публи