How to deploy UX on Railway.
RyukRequirements-
1. A GitHub account that is more than 1 month old. Railway policy so can't do anything.
2. Necessary Vars like :
API_ID
API_HASH
BOT_TOKEN
DATABASE_URL
HU_STRING_SESSION
LOG_CHANNEL_ID
OWNER_ID
3.How to get these Vars?
Go to @UX_Xplugin_support and use #vars. Once you have all these, follow the next steps.
Step 1: Fork this repository to your GitHub account.
https://github.com/Anonymousx97/UX-JUTSU-RAILWAY
Step 2: Log onto Railway.app using your GitHub account and verify account.
Step 3: Create new app from Homepage of railway and select deploy from repository option.
Step 4: Here select the repository you forked in Step 1 and select branch alpha.
Step 5: Add variables (Vars) and hit deploy.
If you did everything right then you will see incoming messages in your log channel and in end you will see USERGE-X has Started Successfully !.
Some common errors-
Error 1.Deploy will stop on fetching data from upstream repo saying invalid repo and restart automatically. Don't panic, it's normal. On 2nd boot it will start normally.
Error 2. Too many requests try again in ... Seconds and app ends up crashing. In this case just wait 2 minutes and hit restart.
Error 3. If you see anything like the following :
>>> Traceback (most recent call last): File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/app/userge/__main__.py", line 14, in <module> userge.begin() File "/app/userge/core/client.py", line 201, in begin self.loop.run_until_complete(self.start()) File "/usr/local/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/app/userge/core/client.py", line 159, in start await self._load_plugins() File "/app/userge/core/client.py", line 85, in _load_plugins await self.load_plugin(name) File "/app/userge/core/client.py", line 68, in load_plugin importlib.import_module(f"userge.plugins.{name}")) File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 850, in exec_module File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "/app/userge/plugins/bot/buttons.py", line 47, in <module> InlineDB = Inline_DB() File "/app/userge/plugins/bot/buttons.py", line 30, in init ujson.dump(d, open(PATH, "w")) FileNotFoundError: [Errno 2] No such file or directory: './userge/xcache/inline_db.json' Pyrogram v1.2.11, Copyright (C) 2017-2021 Dan <https://github.com/delivrance>; Licensed under the terms of the GNU Lesser General Public License v3 or later (LGPLv3+)
To solve the above error go to this path in your repo: userge/plugins/bot/buttons.py. Tap on buttons.py and then edit it. Remove .py from it's name (buttons.py becomes buttons) and then commit changes. Once you commit changes bot will restart automatically. And this time you should see userge started successfully on 2nd boot. Once you get that go to same path again and add .py in the buttons name again and you are done.
Note- If you face any other errors while deploying UX then contact us here - support group