Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting Port Number #584

Open
uwedisch opened this issue Mar 29, 2024 · 5 comments
Open

Setting Port Number #584

uwedisch opened this issue Mar 29, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@uwedisch
Copy link

Is your feature request related to a problem? Please describe.
When someone has several instances of tgcf running on the same machine the instances grab the next free port, beginning with 8501.

Describe the solution you'd like
I'd like to have the option to set the port number that tgcf binds to.

Describe alternatives you've considered
Starting several instances with one script is not practial. Using Docker for several instances is also not practical because every instance has more than 2 GB data.

Additional context
Running several instances on the same machine is most practial from the point of ressources, but not predictable in relation of the port number a tgcf instance is using.

@uwedisch uwedisch added the enhancement New feature or request label Mar 29, 2024
@25gabriel-cmyk
Copy link

I run three instances of TGCF on the same machine, each with a different port and using a different Python virtual environment without any issues. TGCF 1 runs on the default Streamlit port, 8501, while TGCF 2 and 3 run on my chosen ports, which i configured by changing the default Streamlit port in the Streamlit configuration.

@uwedisch
Copy link
Author

Where in the configuration?
What parameters to provide?

@poliandro
Copy link

Why do you run 3 instances? Do you use 3 different api_id and api_hash?

@25gabriel-cmyk
Copy link

@uwedisch
Find the streamlit configuration on
/your-TGCF-directory/.venv/lib/python3.~/site-packages/streamlit/config.py

Screenshot 2024-03-31 215042

Change the default value to any port of your choice and restart your TGCF

@poliandro
Yes, i run three different TGCF instances, each serving a different purpose, on the same machine/VPS with three different TG APIs and hashes

@uwedisch
Copy link
Author

@uwedisch Find the streamlit configuration on /your-TGCF-directory/.venv/lib/python3.~/site-packages/streamlit/config.py

Screenshot 2024-03-31 215042

Change the default value to any port of your choice and restart your TGCF

What is about updates when config.py receiving changes because of changed package? Are getting these changes and my changes merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants