Creating and Activating Systemd Services for Running Bots - DEXBOT
LOGB
  • Home
  • Blog
  • Catalog
  • Update
  • Instruction manual
  • Documentation
  • Support
  • TELEGRAM DEMO
Login / Register
Sign inCreate an Account

Lost your password?

0 items 0,00 USDC
  • English
    • Русский
    • English
    • Deutsch
    • 中文 (中国)
    • Español
    • فارسی
    • हिन्दी
    • Italiano
    • 日本語
    • Tiếng Việt
    • Français
    • 한국어
    • Türkçe
    • العربية
    • Português
    • বাংলা
LOGB
  • English
    • Русский
    • English
    • Deutsch
    • 中文 (中国)
    • Español
    • فارسی
    • हिन्दी
    • Italiano
    • 日本語
    • Tiếng Việt
    • Français
    • 한국어
    • Türkçe
    • العربية
    • Português
    • বাংলা

Telegram BOT EN

11
  • Main Menu
  • Active Trades
  • Closed Trades
  • Blockchain Settings
  • Selected Blockchain Overview
  • Trading Settings
  • Bot Settings
  • Create a Telegram Bot and Get the Token
  • Setting up trading indicators
  • Token setup
  • GRID BOT

Website Documentation

4
  • Affiliate Program
  • License — Reset Device
  • Two-Factor Authentication
  • Using a coupon (promo code) to get a discount

VPS Installation

8
  • Generating and Preparing the Secret Key
  • Server and Folder Preparation
  • Deploying the Bot on the Server
  • Configuration Setup of .env and Database
  • Creating and Activating Systemd Services for Running Bots
  • Basic Commands for Working with a Linux VPS Server
  • Quick DEXBOT Installation
  • DEXBOT version Update
  • Home
  • Documentation
  • VPS Installation
  • Creating and Activating Systemd Services for Running Bots
View Categories

Creating and Activating Systemd Services for Running Bots

1 мин. чтения

For ensuring stable and automatic operation of your DEXBOT bots on the server, it is recommended to use systemd system services.
This allows running bots as services that automatically start on system boot, are monitored, and restart if they crash.


⚙️ Creating a systemd service unit file for DEXBOT #

To create the service, run the following command in the terminal:

sudo nano /lib/systemd/system/DEXBOT.service

In the opened editor, paste the following code:

[Unit]
Description=DEXBOT — CRYPTO BOT
After=network.target

[Service]
Type=simple
WorkingDirectory=/MYBOTS/DEXBOT
ExecStart=/MYBOTS/DEXBOT/DEXBOT.bin
Restart=always
RestartSec=60

[Install]
WantedBy=multi-user.target
  • Description — a brief description of the service.
  • After=network.target — start the service after network services are initialized.
  • WorkingDirectory — the working directory from which the bot is launched.
  • ExecStart — command to start the bot executable.
  • Restart=always — always restart the service if it stops.
  • RestartSec=60 — wait 60 seconds before attempting to restart.
  • WantedBy=multi-user.target — run the service in multi-user mode.


🔧 Make the bot executable files executable #

Run the commands to give execute permissions:

chmod +x /MYBOTS/DEXBOT/DEXBOT.bin

This is necessary so that systemd can run your bots.


🚀 Enable services to start automatically on system boot #

Run the commands:

sudo systemctl enable DEXBOT

These commands create links in system directories, ensuring services start automatically after reboot.


▶️ Start services manually #

To start the services immediately without rebooting the server, run:

sudo systemctl start DEXBOT

If everything is done correctly, your bots will run as background processes.


📊 Additional useful service management commands #

  • Check service status: sudo systemctl status DEXBOT
  • Restart service: sudo systemctl restart DEXBOT
  • Stop service: sudo systemctl stop DEXBOT
  • Disable autostart: sudo systemctl disable DEXBOT

⚠️ Recommendations and tips #

  • Before creating a service, make sure the bots run correctly when started manually.
  • Ensure the unit files contain correct paths to the executable files and working directories.
  • Configure logs for services to see errors and messages — systemd stores them in the journalctl log.
  • To view service logs, use:
    sudo journalctl -u DEXBOT -f — for real-time log monitoring.
  • After editing unit files, run sudo systemctl daemon-reload so systemd reloads the new settings.

Now your bots run as full-fledged system services with automatic startup and control, greatly simplifying management and increasing reliability.


❓ Why use systemd services? #

  • Automatic startup: bots start automatically when the server is powered on or rebooted.
  • Reliability: in case of errors or crashes, the bot will be automatically restarted after the set time.
  • Convenient management: starting, stopping, restarting, and checking status is done with standard systemctl commands.
  • Centralized control: all services can be managed and monitored via system tools.
Rate this document?
Updated on August 24, 2025
Configuration Setup of .env and DatabaseBasic Commands for Working with a Linux VPS Server
Table of Contents
  • ⚙️ Creating a systemd service unit file for DEXBOT
  • 🔧 Make the bot executable files executable
  • 🚀 Enable services to start automatically on system boot
  • ▶️ Start services manually
  • 📊 Additional useful service management commands
  • ⚠️ Recommendations and tips
  • ❓ Why use systemd services?

© 2026 DEXBOT. All rights reserved

  • Home
  • Blog
  • Catalog
  • Update
  • Instruction manual
  • Documentation
  • Support
  • TELEGRAM DEMO

SPECIAL OFFER!!! 100% DISCOUNT | SPECIAL OFFER!!! 100% DISCOUNT | SPECIAL OFFER!!! 100% DISCOUNT

We use cookies to ensure you get the best experience on our website. By continuing to use this site, you agree to our use of cookies.
More info More info Accept
Home
0 items Cart
My account
Menu