Install TelStore — server setup guide

Step-by-step guide to install the TelStore Telegram shop bot on an Ubuntu or Debian VPS: prerequisites, the interactive installer, .env configuration, systemd service, and verification.

Section 1

Before you start

Server Any Linux VPS. Ubuntu 22.04 / 24.04 and Debian 12 are tested.
CPU / RAM 1 vCPU and 1 GB RAM is enough. The bot idles around 16 MB.
Python 3.8 or newer. The installer checks this and stops if it fails.
Disk ~50 MB for the application. Product files you upload are stored separately.
Root access Yes — the installer writes a systemd unit.
Bot token From @BotFather → /newbot.
Your chat ID From @userinfobot. This is both the admin account and where sale alerts go.
Wallet address Any EVM address you control. Used for direct on-chain payments.

No paid API is required. Direct wallet payments and on-chain verification work with nothing but a bot token and an address. NOWPayments is optional and only needed if you want buyers to pay by card.

Section 2

Get the package onto the server

The buyer receives TelStore-Bot.zip. Show both routes.

From your own computer:

scp TelStore-Bot.zip root@YOUR_SERVER_IP:/opt/
ssh root@YOUR_SERVER_IP

Unzip on the server:

cd /opt
unzip TelStore-Bot.zip
cd /opt/telstore

unzip is not installed on every minimal image. If the command is not found: apt-get update && apt-get install -y unzip.

Check the tree is intact before going further:

ls scripts/

You should see bot.py, config.py, deploy_server.sh and install_telstore.sh in that listing. If scripts/ is missing, the archive was extracted into the wrong directory — check that telstore/ sits directly under /opt.

Section 3

Install (the easy path)

This is the route most people should take. One command, eleven questions, and it writes .env and registers the service for you.

cd /opt/telstore
bash scripts/deploy_server.sh

Then explain what happens, because a buyer facing eleven prompts wants to know this is normal:

The script asks eleven questions, in this order:

  1. Telegram bot token
  2. Your chat ID (the owner/admin account)
  3. Crypto wallet address
  4. NOWPayments API key — press Enter to skip
  5. CoinGate auth token — press Enter to skip
  6. Whether CoinGate business KYC is complete — answer n unless it is

Pressing Enter on the optional ones leaves those payment routes hidden, which is the correct choice if you only want direct wallet payments.

Before writing anything it makes a timestamped backup of any existing .env. If that backup fails it stops rather than continuing — that is deliberate.

When it finishes, .env exists with your values, the file is chmod 600, and a systemd unit named telstore-bot is registered.

Section 4

Install (the scriptable path)

Non-interactive install (advanced)
cd /opt/telstore
bash scripts/install_telstore.sh --dry-run
sudo bash scripts/install_telstore.sh --create-service

install_telstore.sh does not prompt for anything. It copies scripts/.env.example into place and leaves you to edit .env yourself. It is the right choice when you are provisioning from a script or an Ansible playbook; deploy_server.sh is faster when you are doing this by hand.

The installer configures systemd and tells you to run sudo systemctl start telstore-bot — it does not start the bot automatically.

Flag What it does
--dry-run Prints every action without changing anything. Run this first.
--create-service Writes and enables the systemd unit. Needs root.
--install-dir DIR Target directory. Defaults to the current one.
--service-name NAME Systemd unit name. Defaults to telstore-bot.
-y, --yes Assume yes for prompts. Use with --create-service in automation.
-h, --help Print the script's own help text.

Warning: The installer refuses to run against /, /etc, /root, /var or /usr directly. It will stop rather than install into a system directory — that is a safety check, not an error.

Section 5

The .env file

Every value below is a placeholder — replace each one with your own. Nothing here is a real credential, and your filled-in .env should never be committed to git.

# --- Telegram bot ---
TELEGRAM_BOT_TOKEN=your_bot_token_here

# --- Payment: wallet address (manual crypto payment) ---
CRYPTO_ADDRESS=0xYourWalletAddressHere
MANUAL_CHAIN=BSC
MANUAL_TOKEN_CONTRACT=

# --- Payment: NOWPayments (optional) ---
NOWPAYMENTS_ENVIRONMENT=
NOWPAYMENTS_API_KEY=

# --- Payment: CoinGate (optional) ---
COINGATE_ENVIRONMENT=
COINGATE_AUTH_TOKEN=
COINGATE_ENABLED=0

# --- Price ---
PRICE_USD=5

# --- Admin / Owner ---
OWNER_CHAT_ID=your_chat_id_here
TELEGRAM_CHAT_ID=your_chat_id_here

# --- VIP Channel (optional) ---
# CHANNEL_ID=-1001234567890
# CHANNEL_LINK=https://t.me/yourchannel

# --- Website & Support (shown to customers) ---
WEBSITE_URL=https://example.com
SUPPORT_URL=https://t.me/yourusername

Here is what each key accepts. This is where most setups go wrong, so read the notes column.

Key Required Notes
TELEGRAM_BOT_TOKEN Yes From @BotFather. A wrong token makes the bot exit on start.
CRYPTO_ADDRESS Yes* Your EVM wallet. *Required unless you only use NOWPayments.
MANUAL_CHAIN Yes One of BSC, Ethereum, Polygon, BSC-Testnet, Ethereum-Sepolia.
MANUAL_TOKEN_CONTRACT No Leave empty to use the chain's default USDT. Set it to accept a different token.
NOWPAYMENTS_ENVIRONMENT No sandbox or production. Must match the key you provide.
NOWPAYMENTS_API_KEY No Leave empty to hide the NOWPayments button entirely.
COINGATE_ENABLED No Default 0. Set to 1 only after CoinGate business KYC is approved.
PRICE_USD Yes Monthly price in USD. Integer.
OWNER_CHAT_ID Yes The admin account and the destination for sale alerts.
CHANNEL_ID / CHANNEL_LINK No Leave commented out if you are not selling channel access.
WEBSITE_URL No Must start with https://. Leave empty to hide the menu button.
SUPPORT_URL No Must be https://, tg://, t.me/..., or @username. mailto: is rejected.

Validation Notice: That last row matters — SUPPORT_URL must start with https://, tg://, t.me/, or @username. mailto: is rejected — pasting an email address triggers SUPPORT_URL must start with https://, tg://, t.me/, or @username.

Add a permissions step:

chmod 600 /opt/telstore/.env

The file holds your bot token and gateway keys. It must not be world-readable.

Section 6

Start the service

sudo systemctl start telstore-bot
sudo systemctl status telstore-bot

Expect active (running). The unit restarts on failure with a 5 second delay, so a crash loop shows up here as repeated restart lines.

Enable on boot:

sudo systemctl enable telstore-bot

--create-service already enables it. Run this only if you skipped that flag.

Section 7

Verify it works

Work through these in order. Each one proves a different part of the chain is alive.

  1. Open Telegram and send /start to your bot. You should get the main menu. No reply means the token or the service is wrong — check sudo journalctl -u telstore-bot -n 50 --no-pager.
  2. Open the Admin Menu. It appears only when your chat ID matches OWNER_CHAT_ID. If it is missing, that value is wrong.
  3. Add a test product with a price of 1 through the Admin Menu wizard.
  4. Place a test order from a second Telegram account. You should see the payment screen with an amount and the wallet address.
  5. Confirm the sale alert reaches you — the owner account receives a receipt with product, price, buyer, TXID and status.

Then the health-check script:

bash scripts/check_bot.sh

This checks the service state, the token, the wallet, the IPN listener and the gateway configuration, and prints what is wrong rather than just failing.

Section 8

Troubleshooting

These are the failures that actually happen in the first hour, in rough order of frequency.

Symptom Cause Fix
python3: command not found Python not installed apt-get update && apt-get install -y python3
Bot does not answer /start Bad token, or the service is not running sudo journalctl -u telstore-bot -n 50 --no-pager, then check TELEGRAM_BOT_TOKEN
SingleInstanceLock: already running A previous process is still alive, or a stale lock ps aux | grep bot.py, then rm -f /opt/telstore/scripts/bot.lock
Admin Menu missing OWNER_CHAT_ID does not match your account Send /start from the account whose ID is in .env
Gateway button not shown The key is empty, or CoinGate KYC is incomplete Fill the key and restart; for CoinGate set COINGATE_ENABLED=1 only after KYC
GatewayConfigurationError NOWPAYMENTS_ENVIRONMENT does not match the key type Use production with a live key, sandbox with a sandbox key
Payments not arriving The payout wallet is not verified at the gateway Verify the wallet in the gateway dashboard
unzip: command not found Minimal image apt-get install -y unzip
Section 9

Updating and removing

Both scripts touch only the application code. Your configuration and business data survive.

Updating:

cd /opt/telstore
bash scripts/update_telstore.sh

This keeps your .env, subscribers.json, pending_payments.json and manual_orders.json and replaces only the application code. Read UPGRADE_AND_ROLLBACK.md in the package before running it on a shop with live orders.

Removing:

cd /opt/telstore
sudo bash scripts/uninstall_server.sh --dry-run
sudo bash scripts/uninstall_server.sh

The uninstaller backs everything up to /tmp/telstore_pre_uninstall_*.tar.gz first, stops and disables the service, and deliberately preserves subscribers.json, pending_payments.json, manual_orders.json, .env and any .bak_* files. It does not wipe your business data.

Section 10

Support

Still stuck? The package ships full documentation — INSTALL.md, DEPLOY_SERVER.md, BUYER_GUIDE.md and SECURITY_AUDIT.md are all in the telstore/ folder you extracted.

Email TelStorebot@gmail.com or message @k1_adineh on Telegram and describe the step that failed, with the exact command and the error output.

Support