I have two Ubuntu cloud servers (no GUI), two Ubuntu laptops (with GUI), and one Windows desktop. When I write web code, I like to have the code (in the www folder) synced on all my devices so that when I change the HTML file on my laptop, it automatically gets changed on the server (and on the other laptop). I know this is a horrible practice because it would allow me to mess up my web page(s), but I don't care because it's more convenient than SFTP-ing into my server each time I change a page. I also don't like having to commit and sync every little change when updating my personal code.

Is there any file sync software that can sync (the www folder) on all my servers/clients?

I want something that DOES NOT require me to install a GUI on my cloud servers.

My ideal file sync software would run on the Ubuntu terminal like so:

$: filesync /var/www -username -password


$: filesync /var/www MyCloudServer.net -password

where "MyCloudServer.net" acts as a synchronization/relay server.

Is there any software like that? And if not, is there any way to make it so that my laptop automatically SFTP's any changed HTML files in my /var/www folder to my server in real time without me having to click anything?


BitTorrent Sync

Install it on your client and your server and it'll keep folders of your choice in sync, complete with a sync history just in case there are mistakes.

Sync skips the cloud and finds the shortest path between devices when transferring data. No Cloud. No uploading to third party servers. Just fast, simple file syncing.

Sync can handle files of any size. Easily sync and share folders that contain gigabytes (or terabytes) of data.

Keep folders synced between multiple platforms and operating systems. Sync is available for OS X, Windows, Linux, NAS devices and more.

With your Ubuntu server, you can refer to this guide, but basically:

  1. Add a repository: add-apt-repository ppa:tuxpoldo/btsync
  2. Install it: apt-get update && apt-get install btsync
  3. Configure it by answering the series of questions it poses during installation. If you made any mistakes, just reconfigure (dpkg-reconfigure btsync)
  4. Give the btsync user permissions to access the folder you want to sync (chown you:btsync && chmod 775)

As you requested, there's no GUI per se, but it's easier to configure your syncing if you use the web interface. Running the btsync process establishes an interface at http://your_ip_or_domain:8888 that is authenticated with the username and password you specified during installation. You can then use this to manage the syncing of your folders.


Can I suggest that a much better way of working would be to use a version control system such as mercurial (hg) or git and when you are happy with your changes on one computer simply commit and push the repo, if your other machines have a chron task running that does a pull and update say every 10 minutes they will automatically be using the latest version within 10 minutes.

Using a VCS has many advantages and means that if you do mess up you can roll back the changes, commit the roll back possibly with additional changes, commit and push again then you are good to go.

Both hg and git are available for most platforms and they are pre-installed on many.

Any professional workflow should allow you to get back to how your work was before.

  • I hate git. I hate making commits. I hate typing in my password. I hate version control. Oct 2 '15 at 6:48
  • I would rather just have a daily back up and fall back to the last daily back up in case something goes wrong than waste my time typing in "git commit -m "none-of-your-business-I-just-needed-to-update-a-few-little-things-I-don't-think-I-have-to-type-in-anything-to-justify-changing-any-code-on-my-server" ". Every time I want to push and sync a little change. Oct 2 '15 at 6:52
  • 3
    Then I wish you and your employers luck - you will both need it. Have you ever heard of keyring? No need for passwords. Oct 2 '15 at 6:53
  • I mean for publishing and sharing code, I use git after a big change is finished (major version change, sharing code with friends, etc). Something that happens maybe once a month. To be totally honest, the only way I would ever use git for my own personal projects is if git automatically made a commit, pushed that commit to the server, and then pulled any changes that were made after each and every time I saved a text file. Oct 2 '15 at 6:55
  • 5
    "I hate git. I hate making commits. I hate typing in my password." While I cannot argue on the first for you (though I love git), I don't understand the latter: I have a Cron job setup that cares for me automatically, and never have to type the password (after the initial setup, that is). For your case, I'd even think about going one step further and check with GitAnnex – so you can define which files shall go where, and which everywhere.
    – Izzy
    Oct 2 '15 at 9:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.