Showing posts with label howtos. Show all posts
Showing posts with label howtos. Show all posts

Sunday, June 22, 2025

Immich on QNAP TVS-671

Hardware

  • Model: TVS-671
  • CPU: Intel(R) Core(TM) i3-4150 CPU, up to 3500 MHz (2 cores, 4 threads)
  • Total memory 16 GB (16 GB usable)
  • Firmware version: QTS 5.2.5.3145

Software

QNAP pre-configuration

  1. Enable SSH in QNAP
  2. Enable Container Station in QNAP
  3. Volumes
    1. Containers - Thick volume. RAID1. Where docker will be install. Also, it will be where immich-app folder will be placed.
    2. Storage - RAID5. Where immich library will be stored


  4. Shares
    1. Containers - Whrere immich-app folder will be located






    2. PhotosImmich - Where immich library will be located




Install Immich

Connect into machine

> ssh marky@192.168.26.60

Create immich-app folder in Containers volume

> cd /shares/Containers
> mkdir immich-app
> cd immich-app

Download docker-compose.yml  and .env files

> wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml

> wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env

Edit environment file

> vi example.env
> mv example.env .env

Install Immich 

> docker compose up -d 

Using Immich

Configure Immich

1. Storage Template 




2. External Libraries

> vi docker-compose.yml

Add the lines in blue to docker-compose.yml:

 volumes:
     # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
     - ${UPLOAD_LOCATION}:/usr/src/app/upload
     - /share/PhotosVol1:/share/PhotosVol1:ro
     - /share/PhotosVol2:/share/PhotosVol2:ro
     - /share/PhotosVol3:/share/PhotosVol3:ro

     - /etc/localtime:/etc/localtime:ro

docker compose up -d

Add to external library path via web interface



Upgrading Immich

> docker compose pull && docker compose up -d
> docker image prune

Backup immich's postgres database

docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=postgres | gzip > "/share/PhotosImmich/immich-library/backups/dump.sql.gz"


Restore immich's postgres database [WARNING!]

> docker compose down -v 
> docker compose pull
> docker compose create
> docker start immich_postgres
> sleep 10

> gunzip -c "/share/PhotosImmich/immich-library/backups/dump.sql.gz" | sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" | docker exec -i immich_postgres psql --dbname=postgres --username=postgres

> docker compose up -d


Materials

Immich installation files

  • .env
  • docker-compose.yml

Scripts 

  • status.sh

docker ps

  • start.sh

docker compose up -d

  • stop.sh

docker stop immich_server immich_machine_learning immich_postgres immich_redis

  • upgrade.sh

docker compose pull && docker compose up -d
> docker image prune

  • backup_db.sh

docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=postgres | gzip > "/share/PhotosImmich/immich-library/backups/dump.sql.gz"

  • delete.sh

docker compose down -v
> rm -rf postgres

  • restore_db.sh

docker compose down -v  # CAUTION! Deletes all Immich data to start from scratch
## Uncomment the next line and replace DB_DATA_LOCATION with your Postgres path to permanently reset the Postgres database
# rm -rf DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch
docker compose pull             # Update to latest version of Immich (if desired)
docker compose create           # Create Docker containers for Immich apps without running them
docker start immich_postgres    # Start Postgres server
sleep 10                        # Wait for Postgres server to start up
# Check the database user if you deviated from the default
gunzip -c "/share/PhotosImmich/immich-library/backups/dump.sql.gz" | sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true)
;/g" | docker exec -i immich_postgres psql --dbname=postgres --username=postgres  # Restore Backup
docker compose up -d            # Start remainder of Immich apps

References

Enable SSH on QNAP TVS-671 QTS 5.2

 

Enable SSH in QNAP

  1. Open Control Panel
  2. Navigate to Network & Files Services
  3. Telnet / SSH


Saturday, June 14, 2025

How to fix youtube playback on Firefox on Linux

about:config

media.wmf.zero-copy-nv12-textures ---> false

gfx.direct3d11.reuse-decoder-device ---> false


Reference:

  • https://www.youtube.com/live/0fiVciCs8zU?

Sunday, January 8, 2023

OpenVPN Server on Ubuntu 22.04 LTS Desktop VMWare Virtual Machine

Hardware & Software

  • Host: Windows 11
  • Host: VMWare Workstation Pro 18
  • Guest: Ubuntu 22.04 LTS Desktop
  • OpenVPN

VMWare Guest Configuration



  • VMWare Network: Bridged
  • Install Ubuntu 22.04 LTS Desktop
  • In Ubuntu, set Static IP Address (e.g. 192.168.26.60/24)

OpenVPN Server Installation

  • Update System
    • sudo apt update
    • sudo apt upgrade
  • Get OpenVPN
    • wget https://git.io/vpn -O openvpn-ubuntu-install.sh
    • chmod -v +x openvpn-ubuntu-install.sh
  • Install OpenVPN
    • sudo ./openvpn-ubuntu-install.sh
    • Public IP address or hostname: <your DDNS hostname>
    • Protocol: UDP
    • Port: 1194
    • DNS: 1.1.1.1
    • Client Name: phone
  • Additional options in /etc/openvpn/server/server.conf
    • duplicate-cn
    • client-to-client
  • Manage OpenVPN
    • sudo systemctl stop openvpn-server@server.service
    • sudo systemctl start openvpn-server@server.service
    • sudo systemctl restart openvpn-server@server.service

Configure Router / Gateway


OpenVPN Client Installation

  • Transfer /root/phone.ovpn to your device
  • Import phone.ovpn in OpenVPN

References:

  • https://www.cyberciti.biz/faq/ubuntu-20-04-lts-set-up-openvpn-server-in-5-minutes/


Monday, May 17, 2021

How to install Windows 10 Pro on Intel NUC 11 Enthusiast

From: https://www.tenforums.com/installation-upgrade/148707-can-you-install-windows-10-pro-instead-windows-10-home.html


Q: So is it possible to install windows 10 pro during a clean install of windows when windows 10 home is embedded on the motherboard of a computer?

A: Yes. Create a text file containing:


[Channel]
Retail


Name the file as ei.cfg and place it in the sources folder in the install media. This will make Setup skip looking for a key in the bios and ask you which edition to install.

Sunday, March 5, 2017

A better public DNS for FREE

TL;DR

Instead of using your ISP's DNS, use the faster and more reliable Google Public DNS instead: 8.8.8.8 and 8.8.4.4.

Your ISP's DNS

Like most people, I defaulted to using my ISP's DNS. For the most part, this works just fine. Until recently, we encountered various problems such as:
  1. Problems connecting to a specific website - This worked fine when I used my mobile network to connect instead.
  2. Slow to update - I made changes to my personal domain's DNS settings. It took forever to resolve to the right one. However, other parts of the world were already resolving this correctly.

Use Google Public DNS

Then my research pointed me to Google Public DNS here: https://developers.google.com/speed/public-dns/
Advantages:
  1. Google DNS is faster 
  2. It claims to have more security
  3. It's free! And nothing beats free.
Disadvantages:
  1. Yet another way Google is tracking you. But I'm sure you know resistance is futile.
  2. Ah, nothing else yet. I'll revisit this post when I think of another one.

How to use it

To try it out, I suggest configuring a single machine to use it. If you want all your machines to use it, simply change you router's DHCP settings to dispense these settings below. (Yes, I'm make a lot of assumptions here. But if I'm sure you know what I mean.)
Here are Google DNS servers IP addresses:
  • Primary DNS: 8.8.8.8
  • Secondary DNS: 8.8.4.4

Feedback

I'll try this out myself for a while and update the post as necessary. If you do have any feedback, please feel free to let me know. Thanks!

Monday, September 30, 2013

Screenshots on Mac OSX

Best resource I found about capturing screenshots on Mac OSX

Wednesday, May 5, 2010

How to change window border thickness in Ubuntu 10.04 (Gnome)

prompt%> sudo vi /usr/share/themes/Human/metacity-1/metacity-theme-1.xml

Change following values to 5 or higher:
<distance name="left_width" value="3"/>
<distance name="right_width" value="3"/>
<distance name="bottom_height" value="3"/>

Enjoy!

Sunday, December 6, 2009

Show Desktop Quick Launch in Windows 7

Old habits die hard. I understand. So, for those who have gotten used to going to the bottom-left cornet of your desktop and clicking the "Show Desktop" quick launch icon for years, here is some help in your transition to Windows 7.

First of all, the new show desktop is now on the bottom-right corner of the screen. See screen cap below. Of course, I know that won't satisfy you. =) So keep reading.



If you want to get the old fashioned "Show Desktop" icon on the bottom-left, here are the instructions:

Step 1:
Using notepad, create a file named "desktop.scf" with the contents below:

[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
Command=ToggleDesktop

In the Save dialog, select "All Files (*.*)" as file type. Then, save it to: "C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar".

Step 2:
Duplicate a shortcut on your desktop. Just do this using copy-paste. (I'm using Zoom Browser on my example. But you can use any other program.) Go to the shortcut properties and change the comment, name, and icon to your preferred icon. (You can use explorer.exe for the desktop icon.) Now, pin the shortcut you just created onto the taskbar.


Step 3:
Right-click on your new launcher, then right-click again onto the icon itself and bring up its properties. On the shortcut tab, change the Target to desktop.scf you created in Step 1. Click OK, and your done!


I hope this helps. Enjoy!

References:
Link1

Monday, August 31, 2009

The best iPhone bike mount

I recently (re)started on a new hobby: road biking. And given that I never go anywhere without my iPhone, of course I had to find a way to make most use of it on my bike.

I've been trying for days to find a decent bike mount (on ebay) but couldn't find one. So, I decided to make my own.

Components:
1) Broken iPhone leather case - Broke the top frame while pulling it out of my pocket. Happy I decided to keep it for a while.
2) Zip ties
3) (Optional) 1 cm diameter tube. I got this from a broken RC heli tail boom.


Tools:
1) Cutting knife
2) (Optional) Drill. I used a dremel rotary tool.

Steps:
1) Cut two holes into leather case. The distance between the holes should be the same as the width of your bike stem (one that attaches your handle bar).
2) (Optional) Cut the tube to your preferred length. Drill two holes of the same distance as your holes on the iPhone case.
3) Put it all together with zip ties.

Result:
(Click on pictures to enlarge.)








Hehehe! All of this from junk parts. Not bad eh?

Note:
Was worried it would still pop out, so I wrapped 1 rubber band around it. But, it may have been fine without it. Got 50 km with it on road and rough without any problems.

Enjoy!

Saturday, August 29, 2009

How to fix mouse not working after hibernate (USB device not recognized) on Windows 7

I've been having this problem since Vista. And, it's still happening on Windows 7. So, I decided to search around to find a solution. Here is the combined solution that worked for me:

1) Start Device Manager. This can be done (1) by right-clicking on My Computer and selecting Manage. Or (2) clicking the Start menu and typing device manager. Or (3) other ways.

2) Expand the Universal Serial Bus Controllers node.



3) For each instances of Generic USB Hub and USB Root Hub, right-click and go to Power Management tab.



4) Uncheck the option: Allow the computer to turn off this device to save power.

5) Repeat for ALL instances of Generic USB Hub and USB Root Hub.

6) Then, refresh everything by right-clicking and selecting Scan for Hardware Changes. Now, double-check all nodes you've changed and see if any has reverted back to the previous settings. On mine, one of the nodes kept resetting the power management. If this happens, just uncheck the box again and repeat the refresh until it sticks.

7) Retry sleeping or hibernating. It should now resume properly.



If that still doesn't work, you need to change some registry keys.

1) Open regedit. This can be done by clicking Start and typing regedit.

2) Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.

3) Add new key with name: USB

4) Add new DWORD Value. Name it: DisableSelectiveSuspend with value of 1.



5) Exit the registry editor.

6) Now try it again.

I hope this helps! Enjoy!

How to change location of special folders (My Documents, My Pictures, My Music, etc.) on Windows 7

Since the Windows 95 day, I've learned the habit of saving my profile data on a drive separate from the where the system is installed. This allows me to completely blow away (reformat) the OS without having to save my data everytime.

On Windows 7 (and Vista, if I remember correctly), this is made even simpler. Simply go to you profile folder where you see your special folders (My Documents, My Pictures, My Music, etc.).



Now, right-click on one of them and go to the location tab.

Browse to you new preferred location, and select Move.



You may have been prompted to merge the contents of you special folder. If you selected no, you may find that you will not have duplicate special folders. That's fine. Simply delete the one that points to the old one (the one on the system drive).

I hope this helps. Enjoy!

Thursday, August 27, 2009

How to remove/disable floppy drive on Windows 7

I don't think I've seen a physical floppy drive in years! But my system seems to still support it and even show it to me in the explorer window. Well, if you want to get rid if it, just follow the procedure below:

1) Open Device Manager. You can do this by clicking the start menu and typing device manager or by starting up devmgmt.msc.

2) Under your computer's name, look for the category named Floppy disk drives.

3) Right-click on the Floppy disk drive, and select disable.



That's it! You're done. No more annoying waits if you accidentally click it. And no more waste of screen real estate. Enjoy!

References:
  • reference 1
  • Saturday, August 1, 2009

    Enable emoticons (emoji) on iPhone 3.0





    Do you want to be able to send emoticons to your iPhone buddies? Here's how:

    1) Go to the App Store and look for the free app called: Spell Number.

    2) Start Spell Number and type the number blow, the hit return a few times. You can then close the application.



    3) Go to Settings->General->Keyboard, scroll down to Japanese, and enable Emoji.



    4) Now, go ahead and start typing. You can switch back and forth between your keyboards by pressing the internationalization button (Globe).





    If you have a Jailbroken iPhone, you may encounter some missing buttons like below. The left one is for switching, the right is the backspace key. They do work, but, no button is shown.



    Enjoy!

    References:
  • http://limitededitioniphone.com/emoji-activate-on-221-and-30-free/
  • Thursday, June 4, 2009

    How to run aptitute / apt-get via a proxy in Ubuntu Hardy and Jaunty

    I always have problems with this whenever I setup a new install. So, I decided to log it here.

    Add the following to your .bashrc:

    # -------------------------------------------------------------
    # Variables for apt-get
    export HTTP_PROXY="http://myproxy.mydomain.com:myportnumber/"
    export http_proxy="http://myproxy.mydomain.com:myportnumber/"
    export FTP_PROXY="http://myproxy.mydomain.com:myportnumber/"
    export ftp_proxy="http://myproxy.mydomain.com:myportnumber/"
    # -------------------------------------------------------------


    Enjoy!

    Saturday, May 23, 2009

    How to duplicate / clone virtual machine on VirtualBox

    To get around the limitations of VirtualBox's linear snapshots, what I decided to do was just clone the machine itself. Here's how to do it.



    VirtualBox doesn't really allow you to clone a machine. However, it does have a feature to clone a disk, which is pretty much the same thing. You can then easily use the disk to build the same machine.

    1) You need to merge the snapshots into the parent vdi file. To do this, turn off the machine. Open the Snapshot page of VirtualBox. If you want to include the current state, make a sapshot for it. Then, for each snapshot, select "Discard" snapshot. This will merge the changes into the parent disk.

    2) Use VBoxManage.exe's clonevdi feature on the disk you want to duplicate

    C:\Program Files\Sun\xVM VirtualBox>VBoxManage.exe clonevdi "C:\Users\Marky\.VirtualBox\HardDisks\XP.vdi" "C:\Users\Marky\.VirtualBox\HardDisks\XPvideo.vdi"
    VirtualBox Command Line Management Interface Version 2.2.2
    (C) 2005-2009 Sun Microsystems, Inc.
    All rights reserved.

    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Clone hard disk created in format 'VDI'. UUID: 8d143541-123e-4de0-ba2f-8f72b197a8f2


    3) In VirtualBox, create a new Virtual machine and point to the cloned hard disk.


    3) Start it up.
    That's it. You're done!

    References:
    Source
    Enjoy!

    Thursday, May 21, 2009

    Looking for VMware on Vista x64? Use VirtualBox!

    Well, I had my mind set on installing VMware and configuring a few virtual machines. So, I went ahead and downloaded the latest version of VMware server. After a long wait, to my disappointment, it wouldn't install! It doesn't look like VMWare supports Vista x64 as the host. Oh well, forget it!



    After seeing a demo of VirtualBox during the Java Developer Day conference a few days ago, I decided to try it out. If it's as good as they claim, then maybe this could be my answer? And true enough, it supports Vista x64 as a host and it pretty much supports all operating systems as a guest. (Except OSX, I think. Hmm... we'll see about that. *wink*)

    So, I suggest you give it a try as an alternative to VMware. It's working well for me so far. Here is the link.

    Update 2009-05-22:
    Hmm... after giving it a good test, I don't think I'm very happy with VirtualBox. Switching from gui mode to text mode on a Linux guest seems to mess up the mouse pointer. A Vista x64 guest caused it to crash. I had to restart my pc to kill the Virtualbox process. And snapshots are so limited in functionality compared to VMware. I might actually give VMware another try. Perhaps I was just doing it wrong the first time. Oh well...


    Enjoy!

    Tuesday, May 19, 2009

    Ubuntu 9.04 Jaunty Jackalope

    Well, Ubuntu 9.04 Jaunty Jacklope was just recently released. And I'm just about to download it and give it a go. Please stay tuned. I will be adding a few more HOWTOs for problems & solutions I encounter.

    In the mean time, why don't you try it out for yourself as well? Here's the link.



    Enjoy!

    Tuesday, April 7, 2009

    How to enable / disable word wrap in vim

    To enable wrapping, type:
    :set wrap

    To disable wrapping:
    :set nowrap

    Easy! Enjoy!

    Friday, April 3, 2009

    Blade 400 DX6i Binding Instructions

    Start with both transmitter and receiver turned off.
    1) Attach bind plug to Rx (heli)
    2) Turn on the Rx (heli)
    --> Light blinking means bind mode.
    3) Move sticks & switches to fail-safe positions (Transmitter)
    4) Hold the bind button while turning on the transmitter.
    --> Tx & Rx should bind after a few seconds. Light on Rx will be solid.
    5) Remove the bind plug (heli)
    Power off and back on if you want.