Skip to content

Instantly share code, notes, and snippets.

@xmesaj2
Last active March 29, 2023 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xmesaj2/5e84ce915406280ca022dbf2c4b183c5 to your computer and use it in GitHub Desktop.
Save xmesaj2/5e84ce915406280ca022dbf2c4b183c5 to your computer and use it in GitHub Desktop.
nextcloudpi proxmox fixes

Enable HEIC

apt install php-imagick imagemagick config.php

'enabledPreviewProviders' => 
  array (
    'OC\Preview\PNG',
    'OC\Preview\JPEG',
    'OC\Preview\GIF',
    'OC\Preview\BMP',
    'OC\Preview\XBitmap',
    'OC\Preview\MP3',
    'OC\Preview\TXT',
    'OC\Preview\MarkDown',
    'OC\Preview\OpenDocument',
    'OC\Preview\Krita',
    'OC\Preview\HEIC',
  ),

Fix wss push nginx proxy manager and safari fix for iphone connection interrupted / app

location / {
            proxy_headers_hash_max_size 512;
            proxy_headers_hash_bucket_size 64;
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_hide_header Upgrade;
            add_header Front-End-Https on;
            # whatever the IP of your cloud server is
            proxy_pass https://CONTAINER_IP_ADDRESS;
        }

location /push/ws {
    proxy_pass http://CONTAINER_IP_ADDRESS:7867;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

config.php

'overwriteprotocol' => 'https',
'overwrite.cli.url' => 'https://DOMAIN',
'overwritehost' => 'DOMAIN',
'overwritewebroot' => '/',

Fix phone region warning

config.php

'default_phone_region' => 'PL',

Add storage mount eg LXC/ 105.conf (map host user 1000 to ncp)

mp0: /mnt/disk1/,mp=/mnt/storage
lxc.idmap: u 0 100000 1000
lxc.idmap: g 0 100000 1000
lxc.idmap: u 1000 1000 1
lxc.idmap: g 1000 1000 1
lxc.idmap: u 1001 101001 64535
lxc.idmap: g 1001 101001 64535

pve shell

chmod -R 770 /mnt/storage

CT shell

chown -R 1000:1000 /mnt/storage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment