How to Set up a Raspberry Pi IV: Creating a .NET Core Website on Your Pi

Keep reading to find out how to set up your very own website on a Raspberry Pi.

Most websites that run on-premise production servers require a lot of hardware. If all you need is a dev site or something local that you want to tinker with, then a Raspberry Pi works just fine. In my case, I know this is only a local website. Also, there is only me and maybe one other person that will be able to access it. It’s also really good for creating an app with familiar web programming languages. Whatever your case, this is what I had to do to set up my very own website on the Raspberry Pi.

H3 Header

Keep in mind I don’t go through any DNS settings to make this available to the outside world since I only wanted mine available locally. There are no security concerns that I addressed here either, so you may have to customize what I did to enable that.

  1. Download .NET Core SDK. Go here to do that (This blog post came out when 3.1 was the latest stable release).

  2. You want to download the ARM32 version. As a side note, the Raspberry Pi 4 is technically a 64-bit architecture. However, the latest version of Debian runs on 32-bit OS, so you still need the 32-bit version. You only need ARM64 if you are running full Ubuntu on your Pi.
Download screen

3. This will direct you to the navigation page. Next, change the directory to Downloads by opening the terminal window and typing cd Downloads. 

4. To get the install script, scroll down on the browser you downloaded .NET from, and copy/paste the script into a terminal window. 

Install SDK

5. Press Enter to run the last command.

6. It doesn’t automatically make dotnet a global command, so you have to add that to Linux’s version of your PATH. To do this, open up .bashrc by typing, less ~/.bashrc.

7. Type, v.

8. Scroll down to the end of the file.

9. Type, export PATH=$PATH:$HOME/dotnet.

10. cntrl+X to exit.

11. Y to save.

12. Enter to confirm.

13. Q to quit less.

14. Close and reopen your terminal

15. Type in, dotnet –version 

Type in dotnet --version example

16. If it displays the latest version of dotnet, then you were successful! Now on to actually making your website!

Making your own website locally is one of the coolest ways to test your deployments and to tinker with your own development skills. Other people might think that you know a lot of stuff if you can show this off. So with that, I say, show off your brand new site with pride.

weightlifting gif

Subscribe to Our Blog

Stay up to date on what BizStream is doing and keep in the loop on the latest in marketing & technology.