How do you move/ transfer a simple self-hosted Coder setup to a new server?
I don't have a lot on my Coder server - a few templates (easy to transition) but mainly due to my ignorance of how Coder works under the hood and lack of familiarity with Terraform, I'm struggling to find how to move or if I can move my Coder server to a new server. Mainly concerned with my Workspace persistent storage I would prefer to transfer over the workspace instead of rebuilding the workspace. Still learning about how to set up the template correctly so that transfers are less of an issue.
OS: Linux -> MacOS
Workspace in question is a Docker container, started from the example template.
7 Replies
<#1333495609490931722>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
hey
so for the Coder instance itself (settings, templates, etc), all you'd have to do is dump and restore the database
for the persistent volumes, you'll have to export and re-import them
hope this helps
Thanks, I ended up just looking into my docker image volume and pulling the files I needed. I didn't have much - just needed to pull files I hadn't put in github yet. Where could I find some documentation on the location of my Coder DB for self-hosted that I could export? To pull over the template I did it manually because I couldnt' find a way to export them only import them.
are you using a postgres database or the built-in postgres db?
built in
the data is stored in
~/.config/coderv2
you can copy it over to your new server
in your case it'll probably be /home/coder/.config/coderv2
Also after you have moved please also consider moving to an external DB.
https://coder.com/docs/admin/setup#migrating-from-the-built-in-database-to-an-external-database
Setup | Coder Docs
Configure user access to your control plane.