Thursday, August 15, 2024

Setup a ProxMox Instance with NextCloud


 
Introduction

This article describes the steps I took to set up a ProxMox instance and then installed NextCloudPi in a container.

About ProxMox

From the ProxMox website: “Proxmox Virtual Environment is a complete open-source platform for enterprise virtualization. With the built-in web interface you can easily manage VMs and containers, software-defined storage and networking, high-availability clustering, and multiple out-of-the-box tools using a single solution.”

About NextCloud

NextCloud is an open source cloud software. You can install NextCloud on your own computer and have your own private cloud instance, and keep your (private) data in your control, visible only to you, and to those whom you authorize to access it.

Installation

  • Download ProxMox iso
  • Flash the iso into a USB drive as a bootable drive
    • I used EaseUS but it failed to install on the old Asus laptop with an error that it could not find the iso image
    • I re-flashed using Balena Etcher, and then the installation was successful
  • Plug the USB into the old Asus laptop
  • Turn the laptop on, and press the key to get to the sartup options
  • Select to boot from the USB
  • Go through the installation process
  • After installation, it showed the URL to use for accessing the ProxMox admin panel
  • Go to that URL by using an internet browser (Chrome, FireFox, etc) from another computer on the local network
  • Enter the login and password to get to the ProxMox control panel

Run the post-install helper script

ProxMox VE Helper Scripts is a crucial repository of helper scripts for ProxMox. For a community edition (no subscription) homelab instance, it is best to run the Post Install helper script. It disabled the nagging message urging you to subscribe, and makes a number of other helpful adjustments.

Note: It can be dangerous to run a script from the internet. You might want to inspect the script before running it, and run them at your own risk. I did not write these scripts, and I do not accept any responsibility for what the scripts do.

  • Open: ProxMox VE Helper Scripts
  • Expand Proxmox VE Tools and click on Proxmox VE Post Install

    • Copy the command and paste as text into the ProxMox shell window and wait for it to finish (answering “yes” (y) to all options presented during the process):
      bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pve-install.sh)"

Install NextCloudPi

The next step is to install NextCloud. Fortunately, the helper scripts contain a script that automates the tasks for installing and configuring NextCloud. It is called NextCloudPi. It also provides a managemnt page to manage the NextCloud instance.
  • On the ProxMox VE helper Scripts page from above, type NextCloud in the search box

  • Copy the command and paste as text into the ProxMox shell window and wait for it to finish (you may have to press yes to all the prompts):

    bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/nextcloudpi.sh)"
  • Visit the URL for NextCloudPi to manage the NextCloud instance.
  • Visit the NextCloud page and login as the admin username ncp and create user accounts for your users, including yourself.

Miscellaneous Setup

I have also set up some other things, which I might describe in another article:
  • Set up reverse proxy (via CloudFlare) so that I can access Nextcloud via the internet from anywhere
    • Add firewall rules using FirewallD to allow the above reverse proxy to work
  • Set up NextCloud and the NAS to backup NextCloud onto the NAS on a schedule
  • Upgrade the ProxMox hard drive to a bigger hard drive and give more disk space to NextCloud

Tuesday, April 2, 2024

Login to non-domain computer from a domain member computer

The Problem:

On Microsoft Windows 11 (maybe older windows too), that is a member of a domain, when using the Remote Desktop Client to login to a remote computer that is not a member of a domain, it keeps asking for the remote password. Either that, or it asks for the Windows Hello login (PIN), and then asks for the password, every time you connect, even if you check the checkbox to remember (i.e. save) the login credentials.

The Solution:

I found a nice way to get around the "problem" described above, by using the CmdKey command-line tool. The solution is to use the CmdKey command-line tool to add a "generic" login credential, replacing the "domain" login credential. After doing that, Remote Desktop Client starts to automatically log me into the remote computer, without going into a loop, asking for the password, or asking me to type the PIN and then the login/password every time I connect.

Here are the steps to replace the "domain" login credentials with the "generic" login credentials:

1. List all saved remote desktop credentials:

> cmdkey /list:TERMSRV/*

2. Delete credential for the target server <targetname>:

> cmdkey /delete:TERMSRV/<targetname>

3. Set generic credentials for the target server <targetname>:

> cmdkey /generic:TERMSRV/<targetname> /user:<username> /pass:<password>

4. List all saved remote desktop credentials to verify the above changes:

> cmdkey /list:TERMSRV/*

Now, start Remote Desktop Client and connect to the target computer, and surprise! It connects and logs you in automatically.

Ref: Windows 11 22H2 - Can't use saved credential (see the answer by informatik01 dated Feb 19, 2023, 10:49 AM)