I
I
Ilya55272022-01-28 11:44:42
Java
Ilya5527, 2022-01-28 11:44:42

How to put a telegram bot in java on the server?

Hello, here is a problem.
I have a java telegram bot table on heroku, but this hosting can no longer cope with the flow of people, so I decided to find another hosting.
I chose first byte, but there is no documentation there to put on hosting, so some problems arise.
How exactly to put a java application on the server so that it works, there are some nuances, I'm just new to this.
Thank you in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Roo, 2022-01-28
@xez

Install the JDK on the server, upload your application.
If your application does not accept incoming network connections, close all ports except 22 (for ssh).
You can simply run the application, or you can make it a service.
Look like that's it.

A
Antonio, 2022-01-28
@Apokaliepsis

1. Install the JDK on the server.
2. Check in the console that java is installed: java -version.
3. Upload the pre-built artifact (jar-nickname) of the application to the server.
4. In the console, go to the directory with the jar-nickname and run the program with the command. For example:
java -jar Project.jar You
can also run the command in the background, or implement the launch as a service.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question