-
-
Notifications
You must be signed in to change notification settings - Fork 806
Deploy to Heroku
Heroku is a cloud platform that lets companies build, deliver, monitor, and scale apps, it is one of the fastest ways to go from idea to URL, bypassing all those infrastructure headaches.
You can deploy tgcf
to Heroku very easily.
- Heroku has an ephemeral file system.
- Thus you cant store your files here.
-
tgcf.config.yml
can't be created here. - Instead, you can use an environment variable named
TGCF_CONFIG
to store the contents of the configuration file. -
tgcf
in past mode won't work properly in Heroku, as the environment variable TGCF_CONFIG can't be updated.
-
tgcf
will work perfectly fine inlive
mode in Heroku. - Heroku offers a great free tier of 450 hrs/mo
-
Make sure you have a Heroku account and then click on this button.
-
A Heroku page will open where you can set all the environment variables.
-
Set the name of the app whatever you want.
-
Set your API ID and API HASH obtained from my.telegram.org. Set the mode to
live
. -
You may keep your
SESSION_STRING
andTGCF_CONFIG
empty for now. -
Now click the deploy app button.
-
It will take some time to build and deploy. After the deployment is complete, click on the manage app button.
-
How to get the session string? Read this.
-
Now go to the settings tab and click Reveal config vars. Click on the pencil button for the session string and config var, and then paste the session string the value of that.
-
Learn how to configure tgcf, and then write your configuration in the
TGCF_CONFIG
env var. -
Go to the resources tab, and turn on the worker and click confirm.
Have a question? Ask in the discussion forum. But make sure to read the wiki first.