- Install Dropbox on your server
- Create a new Dropbox account
- Connect Kirby with Dropbox
- Share your folder
- Make some changes
- Uberspace user?
It’s possible to connect Kirby with Dropbox but you need your own server. It’s not possible on shared hosting (scroll down for an exception). You need to have a dedicated or virtual server with SSH access and the permissions to install things on it.
Please be aware that you need to know what you are doing in order to install stuff on your server. This tutorial is by no means a beginners guide to server administration and I’m not responsible if anything goes wrong. So follow this at your own risk :).
Install Dropbox on your server
Create a new Dropbox account
Dropbox will ask you to connect your Dropbox account with the client on your server.
It’s highly recommended that you create a new Dropbox account to link with your server. It might sound a bit annoying, but it’s all for the safety of your precious files in your regular Dropbox account. The Dropbox client on your server will have access to all your files on Dropbox and whenever someone hacks your server, they will be able to download all your files – not good!
Connect that new account to Dropbox on your server with the link, which is displayed in the terminal. You will get a brief success message. You can close the installation script and start your Dropbox client. From now on all the files and folders from your new account will be synced with the
~/Dropbox directory on your server. Pretty awesome, right?
Connect Kirby with Dropbox
After installing Kirby on your server, you need to link the content folder with your Dropbox folder. I suggest to do that with a symlink.
Let’s suppose your kirby site is installed in
/var/www/mykirbysite.com so your content folder is
To add a symlink to your
~/Dropbox folder do the following:
$ ln -s /var/www/mykirbysite.com/content ~/Dropbox/mykirbysite
If you open the Dropbox web interface now and login with your new account, you can see that the
mykirbysite folder contains all the folders and files from the Kirby content folder.
Share your folder
Since you’ve created that second account, to make sure you don’t give access to all files in our Dropbox, you won’t be able to administrate the content folder from your regular Dropbox folder on your computer—that sucks big time and ruins the entire awesomeness of Dropbox. But wait! It’s very easy to fix that.
Go to the Dropbox web interface and select the
mykirbysite folder. Click on the
share folder button and enter the email address of your regular Dropbox account.
You will now get a share request email from Dropbox, which you need to accept. Afterwards the
mykirbysite folder will also appear in your regular Dropbox and you can edit all files and folders directly form your computer. They will still sync magically with your server and you get a fully functional Dropbox-powered Kirby site.
Make some changes
It’s absolutely awesome to make changes to your local text files and see how your site gets updated online. And the best part: you gain full version control for your website content by Dropbox’s built in versioning.
Here’s the exception for getting this running on shared hosting for all German users: Uberspace.
It’s probably the best shared hosting you will ever get and even if it is shared hosting it’s very easy to get Dropbox running on it.