I'm just getting started with Umbraco. I have an Ubuntu host running Umbraco 12.1.2 in a docker with .NET 7. I'm learning how to setup a website framework and Umbraco sometimes starts throwing .NET errors and I have been bouncing the host to resolve them which is quite inefficient. What is the Linux command to stop and restart my Umbraco instance?
That depends very much on your hosting provider, usually they have some kind of dashboard to do these things. If you have ssh access then your site is probably installed as a service, your hosting provider can tell you more on how to restart this service.
My hosting provider is VMWare. I stood up an Ubuntu server 22.04 and installed the docker container on it. Yes, I have SSH into my machine. No, I didn't install a desktop.
Alright.. well, whomever installed the site to run on that server should probably also know how to restart it 😅
I am getting a feeling that it's you who set it up? Go back over the commands you followed and find the one where you start the site, typically that is done as a service, so you would probably do something like sudo systemctl restart MySite. But I think there's a few ways to set it up, so I am not sure what you did.
This is purely for me to experiment with and I will be googling loads and loads when something goes wrong because I have very little real experience with Linux.
FWIW I would not recommend running production sites on your own VM unless you know what you're doing. There's plenty of great hosting providers that can run your site and also give you a nice dashboard to help with things like restarting sites, rebooting servers, looking into logs etc.
I want to thank you for your suggestions. Yes, I was the one who installed and configured Ubuntu and installed Umbraco. My company has numerous datacenters around the world and we host our own content. We will not be using a third party to host the websites. I have found that, as long as I use the word 'Umbraco' in the name of my project, I can run:
ps -ef | grep Umbraco
This shows me four separate daemons running my Umbraco site.
I can then run:
I have read your blog that talks about running Umbraco as a system service. I have followed your instructions but ran into an issue. A line in your MyProject.service file shows this path:
/home/sebastiaan/testlive/MyProject.dll
The only equivalent path I can find in my instance is:
Does not start my site but simply errors out.
The command I use to start my site is:
sudo dotnet run --project /home/webuser/MyFirstUmbraco
I placed that command in my crontab to start when the vm starts.
I prefer to run Umbraco as a system service. What would be the correct line for me to use in MyFirstUmbraco.service?
What is the restart command for Umbraco in Linux?
Hello folks,
I'm just getting started with Umbraco. I have an Ubuntu host running Umbraco 12.1.2 in a docker with .NET 7. I'm learning how to setup a website framework and Umbraco sometimes starts throwing .NET errors and I have been bouncing the host to resolve them which is quite inefficient. What is the Linux command to stop and restart my Umbraco instance?
That depends very much on your hosting provider, usually they have some kind of dashboard to do these things. If you have ssh access then your site is probably installed as a service, your hosting provider can tell you more on how to restart this service.
My hosting provider is VMWare. I stood up an Ubuntu server 22.04 and installed the docker container on it. Yes, I have SSH into my machine. No, I didn't install a desktop.
To be clear, we are running VMWare in my company's own datacenter.
Alright.. well, whomever installed the site to run on that server should probably also know how to restart it 😅
I am getting a feeling that it's you who set it up? Go back over the commands you followed and find the one where you start the site, typically that is done as a service, so you would probably do something like
sudo systemctl restart MySite
. But I think there's a few ways to set it up, so I am not sure what you did.FYI: this is how I personally have done it, ignore that it's a Raspberry Pi, it just runs Ubuntu server. https://cultiv.nl/blog/how-i-run-this-very-website-on-a-raspberry-pi-in-my-closet-at-home/
This is purely for me to experiment with and I will be googling loads and loads when something goes wrong because I have very little real experience with Linux.
FWIW I would not recommend running production sites on your own VM unless you know what you're doing. There's plenty of great hosting providers that can run your site and also give you a nice dashboard to help with things like restarting sites, rebooting servers, looking into logs etc.
Hey Sebastiaan,
I want to thank you for your suggestions. Yes, I was the one who installed and configured Ubuntu and installed Umbraco. My company has numerous datacenters around the world and we host our own content. We will not be using a third party to host the websites. I have found that, as long as I use the word 'Umbraco' in the name of my project, I can run:
This shows me four separate daemons running my Umbraco site. I can then run:
To stop the site. I was really hoping there would be a Umbraco native command to just restart(HUP) the site but if there is, I cannot find it.
As we all know, you should never keep a dog and bark for yourself so, here's a much easier command to stop the site:
Now, might anyone know of a command that will allow me to get the site running and then return me to the command line? right now if I run:
It will hang the session to run Umbraco.
I need to get my bash session back after Umbraco starts. Any suggestions would be greatly appreciated.
Hey Sebastiaan,
I have read your blog that talks about running Umbraco as a system service. I have followed your instructions but ran into an issue. A line in your MyProject.service file shows this path:
The only equivalent path I can find in my instance is:
Running the full command path:
Does not start my site but simply errors out. The command I use to start my site is:
I placed that command in my crontab to start when the vm starts. I prefer to run Umbraco as a system service. What would be the correct line for me to use in MyFirstUmbraco.service?
is working on a reply...