Posts

Showing posts with the label Selfhosted

Backup SQLite

The Writefreely instance running the current website is using SQLite database to store the content. SQLite is an embedded relational database which primarily ships as a library with bindings for a lot of programming languages. It also ships a helper command line utility sqlite3 which can be used to interact with database file. This tool can be used to take backup by calling .backup command.
$ cat backup.sh !#/bin/sh sqlite3 /path/to/writefreely.db ".backup /backup/path/backup.db" $ This is equivalent to SQL dump which can be imported in a new instance if need arises. The backup process can be configured to run everyday using cron daemon. The cron expression for taking backup at midnight 12 is 0 0 * * *. The following line can be added to cronjob to automate the process. 0 0 * * * ~/backup.sh Cron expressions for different time/frequency can be easily generated using the web-based tool called crontab.guru.
For offsite backups, the SQL dump can be copied to a remote machine usi…

Miniflux

On one of my explorations for Selfhosted software, I came across Miniflux. It is a very minimal feed reader web application. On little research I found out that it is a Golang rewrite of Miniflux v1 originally written in PHP. I have a sweet spot for Golang software specially web applications. Setting them up is really just a matter of installing binary and setting up a system service. I decided to give it a try so I went on the website and turns out the developers provide a hosted solution for just $15/year with a 15-day trial.

I registered on the hosted version to try it out. I really liked the minimal interface and utilitarian appearance which gets out of the way. It also comes with built-in integration with a lot of Read It Later services including Pocket, Instapaper and Wallabag.

After making my mind I decided to install it on the server. It needs PostgreSQL so I installed it from Debian repository and followed the installation guide. After setting it up, I created a sub-domain…

How to setup Git Server

GitGit is the leading version control system, currently used by most of the Open Source Softwares including Gnome and Linux Kernel to name a few. It basically helps developers maintain softwares with ease. It is considerably fast and reliable then other version control softwares. Git stores everything in repositories. To learn more about Git, check this awesome book by Scott Chacon and Ben Straub, Pro Git.
Hosted Git repositories A lot of componies promoting Open Source Softwares, provide hosted public git repositories for free. This repositories can be viewed by anyone, using Internet. Some of these companies also provide limited/unlimited private repositories, access of which is limited to authorized people only. Few of the most widely used of them are:
GithubGitlabBitbucket Why do you need git server? Sure, there are plenty of options out there, but some people prefer to host there own repositories for security and privacy purposes or for internal use only. For them, setting up git…