AKZN Notes

Archives for My Lazy and Forgetful Mind

Category: VPS

Using Github Workflow to Auto Deploy to VPS

original tutorial https://viandwi24.medium.com/github-actions-sederhana-untuk-testing-dan-deploy-ke-server-vps-a43976cd6f46#5752 make new linux user with limited access/no sudo edit the yml workflow name: CI-Deploy-serv3 on: push: branches: [ master ] workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: – uses: actions/checkout@v2 with: fetch-depth: '0' ref: 'master' – name: Deploy to Serv 3 Dwbz uses: appleboy/ssh-action@master with: host: ${{ secrets.HOST_GITHUBCI_SERV3DWBZ }} username: ${{ secrets.USERNAME_GITHUBCI_SERV3DWBZ }} […]

Docker Wireguard + Mikrotik

todo : make ip address obtained from docker-compose > hostnet static/persistent add clearer documentation about docker-compose > hostnet Installation Prequisities MIkrotik RouterOS v.7.1 and above Docker Wireguard Setup Make sure Docker is installed Using docker-compose # docker-compose.yml version: ‘3’ services: wireguard: image: lscr.io/linuxserver/wireguard container_name: wireguard cap_add: – NET_ADMIN – SYS_MODULE environment: – PUID=1000 – PGID=1000 […]

OpenVPN for Docker

This notes are taken from https://raw.githubusercontent.com/kylemanna/docker-openvpn/master/README.md. Edited to added some notes to make it easier for me to read and install on the near future OpenVPN server in a Docker container complete with an EasyRSA PKI CA. Extensively tested on Digital Ocean $5/mo node and has a corresponding Digital Ocean Community Tutorial. Installation Upstream Links […]

Codeigniter 3 with php 8.1

How to update your ci 3 version to 3.1.13 change config $config['sess_save_path'] = sys_get_temp_dir() add #[\ReturnTypeWillChange] before the open, read, write, close, destroy and gc functions in /system/libraries/Session/drivers/Session_files_driver.php example : #[\ReturnTypeWillChange] public function open($save_path, $name) { … update system/libraries/pagination.php line 526 from if ( ! ctype_digit($this->cur_page) OR ($this->use_page_numbers && (int) $this->cur_page === 0)) to if […]

Using Rclone to sync file to Google Drive on Ubuntu

As of now, Google has yet to release an official backup/sync client for Linux. The following write-up describes an approach for using an open source package, rclone, to automate backups from Linux to Google drive. Download/install rclone: To download/install rclone: $ cd $HOME $ curl https://rclone.org/install.sh | sudo bash … rclone v1.53.1 has successfully installed. […]

OpenVPN Client to Client Connection Configuration

follow this tutorial https://openvpn.net/community-resources/how-to/#scope dont forget to do step below how to add route (not persistent) on ubuntu example sudo ip route add 10.10.10.0/24 via 192.168.1.254 # Specific route sudo ip route add default via 192.168.1.254 # Default route (gw) how to add persistent route on ubuntu modify the /etc/network/interfaces file. $ sudo nano /etc/network/interfaces […]

Alpine Linux LAMP Installation Notes

Apache2 .htacess : makesure AllowOverride All on directory htdocs on httpd.conf PHP make sure all module installed Session : make sure session.save_path on php.ini is enabled SSL Letsencrypt make sure apache-ssl module installed sudo apk update & sudo apk upgrade & sudo apk add apache2-ssl sudo apk add certbot-apache sudo certbot certonly make site-avalaible conf […]

Freeradius + Daloapi + mikrotik

Daloapi setting install freeradius (with mysql) and daloradius daloradius need php-pear and php-db sudo apt-get install php-common php-gd php-curl php-mail php-mail-mime php-pear php-db sudo pear install db deploy daloapi from git, setting database as same with freeradius setting, make sure daloapi database migration is set. after git deployment .env.example to .env configure db credential to […]

How To Secure Apache with Let’s Encrypt on Ubuntu 20.04

source : https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-20-04 Introduction Let’s Encrypt is a Certificate Authority (CA) that facilitates obtaining and installing free TLS/SSL certificates, thereby enabling encrypted HTTPS on web servers. It simplifies the process by providing a software client, Certbot, that attempts to automate most (if not all) of the required steps. Currently, the entire process of obtaining and […]

Git deploy to VPS

for the impatients Set up the new bare repo on the server: $ ssh myserver.com Welcome to myserver.com! $ mkdir /var/git/myapp.git && cd /var/git/myapp.git $ git –bare init Initialized empty Git repository in /var/git/myapp.git $ exit Bye! Add the remote repository to your existing local git repo and push: $ cd ~/Sites/myapp $ git remote […]