Skip to content

Commit

Permalink
local images
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunkomath committed Jan 19, 2024
1 parent 823f781 commit 73081e7
Show file tree
Hide file tree
Showing 52 changed files with 45 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ If enabled properly you will see HDR settings inside Mac display settings.

Next, on your Mac, go to System Settings > Displays and update the settings as follows:

- Enable HDR for the external display.
- Select an sRGB color profile from the color profiles installed by the monitor driver.
- Refresh rate should be 60 Hertz.
> - Enable HDR for the external display.
> - Select an sRGB color profile from the color profiles installed by the monitor driver.
> - Refresh rate should be 60 Hertz.
![Monitor Settings](/images/monitor-settings.png "Monitor Settings")

Next, switch to Built-in display settings and disable True Tone (if its a Macbook).
> Next, switch to Built-in display settings and disable True Tone (if its a Macbook).
![Mac Settings](/images/mac-settings.png "Mac Settings")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
template: post
title: "Debugging ACM certificate stuck in 'Pending validation'"
date_published: 1666654043000
cover: https://images.unsplash.com/photo-1648337564744-f919c7c2fc02?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDM4fHxjZXJ0aWZpY2F0ZXxlbnwwfHx8fDE2NjY2ODg2MDU&ixlib=rb-4.0.3&q=80&w=2000
cover: /cover/acm.jpeg
---

>***TL;DR*** *My domain had a CNAME record pointing to Vercel, which had a CAA recording that prevented AWS from issuing certificates. The fix was to replace the* ***CNAME*** *record with an* ***A*** *record.*
![Debugging ACM certificate stuck in Pending validation](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040915187/61fab0e0-17b9-45c1-9596-5eb9f5d8cb40.png)
![Debugging ACM certificate stuck in Pending validation](/images/acm/domains.png)

I had an interesting encounter with **AWS Certificate Manager** (ACM) recently. There was this certificate issued by ACM which had been working and renewing fine for several years now, but all of a sudden it couldn't renew. I got the validation emails and I had successfully validated the renewal for both domains, but for some reason, the certificate just wouldn't renew, it was simply stuck with this error "**The status of this certificate renewal request is "Pending validation". Further action is needed to validate and approve the certificate renewal**".

At first, I thought it might be some weird delay with ACM validation and ignored it (the error was not useful), but then I got my final warning regarding renewal, I was about to lose the certificate, uh oh!

![Debugging ACM certificate stuck in Pending validation](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040916826/ab237e6d-87f6-47fe-97c3-2debba5c518e.png)
![Debugging ACM certificate stuck in Pending validation](/images/acm/thisisfine.png)

I spend some time trying to debug, there were several other reports of the same issue in AWS forums and the solution suggested by most folks was adding a DNS CAA entry. It made sense and so I added a CAA entry to the root domain and decided to wait. Sadly that didn't fix the issue.

Expand Down
6 changes: 3 additions & 3 deletions src/pages/fault-tolerant-home-lab-hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
template: post
title: "Fault tolerant home lab hosting"
date_published: 1663806443000
cover: https://cdn.hashnode.com/res/hashnode/image/upload/v1682040934961/a4c730b8-7925-41f5-8efa-6a4215ac9432.jpeg
cover: /cover/buttons.jpeg
---

I've been self-hosting stateless web services at my home lab for over two years now, so it's time to write about it. To be clear, I'm not implying this is the right method, it is what has worked best for me.
Expand All @@ -24,13 +24,13 @@ You can set this up by using [AWS App runner](https://aws.amazon.com/apprunner/?

I'm using AWS Cloudfront as it's cheap and can handle our failover logic, you could achieve the same setup using a Cloudflare load balancer, but it could cost more depending on your usage. Here is a neat diagram to explain the setup:

![Fault tolerant home lab hosting](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040932131/02c1c0f6-3544-4d07-850b-148ee20fd685.png)
![Fault tolerant home lab hosting](/images/homelab-hosting/cloudfront.png)

So go ahead and create a Cloudfront distribution for your web service, add your home lab web service URL as the origin and deploy it. Make sure it's up and update the DNS configuration (if required) so that your domain name points to CDN, once this is done, all your requests should be served via CDN.

Next, we will create another origin for our cloud instance, and then create an origin group to handle the failover, it will look like this:

![Fault tolerant home lab hosting](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040933711/e955cda1-7f23-4512-9516-4db9c456f1e3.png)
![Fault tolerant home lab hosting](/images/homelab-hosting/origins.png)

The final step is to update our distribution behaviour, we will update the default rule to use our origin group instead of the home lab one and it is done!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In a nutshell, the problem was the swarm ingress routing mesh with a bad MTU con

The Docker Daemon does not check the MTU of the outgoing connection and is by default set to 1500, my private network (using [Tailscale](https://tailscale.com/?ref=techulus.xyz)) on the hand only supports an MTU of 1280, you can find this by running `ip link` command.

![Fixing Docker MTU for private networks and VPNs](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040948447/8ed65b94-a568-4c86-b739-84445b548575.png)
![Fixing Docker MTU for private networks and VPNs](/images/mtu.png)

The solution is fairly straightforward, we have to update Docker network configuration to use the lower MTU and we can do this in two ways:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
template: post
title: "Free website monitoring with instant push notification alerts"
date_published: 1581377243000
cover: https://images.unsplash.com/photo-1573164713988-8665fc963095?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDN8fHNlcnZlcnxlbnwwfHx8fDE2NDIxNTAxMzM&ixlib=rb-1.2.1&q=80&w=2000
cover: /cover/servers.jpeg
---

In this article, I’ll help you set up a free and simple website monitoring tool which sends instant alerts using push notification. Before we begin, let’s have a look a what we will need:
Expand All @@ -18,7 +18,7 @@ What is a website monitoring service? It’s simply a tool that lets us check if

Before we start, make sure you’ve set up your account at [push.techulus.com](https://push.techulus.com/?ref=techulus.xyz), installed the app on your device and copied the API key.

![Free website monitoring with instant push notification alerts](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040987613/e54df284-9e39-4c45-b6f9-48db05730bce.png)
![Free website monitoring with instant push notification alerts](/images/push/web.jpeg)

Get the API key from Push console

Expand Down Expand Up @@ -62,7 +62,7 @@ All you need to do is, download this script into your machine or server and keep

The script tries to load our website and if it fails (the server doesn’t respond with status code 200 OK), we assume that something has gone wrong and trigger a push notification.

![Free website monitoring with instant push notification alerts](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040989386/5797e4f3-8afa-4f73-8a40-73604a1b68e7.jpeg)
![Free website monitoring with instant push notification alerts](/images/push/notification.jpeg)

Make sure you run this script frequently so that we can be alerted on time. To run this script every minute using *cronjob*, we can add the following command to *crontab*. Open crontab using the command

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ template: post
title: "Hosting public services on your home server using NGINX and Tailscale"
date_published: 1643930843000
featured: true
cover: https://images.unsplash.com/photo-1504639725590-34d0984388bd?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDcyfHx3ZWIlMjBzdGFydHVwfGVufDB8fHx8MTY0MjMxMTkzMQ&ixlib=rb-1.2.1&q=80&w=2000
cover: /cover/glasses.jpeg
---

In a previous [article](https://techulus.xyz/how-to-setup-remote-access-to-home-server-using-tailscale/), we discussed how to set up remote access to home-lab via private VPN with the help of Tailscale. Today we are going to extend that set-up to make some services available publicly such as a blog or a web server.
Expand Down Expand Up @@ -35,7 +35,7 @@ sudo apt update sudo apt install nginx

You can verify the installation by opening the public IP of the virtual machine in your browser, you should see NGINX default welcome page.

![Hosting public services on your home server using NGINX and Tailscale](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040940700/4671d710-8287-498b-9940-0741cf55309f.png)
![Hosting public services on your home server using NGINX and Tailscale](/images/nginx.png)

💡 If you have a domain name, make sure its DNS is configured properly to reach our NGINX server via an A record that points to the virtual machine's public IP address. Here is a nice tutorial video I found on [YouTube](https://www.youtube.com/watch?v=QcNBLSSn8Vg&ref=techulus.xyz).

Expand Down Expand Up @@ -79,7 +79,7 @@ To make sure the access is secure we've to ensure that every component in the ne
* Use Tailscale ACL to block all ports except the port in which the web service is running.
![Hosting public services on your home server using NGINX and Tailscale](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040942145/4b45b783-040e-4025-808b-45e3f4eb9d53.png)
![Hosting public services on your home server using NGINX and Tailscale](/images/tailscale.png)
Tailscale ACL restricting communication between devices under tag:tower to just port 8080
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ template: post
title: "How I Built a Serverless API to Optimize User-Uploaded Images on the Fly"
date_published: 1681950443000
featured: true
cover: https://images.unsplash.com/photo-1581092918056-0c4c3acd3789?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDl8fGZpeHxlbnwwfHx8fDE2ODE5ODU1NjQ&ixlib=rb-4.0.3&q=80&w=2000
cover: /cover/tinker.jpeg
---

Optimizing images for the web is a crucial step in improving the performance and user experience of a website. However, it can be challenging to optimize user-uploaded images when you don't know their dimensions in advance. This is where server-side image processing comes in handy.
Expand Down
12 changes: 6 additions & 6 deletions src/pages/how-to-get-push-notifications-from-github.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
template: post
title: "How to: Get push notifications from GitHub"
date_published: 1573428443000
cover: https://images.unsplash.com/photo-1584091377126-3817650725fc?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDN8fG5vdGlmaWNhdGlvbnxlbnwwfHx8fDE2NDIxNDk2NjI&ixlib=rb-1.2.1&q=80&w=2000
cover: /cover/phone-notifications.jpeg
---

If you’ve got a mobile phone, then you probably know what push notifications are. A [push notification](https://www.twilio.com/docs/glossary/what-is-push-notification?ref=techulus.xyz) (also known as a server push notification) is the delivery of information to a computing device from an application server where the request for the transaction is started by the server rather than by an explicit request from the client. Basically, it’s these bubbles that pop up on your device.
Expand All @@ -15,15 +15,15 @@ In this article, we’ll be discussing how we can get notifications from GitHub

We will setup a real-time push notification workflow using [GitHub actions](https://github.com/marketplace/actions/send-push-notification?ref=techulus.xyz) (FYI, we could do the same using [Zapier integration](https://zapier.com/platform/public-invite/7743/eacfd29c4087cb67e7798c9876698682/?ref=techulus.xyz) also). Before we start, make sure you’ve setup your account at [push.techulus.com](https://push.techulus.com/?ref=techulus.xyz), installed the app on your device and copied the API key.

![How to: Get push notifications from GitHub](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040995598/d159355f-059a-476c-93ac-f3b4872ffc2b.png)
![How to: Get push notifications from GitHub](/images/push/web.jpeg)

Get the API key from Push console.

Now that we have everything ready, let’s create our workflow on GitHub. We will create a workflow that sends a push notification whenever there is a new issue in our repository.

**Step 1.** Open your GitHub repository page (I will use this repository [https://github.com/arjunkomath/ama](https://github.com/arjunkomath/ama?ref=techulus.xyz)) and go to **Actions** page.

![How to: Get push notifications from GitHub](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040996680/7a09a9e2-7dea-4b7c-9250-c10d585e5c8c.png)
![How to: Get push notifications from GitHub](/images/ama/arjun.png)

**Step 2.** To create a new workflow click on “New workflow” or “Set up a workflow yourself” button. Now GitHub will draft a new workflow for you with an `echo Hello, world!` command. Let’s change this and add our custom action.

Expand Down Expand Up @@ -58,17 +58,17 @@ Commit this file to master and we have created our workflow! 🎉

**Step 4.** Before testing the notification we have to create a secret to store our `API_KEY` . Open your repository settings and go to secrets tab and then click on **Add a new secret.**

![How to: Get push notifications from GitHub](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040998212/7e370cdb-d66a-465b-a5ce-24af9f140027.png)
![How to: Get push notifications from GitHub](/images/ama/secrets.png)

### **Add a new secret**

Enter the name as `PUSH_API_KEY` (we specified this in our workflow using `secrets.PUSH_API_KEY` ) and enter the API key you copied from push console as the value. Click on **Add secret** and we’re done!

![How to: Get push notifications from GitHub](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040999342/06e4b719-e864-4e7b-b2ec-b9035a149808.png)
![How to: Get push notifications from GitHub](/images/ama/secrets_2.png)

Time to test our workflow, create a new issue in your repository and momentarily you should get the notification on your device.

![How to: Get push notifications from GitHub](https://cdn.hashnode.com/res/hashnode/image/upload/v1682041000935/e193888c-92fe-48d2-bb80-372d30a5910d.png)
![How to: Get push notifications from GitHub](/images/ama/notification.png)

We can reuse the same action to implement different notifications based on different triggers. You can find more examples on the marketplace page [https://github.com/marketplace/actions/send-push-notification](https://github.com/marketplace/actions/send-push-notification?ref=techulus.xyz).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
template: post
title: "How to setup remote access to home server using Tailscale"
date_published: 1642202843000
cover: https://images.unsplash.com/photo-1502945015378-0e284ca1a5be?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDM4fHxyZW1vdGUlMjB3b3JrfGVufDB8fHx8MTY0MjI0NDAzNA&ixlib=rb-1.2.1&q=80&w=2000
cover: /cover/plant.jpeg
---

In this tutorial, we're going to set up secure remote access to our home servers/lab via the internet without using a static IP or Dynamic DNS with the help of [Tailscale](https://tailscale.com/?ref=techulus.xyz). We will need two things to make this work:
Expand All @@ -28,17 +28,17 @@ Once the installation has been completed you can test the network by checking it

`tailscale status`

![How to setup remote access to home server using Tailscale](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040976823/88abdf02-7ee6-4daa-86ed-ea1f69251ea1.png)
![How to setup remote access to home server using Tailscale](/images/tailscale/1.png)

On Mac you can find the devices using Tailscale app:

![How to setup remote access to home server using Tailscale](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040978798/85db0779-d908-4916-84d7-62baa945a561.png)
![How to setup remote access to home server using Tailscale](/images/tailscale/2.png)

You can also try pinging a device using:

`tailscale ping ip|name`

![How to setup remote access to home server using Tailscale](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040980078/3fd19ab4-21c5-4bf7-8575-ecfb2be7f621.png)
![How to setup remote access to home server using Tailscale](/images/tailscale/3.png)

And that's pretty much it, you've successfully set up networking between your devices. But we can do a few more things to make this setup nicer.

Expand All @@ -56,6 +56,6 @@ Once you've done that do to the DNS tab in Tailscale and add global nameservers.

By default, Tailscale authentication keys expire after a certain period and we've to reauthenticate the machines. This is fine with our devices which we interact with all the time but it is annoying to do the same on our server. To fix this you can disable key expiry on your server from the Tailscale dashboard. Note that when we do this the servers have a perpetual authentication, so anyone who has access to the server has access to your network.

![How to setup remote access to home server using Tailscale](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040980987/7ef1e42d-e822-4acc-aaee-78fb7f950039.png)
![How to setup remote access to home server using Tailscale](/images/tailscale/4.png)

In the next tutorial, I'll discuss steps for setting up an actual domain name and making services public securely with the help of Tailscale ACL.
4 changes: 2 additions & 2 deletions src/pages/how-to-unraid-flash-backup-to-cloud-drive.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ template: post
title: "How to: Backup UNRAID flash to cloud drive"
date_published: 1666567643000
featured: true
cover: https://images.unsplash.com/photo-1589532768434-a92c95dad7cb?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDZ8fGJhY2t1cHxlbnwwfHx8fDE2NjY2MTY5NTU&ixlib=rb-4.0.3&q=80&w=2000
cover: /cover/sd.jpeg
---

Recently while trying to downgrade my UNRAID OS, I completely messed up my server, and the worst part, I did not have a backup of my flash drive. I had to set up my whole server again, lesson learned!
Expand Down Expand Up @@ -57,4 +57,4 @@ The `tar` command creates our flash backup archive. Next, we remove archives old

The last step is to make sure our script runs every day, so go back to user scripts, next to the new script we created you should see a dropdown that says 'Schedule disabled'. Change that to schedule daily and we're done!

![How to: Backup UNRAID flash to cloud drive](https://cdn.hashnode.com/res/hashnode/image/upload/v1682040924551/1c9535ef-4654-4d5c-abae-68cc6c160861.png)
![How to: Backup UNRAID flash to cloud drive](/images/unraid.png)
Loading

0 comments on commit 73081e7

Please sign in to comment.