Migrate UmbracoCMS from macOS development to a linux server
d
Hi people out there, I'm running a dev umbracoCMS installation locally on my Macbook Pro M1 and I wondered, how I can deploy it after development is finished to a linux server. I want a Linux server to avoid microsoft license fees and it should work simply on my local linux server at home as well. Which steps do I have to take to get it ready for live hosting? I asked this question firstly on Github and was told maybe people can help me here further. https://github.com/umbraco/UmbracoDocs/issues/5315#issuecomment-1645069134 Has anyone a guidline which steps do I have to take or further information about this topic? I'm kind new to Umbraco so bear with me if I didn't found the corect documentation if there is any but I think theres no documentation about how to deploy on a linux server at the moment. Kind regards, Daniel ๐Ÿ™‚
o
Hi Daniel. You can run your app in Linux with kestrel https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-7.0 because umbraco at the end of the day is just asp.net core. The tricky part is your database. Are you using a local sql server. You said that you are developing on a Mac arm machine, so, as me, you are working with one of 3 options: sql server on azure, SQLite or sql server with Linux docker image
Iโ€™ve never tried it before, but you can investigate how to get sql server for Linux working on your environment https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-ver16
d
@oalberto Thank you for your kind answer. At the moment I'm only developing with sqlite, but maybe in the future I have to switch to MS SQL Server on Linux. The SQL server shouldn't be the problem, rather I could find it difficult to copy local data from dev to live environment. Any tipps on how to roll with that? Wouldn't it make sense, to create a documentation on how to perfom live hosting with UmbracoCMS? Or a docker image which does all automatically with environment variables for faster and easier deployment? Can I do some good and help you people with anything like that? Kind regards, Daniel ๐Ÿ™‚
o
Iโ€™m not totally sure if a understand exactly whatโ€™s your problem, but if it is copying the data between the two environments, you can use a simple ftp on your Linux server and write a shell script to update everything. Creating a docker image can be a solution as well, but you have to prepare you live environment a little more I think ๐Ÿค”
d
@oalberto My problem is, there is at the moment no clear instruction for a "beginner" how to move from dev to live environment except for using paid services which umbraco cloud provides. I find it a bit fiddling to get all the information how to set up a live environment and copy the data from dev to live. But I'm also new to developing in aspnet core with UmbracoCMS. Wouldn't it make sense to provide a beginner friendly instruction to Umbraco's documentation? https://docs.umbraco.com/umbraco-cloud/set-up/set-up I'm searching for something like this except that I don't want to deploy into Umbraco Cloud but instead to my own linux server. I think at the moment there is no clear instructions for that, am I right? In my opinion it would make sense to create a simple one.
c
Hi Daniel, if it's any use, I develop on Linux Mint, though I tend to host on Shared hosting which is Windows as far as I know. But, here on my Linux dev machine, using Rider (I guess VS or VS Code would be similar) I just publish to a folder. If I then open that folder (or the folder with the project in it) in Terminal and type "dotnet run" it all builds and runs. So, I guess that's all you need to do on a Linux server as well. You don't need the TEMP folder at all as it will re-generate cleanly on first start. Having said that, I don't know how to actually set it up to serve out to the web (yet ;)). Maybe @AaronSadlerUK could give you some advice on that. As for the DB. If you're using SQLite, then just make sure you copy it over. IIRC it's in the umbraco/Data/Umbraco.sqlite.db. I have mixed feelings on SQLServer for Linux because it was great when it first came out, but they didn't keep up to date with Ubuntu's LTS's and so it's now a pig to install due to them being stuck on OpenSSL V1 (IIRC). So locally, if I need SQLServer, I use a Docker image and manage it with Azure Data Studio (which is awful compared to MSSQLMS as it's all scripts), but it runs quite well. MS have Docker images for MSSQL 2019 & 2022. And finally, just watch your capitalisations. I'm forever falling foul of other developer's typos. Lost count of the times I've had to report incorrect path strings preventing package installs. /umbraco isn't the same as /Umbraco, etc. Vendr Checkout was a recent one and I've just put another issue in on Umbraco Forms. One day it will all be truly cross platform. It mostly is now, but not quite 100% ๐Ÿ˜‰
d
@Craig100 Thank you so much, you helped me further quite a bit. In my opinion it could come handy to create in umbraco documentation a simple way with clear instructions. Maybe when I've my site compledted and put it online I'll try to provide one for other users with similar problems.... Daniel By the way I found by now a simple video which explains on how to deploy an aspnet core application. Slight modifications will be needed when deploying Umbraco. I guess this would make sense for a simple tutorial, is there someone out there to confirm this? Maybe I would have some spare time to write down the most important commands and then we could add the to the documentation it that makes sense?

https://www.youtube.com/watch?v=mkBYgwfOzdcโ–พ