tteck / Proxmox

Proxmox VE Helper-Scripts
https://Helper-Scripts.com
MIT License
13.11k stars 2.02k forks source link

Nextcloud not installing Nextcloudpi scripts? #542

Closed nacho-domatix closed 2 years ago

nacho-domatix commented 2 years ago

I tried already the script, it gives me a clean installation of Nextcloud, but it misses the pi scripts. Therefore I'm not having passwords for Nextcloud, wizard for setup or even the admin webpage (at 4443 port).

imagen

Not sure if I'm doing something wrong. Installation seems to be ok.

imagen

To enter the server I changed the local /etc/hosts so I don't even have to modify /var/www/nextcloud/config/config.php

It's pretty much what I had using the nextcloudpi script on a clean debian machine. I'm starting to think I have some issue with my Proxmox (even I don't have problems with any other CT) :(

nacho-domatix commented 2 years ago

I tried in another Proxmox server. Funny thing: entering by ssh is unable to find the scripts, but using xterm.js is fine.

Anyway, the installation skips the NextcloudPi wizard (with the passwords and all), and redirects to a Nextcloud instance (asking user/pass).

I'll keep trying.

tteck commented 2 years ago

No issues here. All done in the Proxmox shell / NextCloudPi LXC console, NO SSH

    _   __          __  ________                ______  _ 
   / | / /__  _  __/ /_/ ____/ /___  __v4______/ / __ \(_)
  /  |/ / _ \| |/_/ __/ /   / / __ \/ / / / __  / /_/ / / 
 / /|  /  __/>  </ /_/ /___/ / /_/ / /_/ / /_/ / ____/ /  
/_/ |_/\___/_/|_|\__/\____/_/\____/\__,_/\__,_/_/   /_/   

Using Advanced Settings
Using Container Type: 0
Using Root Password: Automatic Login
Using Container ID: 101
Using Hostname: nextcloudpi
Using Disk Size: 8
Allocated Cores: 2
Allocated RAM: 2048
Using Bridge: vmbr0
Using IP Address: 192.168.86.252/24
Using Gateway IP Address: 192.168.86.1
Using MAC Address: Default
Using Vlan: Default
Creating a NextCloudPi LXC using the above advanced settings
 ✓ Using local for Template Storage.
 ✓ Using local-lvm for Container Storage.
 ✓ Updated LXC Template List
 ✓ LXC Container 101 was successfully created.
 ✓ Started LXC Container
 ✓ Set up Container OS
 ✓ Network Connected: 192.168.86.252 
 ✓ Internet Connected
 ✓ DNS Resolved github.com to 140.82.113.4
 ✓ Updated Container OS
 ✓ Installed Dependencies
 ✓ Installed NextCloudPi
 ✓ Customized Container
 ✓ Cleaned
 ✓ Completed Successfully!

NextCloudPi Setup should be reachable by going to the following URL.
         https://192.168.86.252/ 

NextCloudPi LXC console sudo ncp-config

NextCloudPi configuration ver.  v1.50.0

  ┌────────────────────────────┤ NextCloudPi Configuration Tool (ncp-config) ├────────────────────────────┐
  │ Select ncp-app to configure or activate:                                                              │
  │                                                                                                       │
  │                                               BACKUPS                                                 │
  │                                               CONFIG                                                  │
  │                                               NETWORKING                                              │
  │                                               SECURITY                                                │
  │                                               SYSTEM                                                  │
  │                                               TOOLS                                                   │
  │                                               UPDATES                                                 │
  │                                                                                                       │
  │                                                                                                       │
  │                                                                                                       │
  │                                                                                                       │
  │                                                                                                       │
  │                                                                                                       │
  │                                                                                                       │
  │                             <Select>                             <Finish>                             │
  │                                                                                                       │
  └───────────────────────────────────────────────────────────────────────────────────────────────────────┘

Select CONFIG

NextCloudPi configuration ver.  v1.50.0

  ┌────────────────────────────┤ NextCloudPi Configuration Tool (ncp-config) ├────────────────────────────┐
  │ Select ncp-app to configure or activate:                                                              │
  │                                                                                                       │
  │          nc-admin           Change or view the current password for the Nextcloud admin user          │
  │        * nc-httpsonly       Force HTTPS                                                               │
  │          nc-init            (Re)initiate Nextcloud to a clean configuration                   ▒       │
  │          nc-limits          Configure system limits for NextCloudPi                           ▒       │
  │          nc-nextcloud       Install any NextCloud version                                     ▒       │
  │          nc-passwd          Change password for the NextCloudPi Panel                         ▒       │
  │          nc-prettyURL       Set pretty URLs (no index.php in URL)                             ▒       │
  │        * nc-previews-auto   Periodically generate previews for the gallery                    ▒       │
  │          nc-scan-auto       Periodically scan NC for externally modified files                ▒       │
  │          nc-trusted-domains Manually add trusted domains                                              │
  │                                                                                                       │
  │                                                                                                       │
  │                                                                                                       │
  │                                                                                                       │
  │                             <Select>                             <Back>                               │
  │                                                                                                       │
  └───────────────────────────────────────────────────────────────────────────────────────────────────────┘

Select nc-trusted-domains

 NextCloudPi installer configuration

                     Enter configuration for nc-trusted-domains                          

                      DOMAIN1       0.0.0.0                                              
                      DOMAIN2                                                            
                      DOMAIN3                                                            

                                       <Start >          <Cancel>                        

Enter 0.0.0.0 < Start > Back to Command Prompt run sudo service apache2 restart Open browser, go to https:// IP/ Screenshot 2022-09-23 8 14 07 AM

nacho-domatix commented 2 years ago

Ok, totally my fault, I guess cause I was missing sudo service apache2 restart

Now works great!! As always!! :)

Thank you very very much :)

nacho-domatix commented 2 years ago

Not the same issue, but related to NCP.

When following the wizard, gives me back this: imagen And this imagen So I can't really choose the folder of files.

Might be something related with original script, which does not behave good with LXC for some reasons (it did perfectly fine before!).

tteck commented 2 years ago

Do you have USB passthrough configured?

nacho-domatix commented 2 years ago

Not exactly, I'm trying to cheat the server by mounting directly the hard drive (Proxmox host), but in /media folder.

Anyway, even I skip this step, fail2ban also fails :(

tteck commented 2 years ago

FWIW, using NextCloud backup to USB is pointless when you can (should) backup the whole container in Proxmox. fail2ban should be setup in the LXC console, not using NexCloudPi (in this use case)

In Proxmox I created a directory mkdir -p /mnt/nextcloud/usb then went to Datacenter and Add Directory

Screenshot 2022-09-23 2 12 17 PM

I plugged in a 120GB SSD USB drive in Proxmox.

Screenshot 2022-09-23 2 17 44 PM

Mount the drive to the directory mount /dev/sdb1 /mnt/nextcloud/usb

Next I add the mount to NextCloudPi LXC. In the Proxmox Shell nano /etc/pve/lxc/102.conf add mp0: /mnt/nextcloud/usb,mp=/mnt/nextcloud reboot NextCloudPi LXC

In the NextCloudPi LXC console I checked

root@nextcloud:~# cd /mnt/nextcloud
root@nextcloud:/mnt/nextcloud# ls
dump
root@nextcloud:/mnt/nextcloud# 

dump is there because I set Content: "VZDump backup file" when creating the Directory in Datacenter so that I can store the Proxmox backup there.

You can also use the mount point in NextCloudPi to backup

Screenshot 2022-09-23 2 39 15 PM

Now to make the drive mount at boot, lsblk -f in the Proxmox Shell and find the UUID

Screenshot 2022-09-23 2 51 42 PM

then nano /etc/fstab and add UUID=0F12-142C /mnt/nextcloud/usb vfat defaults 0 2

nacho-domatix commented 2 years ago

Thanks for the info and reply again.

I wasn't seeking to backup in a different folder. What I wanna do is to have nextcloud server in one "small" qcow2 file, and all the data of Nextcloud in a different folder (disk). I used before Nextcloudpi in a Odroid HC1 and that was the best configuration for me, the whole system in the sdcard, and the data in the sata (not usb) disk. That's why the ncp wizard is "ready" to store all the Nextcloud user files in one folder (usually will search inside /media).

Not sure if I explained myself better.

BWT, that's the configuration I have in other containers and it's great, cause I can share files among them, and backup the containers fast and easy (imagine a full backup of Jellyfin with all the movies and series in the same qcow file).

I might do "the trick" by mounting the proxmox disk to the default ncp folder (I believe is /var/www/nextcloud/data) I can take a look tomorrow. Anyway I'm closer to get there, so thankful about your scripts 🙏🙏

tteck commented 2 years ago

That's beyond the scope of creating a LXC running Nextcloud. Good luck, and keep us informed on your progress.

nacho-domatix commented 2 years ago

I believe the wizard of the script should work anyway, but as you said, that's more a problem of the script than the LXC Container. Thanks again! :)