Why it’s not worth setting up a server yourself – even to save money

I recently made myself a pretty portfolio page in React. Now it was time to set up a server to host it. After some inspiration I went on a journey to set it up via Raspberry Pi. This felt like the truest way. Not gonna use some pesky easy-hosting on so…


This content originally appeared on DEV Community and was authored by Erik Karlsson

I recently made myself a pretty portfolio page in React. Now it was time to set up a server to host it. After some inspiration I went on a journey to set it up via Raspberry Pi. This felt like the truest way. Not gonna use some pesky easy-hosting on some GoDaddy-site, it was time to do it the real way.

So I ordered a sweet rpi 4 2gb starter kit, and I felt like a child on christmas. I was actually stuck with Windows on my Surface Laptop, for which there are no keyboard/mouse drivers for Linux -> so it was very nice to finally work in a GNU/Linux environment again.

After I received my Pi, I went through the jazz - downloaded everything I needed and - bear with me if you've not done this before, but I: set up a proxy to my localhost/npm-build in nginx, did port-forwarding in my router and set up the DNS records to point to my ip, together with a dynamic DNS service on CloudFlare to continously update my IP when it changes (sorry, no static IP unless you have a business account my ISP told me). This took some time, but it was a learning experience.

I also set up docker + docker compose for nginx proxy manager, a well-recommended admin tool that manages your nginx projects for you and does a free SSL for you called Let's Encrypt.

Then it hit me. I couldn't log in to the admin panel I just docker-composed. Somehow, it was a bad gateway (?). A big mystery, of which many other people had the exact same issue, and everyone had a different solution, if they had any. Some needed to change a tiny thing, like which DBMS they use, or a big thing, and some just neeeded to wait 10 minutes, or a day, and then it suddenly worked.

I literary spent the next 10 hours on this, seemingly tiny issue, to simply gain access to my own Admin Panel. It so happened that the documentation on the official site was incorrect for raspberry pies, and there actually was a proper way to do it for my tiny device. Well, I followed this excellent guide to the tea. I tried to log in to the admin panel again. Bad gateway.

This is how I felt in that moment.
(How I felt in that moment)

I knew if I really put my head down, and tried harder, it would work at some point. But, the thought came to me, I haven't used my free 1 year trial at Amazon Web Services. Why not give it a quick try?

So I created an account, set up AWS Amplify, and connected my github repository. Then I changed some things in the DNS records to connect it to the server and voilá. AWS did all the work for me, and automatically set up SSL, continous integration/delivery whenever I pushed to my main repository, and handling all the load balancing and DDoS protection for me. I didn't even have to lift a finger more than a couple times. And now it's up and running. For free. At least for a year...

Now, question, what should I do with my raspberry pi now?


This content originally appeared on DEV Community and was authored by Erik Karlsson


Print Share Comment Cite Upload Translate Updates
APA

Erik Karlsson | Sciencx (2021-06-13T19:32:17+00:00) Why it’s not worth setting up a server yourself – even to save money. Retrieved from https://www.scien.cx/2021/06/13/why-its-not-worth-setting-up-a-server-yourself-even-to-save-money/

MLA
" » Why it’s not worth setting up a server yourself – even to save money." Erik Karlsson | Sciencx - Sunday June 13, 2021, https://www.scien.cx/2021/06/13/why-its-not-worth-setting-up-a-server-yourself-even-to-save-money/
HARVARD
Erik Karlsson | Sciencx Sunday June 13, 2021 » Why it’s not worth setting up a server yourself – even to save money., viewed ,<https://www.scien.cx/2021/06/13/why-its-not-worth-setting-up-a-server-yourself-even-to-save-money/>
VANCOUVER
Erik Karlsson | Sciencx - » Why it’s not worth setting up a server yourself – even to save money. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/06/13/why-its-not-worth-setting-up-a-server-yourself-even-to-save-money/
CHICAGO
" » Why it’s not worth setting up a server yourself – even to save money." Erik Karlsson | Sciencx - Accessed . https://www.scien.cx/2021/06/13/why-its-not-worth-setting-up-a-server-yourself-even-to-save-money/
IEEE
" » Why it’s not worth setting up a server yourself – even to save money." Erik Karlsson | Sciencx [Online]. Available: https://www.scien.cx/2021/06/13/why-its-not-worth-setting-up-a-server-yourself-even-to-save-money/. [Accessed: ]
rf:citation
» Why it’s not worth setting up a server yourself – even to save money | Erik Karlsson | Sciencx | https://www.scien.cx/2021/06/13/why-its-not-worth-setting-up-a-server-yourself-even-to-save-money/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.