C
C
CyberSamurai422020-09-17 17:12:20
Software Deployment
CyberSamurai42, 2020-09-17 17:12:20

How to properly deploy a server application on a VPS?

I'm trying to deal with the deployment of server applications (for example, a Laravel web application or a game server for some game).

And I want to understand if I understand the following theses correctly:
1. As I understand it, a virtual server - VPS is best suited for this. Is it so?

2. The server application is essentially a program that always works on this very VPS. For example, which was launched through the Linux screen command so that it would not be cut off when exiting SSH. Or is this the wrong approach?

3. For ease of dealing with dependencies and deployment, it's cool to use Docker, rather than cloning sources, installing dependencies, etc. independently.
But will using Docker affect the performance of a web application or a game server?

4. The VPS has a specific IP address where my server/website will be accessible. What happens if I want to change VPS? It turns out that my IP will change?
How to properly handle it? After all, the client part will be tied to the old IP. This is the question that puzzles me the most.

5. Do I still need to get a certificate on the VPS in order to connect via HTTPS? How is it done correctly? This certificate is bought for some time and placed in the hosting, or how does it happen? Or does it need to be registered somewhere else?

6. What security principles should be observed when working with a VPS to protect it from hacking?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
neol, 2020-09-17
@CyberSamurai42

As far as I understand, a virtual server - VPS - is best suited for this. Is it so?

Not necessary. Options are possible.
The server application is essentially a program that always runs on this very VPS. For example, which was launched through the Linux screen command so that it would not be cut off

This is pornography, not a server application. While the line of thought is correct, it's more correct to run the application through a systemd unit or something like supervisord rather than using screen.
For ease of dependency and deployment, it's cool to use Docker

Docker is not magic, you have to pay for everything. If somewhere the complexity has decreased, then somewhere it has increased.
But will using Docker affect the performance of a web application or a game server?

By itself, the use of docker will not give a special overhead, but not in the best way assembled images take place, as well as a complete misunderstanding of how "this garbage in the docker" works.
The VPS has a specific IP address where my server/website will be accessible. What happens if I want to change VPS? It turns out that my IP will change?

Within the same hosting provider, IP can be saved, but in general, you always need to be prepared for the fact that the IP will have to be changed (hello, Roskomnadzor!).
How to properly handle it? After all, the client part will be tied to the old IP.

Let them bind to a domain name, not an IP, and there will be no problems.
Do I still need to get a certificate on the VPS in order to connect via HTTPS?

Yes
How is it done correctly?

https://letsencrypt.org/en/
What security principles should be observed when working with a VPS to protect it from hacking?

DigitalOcean as a replacement for hosting. How to correctly configure everything?
PS Too many questions for one topic.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question