Adding a new method of hosting - service/daemon#380
Open
HostServer001 wants to merge 8 commits intoTgCatUB:betafrom
Open
Adding a new method of hosting - service/daemon#380HostServer001 wants to merge 8 commits intoTgCatUB:betafrom
HostServer001 wants to merge 8 commits intoTgCatUB:betafrom
Conversation
Jisan09
requested changes
Mar 18, 2026
| sudo is needed for this command to make the `.service` file and place it in `/etc/systemd/system/` directory.\ | ||
| Apart from this the script also installs things like uv, progetsql, and requirements.txt . | ||
|
|
||
| It is advised to check `install_as_service.py` and `install`_`_`_`checker.py` file before you run them. If you have cloned the repo for correct official source no need to worry. |
Member
There was a problem hiding this comment.
small install_checker.py markdown fix need
| (["uv", "venv", "--python", "3.11"], {"UV_PYTHON_INSTALL_DIR": "/opt/uv-python"}), | ||
| (["uv", "pip", "install", "-r", "requirements.txt"], {"UV_PYTHON_INSTALL_DIR": "/opt/uv-python"}), | ||
| (["apt-get", "install", "-y", "postgresql", "postgresql-contrib"], None), | ||
| ] |
Member
There was a problem hiding this comment.
make it without uv or use pip install uv given on their install process instead of copying whole script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
I use catuserbot for quite a while now, since Heruko started banning users for deploying userbots the hosting has been difficult.
This led to local hosting, one way was to self host and the other was to use docker . Self host is a painful method , even the documentation mentions that and docker is a resource heavy method which is not suitable for RAM and compute starving PC/Laptop. Hence, we need a option which is not painful as self host and as resource heavy as docker. I think that daemonization is the suitable to fulfill this purpose . It is managed by systemd and has its own venv so not painful as self host and since runs directly on pc/laptop not that resource heavy. In this PR i have added two files , install_as_service.py and _install_checker.py , the former is a script to install the userbot after user has written his .env file and the latter is a script to check if the config variables are okay or not.
This script is designed to minimize user interaction, it is almost a plug and play script.
One downside is that it requires sudo cause we are making a .service file and also installing packages like uv.
But i have tried to make it log every command it runs.
I have also added the gitbook docs for this method along with changing the documentation on config vars which referenced to config.py which is replaced by .env .
Thank you for your time , hope you find this PR valuable and helpful .
I am also willing to help in documentation, as someone requested for help in the telegram channel
TLDR-
Things changed
two new files added for new method of hosting
EDIT-
As i was reviewing my own work, i realized some bugs and security issues that may arrive in future.