Here are the simplest steps needed to create a deployment from your local GIT repository to a remote server. Goal When you run , deploy the latest branch distribution to the server without preparations on the server-side. git push master Introduction In addition to writing code, indie developers need to think about the continuous delivery of their services. And often setting up a deployment pipeline is a non-trivial task: you need to set up Jenkins, Kubernetes, Git Hooks, and many other technologies. In addition to the fact that they require such a valuable programmer resource as the time needed for learning them, they also consume hardware resources. But what if I have a Linux server for several gigabytes where I want to place, for example, my small blog with zero configs? gradle-ssh-plugin As the plugin author, I promise that you will not find an easier way to deploy than this. Prerequisites If you have a remote Linux server you must have the file. id_rsa When setting up a remote Linux server, you’ll need to decide upon a method for securely connecting to it. While passwords are one way of verifying a user’s identity, passwords have multiple vulnerabilities and can be cracked by a brute force attack. ecure ell keys — better known as — are often used instead of passwords, as they offer a more secure method of connecting to remote Linux servers. As part of the Secure Shell cryptographic network protocol, SSH keys also enable users to securely perform network services over an unsecured network, such as delivering text-based commands to a remote server or configuring its services. S Sh SSH keys If you don’t have this key let’s create it - run this commands on your local machine: ssh-keygen -m PEM -t rsa -b 2048 chmod 400 ~/.ssh/id_rsa ssh-copy-id -i .ssh/id_rsa.pub root@host.domain Now you need to copy the file ~/.ssh/ from the local machine into the root of your project which you need to deploy. id_rsa 🎯 Quick start In root project file: build.gradle.kts plugins { id("online.colaba.ssh") version "1.8.17" } group = "online.colaba" That's all! After running a specific grade task your code distribution will be delivered to the remote server. This task will copy folders & files from local machine to remote host folder ~/${project.name}/... You can set host, or it will computed from (example above) project.group tasks { scp { host = "colaba.online" } } Run deploy task: gradle scp 🔮 Customization: Register new task in your : build.gradle.kts register("customSshTask", Ssh::class) { host = "my-domain.com" user = "root" gradle = true frontend = false docker = true nginx = true directory = "distribution" run = "cd ${project.name} && echo \$PWD" } Run this task: gradle customSshTask 🌀 Available Gradle tasks from plugin: ssh By default you have preconfigured tasks: - all options are by default ( ) ssh disabled false - all options are by default ( ) scp enabled true - copy needed files to remote server in every subproject ssh-gradle gradle - copy files to remote server ssh-docker docker - copy file to remote server in every subproject ssh-jars ${subproject}/build/libs/___.jar Example of tasks that will become available for your project: There will be as many tasks as Gradle subprojects. - copy distribution -file to remote server ssh-backend backend *.jar - copy folder to remote server ssh-frontend frontend - copy folder to remote server ssh-nginx nginx ... Name of service for all tasks equals to ${project.name} 📋 Project's structure example There could be as many backends as you need. project |-[backend] | - [src/main/java/build/libs]/*.jar | - Dockerfile | - Dockerfile.dev | - docker-compose.yml | - docker-compose.dev.yml | - ... |-[backend-2] | - [src/main/koltin/build/libs]/*.jar | - ... |-[backend-3] | - [src/main/scala/build/libs]/*.jar | - ... |-[frontend] | - docker-compose.yml | - ... |-[nginx] | - ... |-[postgres] | - [backups] | - ... |-[elastic] | - ... |-[static] | - ... |-[gradle] | - [wrapper] |- gradlew |- gradlew.bat |- docker-compose.yml |- ... A more detailed description of this plugin and examples will be in my next articles soon.