Code Server? reddit / selfhosted ---------------------------------------------------------------------- throwmewayawayawaya · 2023-12-23 01:36 Been hosting it for a while via unraid, but on each update wipes everything I've installed - languages, packages, etc. Is this just a sad part of life with this project, or is there a way to persist this data between updates? ---------------------------------------------------------------------- 1A655A9CEC05B28E04 · 2023-12-23 02:43 Are you using Docker bind mounts instead of volumes? ---------------------------------------------------------------------- adamshand · 2023-12-23 02:43 I'm not familiar with Unraid. However I'm guessing that that it's running in a Docker container and you don't have the data mounted in a Docker volume (or bind mount). ---------------------------------------------------------------------- wombweed · 2023-12-23 03:11 As others have pointed out this is because the packages and stuff get installed inside the container which gets wiped when you update it. Installing OS packages to a volume mount isn’t necessarily feasible, so to my knowledge your best option would be to build your own custom docker image based on the code-server image you’ve been using. That will enable it to install any OS packages you need at build time. But, then it becomes your responsibility to rebuild the image when a new release drops from upstream. When I realized that, I just switched to running code server in a VM which is more suitable for interactive updates and keeping things persistent without having to mess with docker images and registries and stuff ---------------------------------------------------------------------- QT31416 · 2023-12-23 03:35 You might need to add a Path (docker volume/mount). You need to point the folder inside your docker installation to a path on your server. ​ A little off-topic: any chance you're using it for jupyter notebooks? I can't make the code server work with ipynb. ---------------------------------------------------------------------- dually · 2023-12-23 04:04 It sounds like your needs would be better met by the far simpler system of persistent virtual machines instead of these capricious and ephemeral docker containers, which only really make sense at scale. You probably have better things to do with your time other than engineering around all the idiosyncrasies of this ephemeral system. ---------------------------------------------------------------------- uberduck · 2023-12-23 05:44 Never had an issue upgrading code server - you're probably not persisting data outside of docker volumes properly ---------------------------------------------------------------------- he-tried-his-best · 2023-12-23 08:46 Linux server.io images allow docker mods and I’m sure people use those to install additional packages for code server. Not tried it myself yet. ---------------------------------------------------------------------- lilolalu · 2023-12-23 10:02 https://docs.docker.com/storage/volumes/ ---------------------------------------------------------------------- SillyLilBear · 2023-12-23 10:13 Why do you run it? I use VS Code a lot, and was curious what benefit code server gives over just running the app since it is supported everywhere and the github settings sync is really helpful. ---------------------------------------------------------------------- protocolnebula · 2023-12-23 11:10 Check this, maybe helps you: https://gist.github.com/ProtocolNebula/458da252aa46ada23b4221572af1220 7 ---------------------------------------------------------------------- PrestigiousTrain9350 · 2023-12-23 11:49 I just had the same problem. You can check this. I added a script to install packages everytime the container runs. https://www.linuxserver.io/blog/2019-09-14-customizing-our-containers ---------------------------------------------------------------------- No_Lemon3249 · 2023-12-23 14:43 Persistent filesystem via docker volume and "persistent" packages via docker mods (https://github.com/linuxserver/docker-mods). Running well on my setup for more than a year with watchtower. Have fun ---------------------------------------------------------------------- athorio · 2023-12-23 15:10 yeah looks like your docker container is not persistent.