If you're currently updating your website by dragging files into an SFTP client or SSH-ing into your server to run `git pull`, there's a faster way. Both methods work, but they're manual — you have to remember to do it every time, and it's easy to miss files or deploy the wrong version.

With [DeployHQ](https://www.deployhq.com), you can connect your GitHub repository to your SSH/SFTP server and trigger [automated SSH/SFTP deployments](https://www.deployhq.com/features/ssh-deployment) every time you push. No manual uploads, no forgotten files, no logging into servers.

This guide walks you through the full setup: connecting GitHub, configuring your SFTP server, running your first deployment, and enabling automatic deployments on push.

## What you'll need

- A [GitHub](https://github.com) repository with your project code
- An SSH/SFTP server (a VPS, dedicated server, or shared hosting with SSH access)
- A [DeployHQ account](https://www.deployhq.com/signup) (free plan available — 1 project, up to 10 deploys/day)

## Step 1: Create a new project in DeployHQ

After signing up, click the **New Project** button at the top of the screen.

![New project](https://blog.deployhq.com/attachment/7e7553d2-4d21-40bb-956e-af7dc19eba57/77qc-Ov-S.png)

Enter a name for your project and choose **GitHub** as the repository provider. [DeployHQ](https://www.deployhq.com) also supports [Bitbucket](https://www.deployhq.com/deploy-from-bitbucket), [GitLab](https://www.deployhq.com/deploy-from-gitlab), and manual repository configuration — the setup steps are the same regardless of which provider you choose.

## Step 2: Connect your GitHub repository

Once you click **Create Project** , you'll be prompted to log in to GitHub and authorize [DeployHQ](https://www.deployhq.com). After that, you'll see a list of repositories you have access to.

![Repository list](https://blog.deployhq.com/attachment/ed1df0f8-498c-45f6-9438-cacb6fe9a82a/2cv-DNAZ.png)

Select your repository. [DeployHQ](https://www.deployhq.com) will automatically add an SSH public key to access it. Keep the **add a webhook** option checked — this is what enables automatic deployments later.

## Step 3: Configure your SSH/SFTP server

After connecting your repository, you'll be directed to the **New Server** screen. Enter a name for your server, then choose **SSH/SFTP** as the protocol.

Enter your server details:

- **Hostname** : Your server's IP address or domain name
- **Username** : The SSH user (e.g., `deployhq`, `www-data`, or your hosting username)
- **Authentication** : Choose SSH key (recommended) or password

![SSH/SFTP details](https://blog.deployhq.com/attachment/0583f558-030a-4b35-b2ff-7f9e6a9e975f/Jmzx-Zw-V.png)

If you choose SSH key authentication, [DeployHQ](https://www.deployhq.com) generates a unique public key for your project. Copy it and add it to `~/.ssh/authorized_keys` on your server. Make sure the permissions are correct:

```
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
```

> **Tip** : If you run into authentication issues, see our [guide to debugging SSH connections](https://www.deployhq.com/blog/a-complete-guide-to-debugging-ssh-connections-for-developers) or the [server troubleshooting guide](https://www.deployhq.com/blog/troubleshooting-server-issues-with-deploy).

Set the **deployment path** to the directory where your files should go (e.g., `/var/www/html` or `public_html`). If you leave it blank, files will be deployed to the user's home directory.

Click **Create Server** to finish.

## Step 4: Run your first deployment

With your repository and server configured, click **Deploy for the first time** in the top right of your project.

![First deployment](https://blog.deployhq.com/attachment/b0c1bbb2-6f2f-471f-8a75-831a1cc0b29c/7i-BEe83.png)

Review the details — the server and branch are selected automatically. The start revision shows **The very first commit** (since nothing has been deployed yet), and the end revision is the latest commit on your branch.

Click **Deploy**. [DeployHQ](https://www.deployhq.com) will transfer all files to your server.

![First deployment complete](https://blog.deployhq.com/attachment/3d93456f-9795-4ffe-8041-a36d323d30ac/g-O1Eeb5.png)

Once complete, you can review the deployment log to see exactly which files were transferred.

## Step 5: Enable automatic deployments

This is where the real time savings come in. Go to the **Automatic Deployments** page in the left sidebar and enable it for your server:

![Auto deployment](https://blog.deployhq.com/attachment/0dd184d2-c5aa-4591-9da6-6cb69a345268/NFxb-Z0E.png)

Now, every time you `git push` to GitHub, [DeployHQ](https://www.deployhq.com) will automatically detect the new commits and deploy only the changed files to your server. No manual intervention needed.

After pushing a test commit, you can see the automatic deployment in action:

![New deployment](https://blog.deployhq.com/attachment/d7f33610-d4b4-4f5c-a951-f31a38c1458e/z3QH4Xe.png)

The deployment log shows which files were uploaded and confirms it was triggered automatically. On your server, the changes are live:

```
-rw-rw-r-- 1 deployhq deployhq 0 Mar 21 15:56 testfile
-rw-rw-r-- 1 deployhq deployhq 0 Mar 21 15:56 testfile2
```

That's it — you've replaced manual SFTP uploads with automatic, git-triggered deployments.

## What else can DeployHQ do?

Once you have basic deployments working, there are several features that can streamline your workflow further:

- **[Build pipelines](https://www.deployhq.com/blog/build-pipelines-in-deployhq-streamline-your-deployment-workflow)**: Compile Sass, TypeScript, or run `npm build` before deploying — no need to commit compiled assets to Git
- **[SSH commands](https://www.deployhq.com/support/ssh-commands)**: Run commands on your server after deployment (restart services, clear caches, run migrations)
- **[Excluded files](https://www.deployhq.com/support/excluded-files)**: Prevent specific files from being uploaded (e.g., `.env`, `node_modules`)
- **[Config files](https://www.deployhq.com/support/config-files)**: Manage server-specific configuration files outside your repository
- **[Deploy to multiple servers](https://www.deployhq.com/blog/deploying-to-multiple-servers-at-the-same-time)**: Push to staging and production from different branches

If you have any questions, drop us an email at [support@deployhq.com](mailto:support@deployhq.com) or find us on [Twitter/X](https://x.com/deployhq).

