While cloud hosting can provide a reliable and economical alternative, this certainly was a very educational and rewarding journey. your connection could go down (again has happened) or even the electricity during a power-cut.the SD card could become corrupted (this happened to me).Someone could turn off your machine by accident (yes this happened) to me.and.īeware that self-hosting on your own hardware and connection is not without its risks. The only other thing you may want to do is to specific a startup task in crontab/init or systemd so that if you get a power-outage the blog will restart. So once pm2 is managing your blog, you shouldn't need to make any changes to the installation. For a very cool live view similar to 'top' type in pm2 monit. The output gives the total memory used, times the application had to restart and the total uptime. To view the status of the process pm2 list and to kill the process pm2 kill. Once installed start the ghost blog like this: export NODE_ENV=production Use Node's package manager npm to install either pm2 or forever these tools daemonize your node process and automatically restart it if it runs into any issues. What happens if there is an exception or error and the node.js process terminates? Well: "there is an app for that" (tm). And then some of the usual tasks such as setting up a host name etcĮxample installation: pacman -Sy base-devel nodejs.Installed the Node.js for ARMv7 binary to /usr/local/.This is need to compile the Node.js module for SQLite. Installed the base-devel package which gives a full build-chain for C.This may read as port forwarding or NAT on your router's admin page. Opened a port on my router to enable the outside world to view the blog.I went through these steps after preparing the SD card: It was the perfect choice for a server and I followed the instructions here: Arch Linux ARM installation instructions. I've measured a power draw of 1-2W meaning that this is going to be very cheap to run all year around 24/7.įor my OS I picked Arch Linux ARM which comes as a minimal base image with no additional UI components. The PI is running in my house plugged into the mains and my home router. This is the first post on my new ghost blog which is being hosted on a quad-core Raspberry PI Model B 2.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |