Category: system admin

Run Postgres exposed to the internet

Although this is not recommended, there might be scenarios where there are no other options.

An example is an analysis software which doesn’t give the capability to connect via SSH. I came across this scenario when someone wanted to use QLik. Although this has a lot of capabilities, but when something like this is required, I’d rather use the open source and free Metabase.

Continue reading

Setup up READ_ONLY users on Postgres

To grant access to users for only viewing a database (i.e. no INESRTs or CREATE or UPDATE access) there are certain conditions.

First, access should be only allowed through ssh.

Second, the ssh user should not be able to get into a shell directly.

And finally, the database should restrict access to that particular user with relevant permissions.

Continue reading

PM2 – the best process manager

In the past, on my server I’ve installed Fossil, Syncthing, Bitwarden, Inlets. All these require some form of Process Management. These programs / processes / services need to be always running, so they are restarted in case they get terminated. Also, on a system restart these need to start up automatically.

I’ve mostly used Systemd or Supervisor to all these things.

However, I recently came across PM2 and I was really blown out of my mind as to how simple it was to set it up.

Continue reading

moving from LastPass to bitwarden using vaultwarden (bitwarden_rs)

I have been using LastPass for password management since like forever.

I became a paid customer in 2014. It was initially $1/month. Then it got hiked to $2/month and currently it stands at $3/month. That’s $36/year which was working out too much for me.

Furthermore, the free option is limited to a single type of device. Since I wanted to use it across desktops and mobiles, there was no option except for the $3/month plan.

I had been looking at bitwarden for quite some time now but read that it’s too resource heavy. I then came to know of biwarden_rs which is a rewrite of bitwarden in Rust and compatible with upstream Bitwarden clients. I had then forgotten about this for some time until I head the news of it being renamed to vaultwarden via a Reddit thread.

Continue reading

incomplete list of linux mail commands

As mentioned in the previous post, if you need to run cron jobs in linux, knowing how to debug them via mail is really important.

By the way, mail is the older program, the link above is to the man page of mailx which is the newer program created relatively recently, in 1986!

Navigating through messages in the mailbox is quite a challenge as I found.

So I decided to create a list of the commands which I used most frequently and found useful.

Continue reading

Use Wake-On-LAN to wake up another computer when your PC resumes

Starting up another computer on a network itself is such a fascinating idea! For me, it literally feels like magic!

There are so many things involved. The computer which needs to be started (or woken up) has to have the capability, both at the hardware and the software level.

Also the computer doing the waking needs to send a magic packet!

When I initially heard this, I honestly thought this was a joke of some kind. A magic packet? Really?

Continue reading

pipe localhost to the internet using inlets over Nginx

Many times during developing some application it becomes important to show the progress to someone over the internet.

Most of the time we end up using some screen sharing software. That, however, can only show my screen to the other person. They cannot really interact with the application.

We can use some software for remote desktop sharing but then I cannot work while the other person is using my screen.

One very nice solution is ngrok, which essentially creates a tunnel from the local system to ngrok’s servers and gives a nice URL.

ngrok

However, I was a bit concerned since all my traffic was getting redirected via ngrok’s servers.

I was looking around for something which would do the same thing but via my servers and finally came across inlets. This is an open source project, written in Go, which can be easily self hosted.

Continue reading

Copyright © 2024 the möbius trip

Theme by Anders NorenUp ↑