astralix Userbot
МенюMenu
01 / INSTALL

Начни свою орбиту.Find your orbit.

От чистой папки до первого запуска.From an empty directory to your first launch.

Установка одной командойInstall with one command

На Linux или macOS выполни в терминале из папки, где хочешь установить astralix. Нужны Bash и curl. Установщик скачает проект из astralix Git, установит зависимости через uv и запустит вход в Telegram.On Linux or macOS, run this in a terminal from the directory where you want to install astralix. Bash and curl are required. The installer downloads the project from astralix Git, installs dependencies with uv and starts Telegram login.

shell
curl -fsSL https://astralix.cc/install.sh | bash

На Linux с systemd установщик отдельно спросит, создать ли службу и включить ли автозагрузку. Первый запуск остаётся в терминале для авторизации. На macOS systemd не используется. Посмотреть установщик ↗On Linux with systemd, the installer separately asks whether to create a service and enable autostart. The first run stays in the terminal for login. macOS does not use systemd. View the installer ↗

Предпочитаешь установку вручную? Следуй шагам ниже.Prefer a manual install? Follow the steps below.

Что понадобитсяBefore you start

Python 3.10 или новее, Git и uv. Ниже — команды для Linux и macOS. На Windows запускай команды в PowerShell, заменив .venv/bin/python на .venv/Scripts/python.exe.You need Python 3.10 or newer, Git and uv. The commands below target Linux and macOS. On Windows, use PowerShell and replace .venv/bin/python with .venv/Scripts/python.exe.

Установи uv по официальной инструкции ↗.Install uv using the official instructions ↗.

01. Получи исходники01. Get the source

shell
git clone https://git.astralix.cc/lowsense-dev/astralix.git
cd astralix

Оба репозитория публичные. astralix-tl установится из PyPI вместе с зависимостями.Both repositories are public. astralix-tl is installed from PyPI along with the dependencies.

02. Установи зависимости02. Install dependencies

shell
uv sync --locked --inexact

Зависимости устанавливаются явно. При обычном запуске astralix не скачивает и не обновляет их.Dependencies are installed explicitly. A normal astralix launch does not download or update them.

03. Подключи аккаунт03. Connect your account

shell
.venv/bin/python -m astralix

При первом запуске выбери вход через astralix tunnel или локальный браузер. Выбор сохраняется. Открой приватную ссылку из терминала. Введи API ID и API hash с my.telegram.org/apps, номер телефона, код Telegram и пароль 2FA, если он включён.On first launch, choose astralix tunnel or a local browser. Your choice is saved. Open the private URL printed in the terminal. Enter your API ID and API hash from my.telegram.org/apps, phone number, Telegram code and your 2FA password if enabled.

В режиме туннеля браузер подключается к tunnel.astralix.cc. Данные входа шифруются между браузером и твоим экземпляром astralix; сессия Telegram остаётся на твоём устройстве. Ссылка одноразовая и действует 15 минут.Tunnel mode connects your browser to tunnel.astralix.cc. Login details are encrypted between the browser and your astralix instance; your Telegram session stays on your device. Each link allows one connection and expires in 15 minutes.

Для входа полностью в терминале:To log in entirely through the terminal:

shell
.venv/bin/python -m astralix --no-web

Запуск на сервереRunning on a server

Для входа с телефона или другого устройства выбери astralix tunnel. Открывать порт на сервере не нужно. Режим можно явно задать аргументом:Choose astralix tunnel to log in from a phone or another device. No inbound port is needed. You can select the mode explicitly:

shell
.venv/bin/python -m astralix --web-mode tunnel

Для локального веб-входа используй --web-mode local, для консоли — --no-web. После разрыва туннеля запусти вход заново для новой ссылки. Чтобы бот продолжал работать после закрытия SSH, запускай его под менеджером служб или в tmux.Use --web-mode local for a local browser or --no-web for console login. If the tunnel disconnects, restart login for a new link. Run the bot under a service manager or in tmux to keep it alive after closing SSH.

Автозапуск через systemdAutostart with systemd

После первого входа останови запущенный в терминале astralix сочетанием Ctrl+C. Из папки установленного проекта выполни:After your first login, stop the foreground astralix process with Ctrl+C. Run this from the installed project directory:

shell
bash install.sh --systemd

Команда только создаёт службу, включает автозагрузку и запускает её — без переустановки зависимостей. От root создаётся системная служба; от обычного пользователя — пользовательская с linger для работы после выхода из системы.This only creates the service, enables autostart and starts it; dependencies are not reinstalled. Root creates a system service; a regular user gets a user service with linger to keep it running after logout.

Проверить состояние пользовательской службы:Check the user service status:

shell
systemctl --user status astralix.service

Для системной службы выполняй команды от root без --user. При установке через sudo служба работает от пользователя, который вызвал sudo.For a system service, run commands as root without --user. When installed through sudo, the service runs as the user who invoked sudo.

Готово. Что дальше?Ready. What next?

Отправь .help в Telegram. В быстром старте собраны основные команды. Если скачал ZIP вместо Git-клона, добавь к запуску --no-git.Send .help in Telegram. The quick start covers the basics. If you downloaded a ZIP instead of cloning with Git, add --no-git when launching.