Back

[SOLVED] Self-hosting appwrite(docker) advice

  • 0
  • Tools
Osman
2 Aug, 2023, 13:41

Hello all, I am currently self-hosting my appwrite application using docker running on a ubuntu cloud server. I am generally unsure about how to structure a development/testing environment. I want to be able to start something like an emulator environment, where i can test and develope on a "copy" of the production environment. I have tried export/importing the appwrite docker volume tarballs, but import to my local machine either fails or crashes the appwrite server.

Should be noted that im quite new to docker and appwrite, so if anyone have any ideas or experince, it would be much appreciated. Thank you in advance.

TL;DR
The user wanted to create a development/testing environment for their self-hosted Appwrite application using Docker. They tried exporting/importing Docker volume tarballs, but encountered errors. The solution suggested was to backup on the server and export it to the local machine for restoration. Additionally, they were advised to check a Gist for backup and restore instructions, duplicate the server in the cloud for a dev environment (editing the domain in the `.env` file), or use VirtualBox and duplicity for backup and restoration. In the end, the user realized that flipping the paths from using "/" to "\" for Windows file paths solved their issue.
Binyamin
2 Aug, 2023, 13:51

Backup and restore You can check this gist https://gist.github.com/stnguyen90/fee636ff652b8ecbf761935b2aa254fb On how to backup and restore a self-hosted Appwrite

Duplicate server You can duplicate the whole server and have another one as your dev in the cloud. The downside is you're paying for another server If you doing so make sure to edit the domain in the .env file

Virtual box You can check into backup your remote server and restoring it to your local VirtualBox machine (On this topic I'll also recommend you'll check HashiCorp Vagrant).

You can achieve this by using duplicity check thisπŸ‘‡ https://help.ubuntu.com/community/DuplicityBackupHowto

Osman
3 Aug, 2023, 07:23

Thank you for your answer. Is the idea of backup and restore to create a backup on the server and then export it to my local machine, where i restore it?

safwan
3 Aug, 2023, 12:15

Pretty much.

If you have two machines DEV and PROD, you first need to make sure appwrite is installed on both the machines, and it's best to keep them on the same version.

In a scenario when you want to move from a local development to production, you would run the backup script on the DEV machine, and copy over the backup to the PROD machine, where you run the restore script.

https://www.youtube.com/watch?v=lM5yZEPtlvg

This video helped me out with the process, in case you prefer a video over reading. Let me know if you face any issues!

Osman
3 Aug, 2023, 15:23

Awesome, i'll take a look πŸ™‚

Osman
3 Aug, 2023, 15:42

Everything works fine when i backup/restore on my ubuntu server, but on windows(my local machine) i get the following errors on restore and backup respectively.

Osman
3 Aug, 2023, 16:48

Okay, i'll admit i asked GPT since im pretty green concerning all this.. But flipping the paths from using / to \ because of windows file paths, seems to have done the trick. Thank you all for your help.

safwan
3 Aug, 2023, 20:40

[SOLVED] Self-hosting appwrite(docker) advice

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more