--- authors: - Adrien Poupin date: 2016-11-01 linktitle: Deployment with rsync toc: true menu: main: parent: tutorials next: /tutorials/creating-a-new-theme prev: /tutorials/automated-deployments title: Easy deployments with rsync weight: 11 --- # How to build and deploy with hugo and rsync We assume here that you have an access to your web host with SSH. In that case, as you will see, deployment is very simple. We also assume that you have a functional static site with hugo installed. The spoil is, you can deploy your entire site with a command that looks like this: ```bash hugo && rsync -avz --delete public/ www-data@ftp.topologix.fr:~/www/ ``` As you will see, we put it in a shell script file, which makes building and deployment as easy as executing `./deploy`. ## Installing SSH Key If it is not done yet, we will make an automated way to SSH to your server. If you have already installed an SSH key, switch to the next section. First, install the ssh client. On Debian/Ubuntu/derivates, enter `sudo apt-get install openssh-client`. Then generate your ssh key by entering the following commands: ``` ~$ cd && mkdir .ssh & cd .ssh ~/.ssh/$ ssh-keygen -t rsa -q -C "For SSH" -f rsa_id ~/.ssh/$ cat >> config <