Skip to main content
Glama

Deploy a Python bot as a systemd service

deploy_python_bot

Clone a git repository, create a virtual environment, install dependencies from requirements.txt, write a systemd unit with auto-restart, and start the service for a Python bot.

Instructions

Clones (or updates) a git repo, creates a venv, installs requirements.txt, writes a systemd unit with auto-restart, and starts it. Designed for long-running Python processes like aiogram Telegram bots. Does NOT set up a reverse proxy — use setup_nginx_ssl separately if the bot needs to be reachable over HTTP(S).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesServer IP address or hostname, e.g. 168.119.45.12
portNoSSH port, defaults to 22
branchNoGit branch to checkout, defaults to the repo's default branch
appNameYesShort name for this app, used as the directory and service name, e.g. 'solpath-bot'
repoUrlYesGit repo URL to clone, e.g. https://github.com/you/your-bot.git
usernameYesSSH username, e.g. root or deploy
entryPointYesPath to the entry script relative to the repo root, e.g. 'main.py'
passphraseNoPassphrase for the private key, if it has one
envFileContentNoContents to write as .env in the app directory (API keys, etc.)
privateKeyPathYesPath to the private key on THIS machine, e.g. "~/.ssh/id_ed25519"
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Despite no annotations, the description outlines key behaviors (clones/updates repo, creates venv, installs requirements, writes systemd unit, starts service). However, it lacks details on idempotency, error handling, SSH key management, and what happens if the service or directory already exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences: first covers the core actions, second provides purpose and exclusion. No redundant information; every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 10 parameters, no output schema, and no annotations, the description covers main behaviors but misses important details like idempotency, SSH key handling, and handling of existing deployments. Adequate but has gaps that could confuse an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the description adds minimal meaning beyond attribute names. It references entryPoint and appName in context but does not elaborate on parameter formats, constraints, or relationships.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the tool clones/updates a git repo, creates a venv, installs requirements, writes a systemd unit with auto-restart, and starts it. It specifies it is for long-running Python processes like aiogram Telegram bots and distinguishes from sibling tool setup_nginx_ssl by stating what it does NOT do.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear guidance: designed for long-running Python processes (e.g., Telegram bots) and explicitly states when not to use (when a reverse proxy is needed) with a direct alternative: 'use setup_nginx_ssl separately'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wellmb/DPloy'

If you have feedback or need assistance with the MCP directory API, please join our Discord server