# Syncing content on dokku server

**URL:** <https://forum.getkirby.com/t/syncing-content-on-dokku-server/5061>\
**Category:** Questions\
**Tags:** v2\
**Created:** [August 23, 2016, 9:13pm UTC](https://forum.getkirby.com/t/syncing-content-on-dokku-server/5061 "2016-08-23T21:13:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmintel](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mmintel/32/2811_2.png) [@mmintel](https://forum.getkirby.com/u/mmintel)\
**Post date:** [August 23, 2016, 9:13pm UTC](https://forum.getkirby.com/t/syncing-content-on-dokku-server/5061/1 "2016-08-23T21:13:25Z")

</div>

Hi there,

I am using dokku (like a selfhosted heroku). That means I can git push my kirby folder to my server and its automatically updated. However dokku doesnt initialize the project with git so its not possible to commit changes of the Content folder on the server.

So at the moment I have the problem that if i push changes from local to server all changes done on the server are overwritten. The solution I see for now is to remove the content folder from git but then I’d have no option to sync my local development with the server.

Do you have an idea? Somebody using heroku/dokku and having same problem or a solution?

Best regards  
Marc

---

<div class="post-metadata">

**Author:** ![pedroborges](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/pedroborges/32/7038_2.png) [@pedroborges](https://forum.getkirby.com/u/pedroborges)\
**Post date:** [August 23, 2016, 9:32pm UTC](https://forum.getkirby.com/t/syncing-content-on-dokku-server/5061/2 "2016-08-23T21:32:50Z")

</div>

I’m not familiar with Dokku, have you tried the Auto Git plugin? It automatically commits any changes made to content via Kirby’s panel.

It can even be used to deploy your site, bùt I guess Dokku already takes care of that.

---

<div class="post-metadata">

**Author:** ![mmintel](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mmintel/32/2811_2.png) [@mmintel](https://forum.getkirby.com/u/mmintel)\
**Post date:** [August 24, 2016, 7:56am UTC](https://forum.getkirby.com/t/syncing-content-on-dokku-server/5061/3 "2016-08-24T07:56:35Z")

</div>

Yes I tried it but that doesn’t work cause the project is not a git repo on my server.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [August 24, 2016, 8:02am UTC](https://forum.getkirby.com/t/syncing-content-on-dokku-server/5061/4 "2016-08-24T08:02:16Z")

</div>

Maybe you could use rsync to keep the content folders in sync?

---

<div class="post-metadata">

**Author:** ![pedroborges](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/pedroborges/32/7038_2.png) [@pedroborges](https://forum.getkirby.com/u/pedroborges)\
**Post date:** [August 24, 2016, 1:03pm UTC](https://forum.getkirby.com/t/syncing-content-on-dokku-server/5061/5 "2016-08-24T13:03:46Z")

</div>

I guess Dokku doesn’t initialise Git because it uses symlink to deploy with zero downtime. Does it offer any persistent storage solution?

Or maybe you could use the panel on a staging server and block it in production. That way the Dokku instance would be read only.

---

<div class="post-metadata">

**Author:** ![mmintel](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mmintel/32/2811_2.png) [@mmintel](https://forum.getkirby.com/u/mmintel)\
**Post date:** [August 25, 2016, 2:31pm UTC](https://forum.getkirby.com/t/syncing-content-on-dokku-server/5061/6 "2016-08-25T14:31:44Z")

</div>

thx @pedroborges “persistent storage” was the keyword I didnt know! I got it working and will write an article about using kirby with dokku in next days, cause there were some more things to consider. Will let you know

---

<div class="post-metadata">

**Author:** ![woudsma](https://avatars.discourse-cdn.com/v4/letter/w/57b2e6/32.png) [@woudsma](https://forum.getkirby.com/u/woudsma)\
**Post date:** [June 12, 2017, 8:48am UTC](https://forum.getkirby.com/t/syncing-content-on-dokku-server/5061/7 "2017-06-12T08:48:43Z")

</div>

@mmintel I’m experiencing similar issues as you describe when using Dokku + Kirby. I’m using [Dokku Persistent Storage](https://github.com/dokku/dokku/blob/master/docs/advanced-usage/persistent-storage.md) to prevent overwriting the `accounts` and `content` folder on deploy.

`$ dokku storage:list app-name` output:

```auto
app-name volume bind-mounts:
     /var/lib/dokku/data/storage/app-name/accounts:/app/site/accounts
     /var/lib/dokku/data/storage/app-name/content:/app/content

```

This is great, but i’d like my content to be stored in the git repo or synced with my local copy of the project. Had no success with Kirby-AutoGit so far. Do you have a link to your article?

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [June 12, 2017, 9:54am UTC](https://forum.getkirby.com/t/syncing-content-on-dokku-server/5061/8 "2017-06-12T09:54:49Z")

</div>

I use a bash script for this. Wouldnt take much to make it sync content in the other direction

> <https://gist.github.com/HashandSalt/90b55701827a2adf1bd086bdd22c4711>

---

<div class="post-metadata">

**Author:** ![woudsma](https://avatars.discourse-cdn.com/v4/letter/w/57b2e6/32.png) [@woudsma](https://forum.getkirby.com/u/woudsma)\
**Post date:** [June 15, 2017, 10:59pm UTC](https://forum.getkirby.com/t/syncing-content-on-dokku-server/5061/9 "2017-06-15T22:59:35Z")

</div>

Kirby + AutoGit on Dokku does seem to work!  
See [https://github.com/pedroborges/kirby-autogit/issues/19](https://github.com/pedroborges/kirby-autogit/issues/19)

Instructions:

> <https://gist.github.com/woudsma/df9cab0e53cf70aa31ca5b9d12fcc063>

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:35pm UTC](https://forum.getkirby.com/t/syncing-content-on-dokku-server/5061/10 "2025-02-06T17:35:31Z")

</div>

Archived on February 6, 2025, 5:35pm UTC


