Coder Social home page Coder Social logo

proxmox-scripts's People

Contributors

cyberdork33 avatar daufinsyd avatar ej52 avatar fakesoul94 avatar niels avatar programbo avatar sjeff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

proxmox-scripts's Issues

Running on an existing Alpine LXC,[success] Downloading NPM v2.9.9 [error] Setting up enviroment

With a pre-existing Alpine LXC container, running the setup script results in the following error and fail to finish:

[success] Checking for latest openresty repository
[success] Updating container OS
[success] Installing dependencies
[success] Setting up python
[success] Checking for latest NPM release
[success] Downloading NPM v2.9.9
[error] Setting up enviroment
/tmp/npm_install.sh: line 110: 'wget $WGETOPT -c $_npm_url/archive/v$_latest_version.tar.gz -O - | tar -xz'
Broken pipe

Line 105 in alpine.sh gives error ssl_client: write: Broken pipe

Script
nginx-proxy-manager

Describe the bug
Following the information as posted in #29 you run "wget --no-cache -qO - https://raw.githubusercontent.com/ej52/proxmox/main/lxc/nginx-proxy-manager/setup.sh | sh" and get a failed NPM install with the following error message:

[success] Checking for latest NPM release
[error] Downloading NPM v.tar.gz
/tmp/npm_install.sh: line 110: 'wget $WGETOPT -c $_npm_url/archive/v$_latest_version.tar.gz -O - | tar -xz'
Broken pipe
Broken pipe
HTTP/1.1 404 Not Found
invalid magic
short read

Digging a bit further and finding the lines of bash code responsible, it fails at line 105 when it tries to check the latest NPM version number. Getting all the variables used and creating the command as it is being run gives:

wget -t 1 -T 15 -q -O ./_latest_release https://github.com/NginxProxyManager/nginx-proxy-manager/releases/latest
ssl_client: write: Broken pipe

Running the same command from a WSL Ubuntu install gives no errors.

System info:

  • Proxmox Version: 7.1-8
  • Alpine Version: 3.15

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
After a bit more digging, it seems to be a shortcoming of the busybox wget version that is default in Alpine containers. Doing an "apk add wget" installs the GNU wget version, and that one works fine with downloading the latest_release data from Github.

Though using that wget probably requires different options because it is giving me errors with setting up Python.

bad gateway after update NPM 2.9.5

Script
nginx-proxy-manager

Describe the bug
Hello

After the NPM 2.9.5 update, I can't connect to the panel anymore and I get the message bad gateway when I click on the login button

I had no problem in 2.9.4

I tried a new installation and I have the same problem

** fallback_error.log **

2021/07/20 07:19:26 [error] 1028#1028: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.45, server: nginxproxymanager, request: "POST /api/tokens HTTP/1.1", upstream: "http://127.0.0.1:3000/tokens", host: "192.168.1.254:81", referrer: "http://192.168.1.254:81/login"

System info:

  • Proxmox Version: 7.0-10
  • Alpine Version: 3.12.7

python: not found

Script
nginx-proxy-manager

Describe the bug
When initializing the backend after installing the missing make prereq you get an error that python is not found.

System info:

  • Proxmox Version: 6.4-4
  • Alpine Version: 3.13

Screenshots
image

LE Cert : Internal error

Script
nginx-proxy-manager

Describe the bug
Creating a host is OK if HTTP only.
Creating a host and requesting a LE certificate si KO ( internal error )
Creating a LE certificate on its own fails also with internal error and provides more information :

Error: Command failed: /usr/sbin/nginx -s reload
nginx: [alert] kill(585, 1) failed (13: Permission denied)

    at ChildProcess.exithandler (child_process.js:308:12)
    at ChildProcess.emit (events.js:314:20)
    at maybeClose (internal/child_process.js:1022:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)

System info:

  • Proxmox Version: Freshly upgraded to 6.4.13
  • Alpine Version: 3.12.7

Additional context
CT and NPM installed yesterday with customized command :
curl -sL https://raw.githubusercontent.com/ej52/proxmox/main/lxc/nginx-proxy-manager/create.sh | bash -s -- --bridge vmbr2 --storage data-lvm-thin

Setup fails when trying to connect to Github content(?) server(s)

EDIT - Never mind - typical PEBKAC issue. By default, new / unknown hosts get an IP via DHCP without internet access on my network, which of course I totally forgot. After setting the IP manually the script worked like a charm.

So the only 'issue' I have is that the script defaults to DHCP. Adding an option to provide manual IP settings would be awesome.

Script
nginx-proxy-manager

Describe the bug
Running this script on my Proxmox node, I get this:
root@node1:~# curl -sL https://raw.githubusercontent.com/ej52/proxmox/main/lxc/nginx-proxy-manager/create.sh | bash -s -- --storage local-zfs

[warn] Container will be created using the following settings.
[warn]
[warn] ctid: 110
[warn] hostname: nginx-proxy-manager
[warn] cores: 1
[warn] memory: 512
[warn] swap: 0
[warn] disksize: 2G
[warn] bridge: vmbr0
[warn] storage: local-zfs
[warn] templates: local
[warn]
[warn] If you want to abort, hit ctrl+c within 10 seconds...

[info] Updating LXC template list...
[info] Downloading LXC template...
[info] Allocating storage for LXC container...
[warn] Some containers may not work properly due to ZFS not supporting 'fallocate'.
[info] Creating LXC container...
[info] Setting up LXC container...
wget: can't connect to remote host (185.199.111.133): Connection refused

System info:

  • Proxmox Version: [e.g. 6.4-13]
  • Alpine Version: [e.g. 3.12]

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
The IP above varies when I try again, but it always resolves to cdn-xxx-xxx-xxx.github.com.
The container itself is started though, but I have no clue on how to continue from here.

Can't find Rust compiler

Script
nginx-proxy-manager

Describe the bug
A clear and concise description of what the bug is.

Running the script on Proxmox shell, and get the following error.

[error] Setting up python
/tmp/npm_install.sh: line 100: pip3 install --no-cache-dir cffi certbot

/usr/bin/python3 /usr/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp9xqkn7dt
/tmp/pip-install-z_8xtkgn/cryptography_f74803dfdc3d4b91b13c07418d8c044e

 running bdist_wheel
 running build
 running build_py
 running egg_info
 writing src/cryptography.egg-info/PKG-INFO
 writing dependency_links to src/cryptography.egg-info/dependency_links.txt
 writing requirements to src/cryptography.egg-info/requires.txt
 writing top-level names to src/cryptography.egg-info/top_level.txt
 reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
 reading manifest template 'MANIFEST.in'
 no previously-included directories found matching 'docs/_build'
no previously-included files found matching 'vectors'
no previously-included files matching '*' found under directory 'vectors'
no previously-included files matching '*' found under directory '.github'
no previously-included files found matching 'release.py'
no previously-included files found matching '.coveragerc'
no previously-included files found matching 'codecov.yml'
no previously-included files found matching '.readthedocs.yml'
no previously-included files found matching 'dev-requirements.txt'
no previously-included files found matching 'tox.ini'
no previously-included files found matching 'mypy.ini'
no previously-included files matching '*' found under directory '.zuul.d'
no previously-included files matching '*' found under directory '.zuul.playbooks'
 adding license file 'LICENSE'
 adding license file 'LICENSE.APACHE'
 adding license file 'LICENSE.BSD'
 adding license file 'LICENSE.PSF'
 running build_ext
 running build_rust
 
     =============================DEBUG ASSISTANCE=============================
     If you are seeing a compilation error please try the following steps to

     1) Upgrade to the latest pip and try again. This will fix errors for most
//pip.pypa.io/en/stable/installing/#upgrading-pip
for specific
        instructions for your platform.

//cryptography.io/en/latest/faq/

//cryptography.io/en/latest/installation/#rust
 
3.8.10
Linux-5.13.19-3-pve-x86_64-with
n/a
60.6.0
1.1.2
     =============================DEBUG ASSISTANCE=============================
 
can't find Rust compiler
 
 If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
 

 
     pip install --upgrade pip
 
 and then retry package installation.
 
is the recommended way to download and update the Rust compiler toolchain.
ta elbaliava( putsur ,ylevitanretlA .noitallatsni gnirud HTAP eht no si ti erusne dna reganam egakcap metsys ruoy morf relipmoc tsuR a gnillatsni yrt ,ecruos mor  
is the recommended way to download and update the Rust compiler toolchai  This package requires Rust >=1.41.0.
ta elbaliava( putsur ,ylevitanretlA .noitallatsni gnirud HTAP eht no si ti erusne dna reganam egakcap metsys ruoy morf relipm  ----------------------------------------
Failed building wheel for cryptography
Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
You are using pip version 21.1.1; however, version 22.0.2 is available.
Could not You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
[error] 195 NULL: pct exec $_ctid -- sh -c "wget --no-cache -qO - $_raw_base/setup.sh | sh"

System info:

  • Proxmox Version: 7.1-10

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Some issues with Ubuntu 20.04

First a really nice script!!

i have a few issue when i use the script on a ubuntu 20.04 server, without proxmox.

the installed certbot will not run properly in the service status of npm i see the following error:

Jul 28 13:45:25 proxy-srv node[5875]: [7/28/2021] [1:45:25 PM] [SSL ] โ€บ โœ– error Error: Command failed: certbot renew --non-interactive --quiet --config "/etc/letsencrypt.ini" --preferred-chal> Jul 28 13:45:25 proxy-srv node[5875]: An unexpected error occurred: Jul 28 13:45:25 proxy-srv node[5875]: pkg_resources.ContextualVersionConflict: (zope.interface 4.7.1 (/usr/lib/python3/dist-packages), Requirement.parse('zope.interface>=5.3.0a1'), {'zope.component'}) Jul 28 13:45:25 proxy-srv node[5875]: at ChildProcess.exithandler (child_process.js:319:12) Jul 28 13:45:25 proxy-srv node[5875]: at ChildProcess.emit (events.js:375:28) Jul 28 13:45:25 proxy-srv node[5875]: at maybeClose (internal/child_process.js:1055:16) Jul 28 13:45:25 proxy-srv node[5875]: at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)

and when i start certbot i see:

# /usr/local/bin/certbot An unexpected error occurred: pkg_resources.ContextualVersionConflict: (zope.interface 4.7.1 (/usr/lib/python3/dist-packages), Requirement.parse('zope.interface>=5.3.0a1'), {'zope.component'}) Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/tmp9ex2sssz/log or re-run Certbot with -v for more details.

not sure what's going wrong during the installation, but when i remove the pip version and install it from apt or snap it's working.

also at the end the ip script is not working, because you look for ip from the network card eth0. but in newer ubuntu this will not work. perhaps better to use hostname -I|cut -f1 -d ' ' to get the ip?

bad gateway after update NPM 2.9.12 to NPM 2.9.14

Script
nginx-proxy-manager

Describe the bug
Hello

After the NPM 2.9.14 update, I can't connect to the panel anymore and I get the message bad gateway when I click on the login button

I had no problem before this update

More info

The reverse proxy works but I can't manage it
fresh install works
I have successfully upgraded to 2.9.13
Upgrading from 2.9.13 to 2.9.14 does not work
Upgrading from 2.9.13 to 2.9.15 does not work
Upgrading from 2.9.13 to 2.9.16 does not work
Upgrading from 2.9.13 to 2.9.18 does not work

System info:

  • Proxmox Version: 7.1-8
  • Alpine Version: 3.12.9

yarn cannot build

Hello !

I'm trying to use your setup.sh script (after creating an alpine container with your create.sh) but looks like stuck at the step "Building frontend...".
I tried to manually run yarn install (works good) but command yarn build failed with this error:

/app/frontend # yarn build
yarn run v1.22.4
error Command "build" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

yarn seems well installed :
apk list --installed | grep "yarn"
gives me

yarn-1.22.4-r0 x86_64 {yarn} (BSD-2-Clause) [installed]

Any idea why ?

EDIT: I added 2 screenshots, 1st is normal script as is > stuck somewhere and the container is deleted automatically.. that's why I split it in 2.
2nd is when I try to use yarn build manually after stuck.
2021-03-03 17_14_11-proxmox - Proxmox Console
2021-03-03 17_38_54-proxmox - Proxmox Console

2.9.0+ support (debian)

Script
nginx-proxy-manager

Describe the bug
Hello~
Is that possible to support the latest npm versions (>=2.9.0) ? They now use nginx/debian image and I can still see openresty installation and alpine check in your code

Thanks for your hard work ! ๐Ÿ™

System info:

  • Proxmox Version: 6.4.9

Cannot install from script

Script
nginx-proxy-manager

Describe the bug
Goes through the process, creates the container, starts working in the container, then gives this error:

[error] 195 NULL: pct exec $_ctid -- sh -c "wget --no-cache -qO - $_raw_base/setup.sh | sh"

It then destroys the container.

System info:

  • Proxmox Version: 7.1-10

Breaks after setting static IP

Hi

Great script - wish I had tried before losing the will to live with Rancher.

It installed fine and I could log in and set my admin account details etc.
I then realised the container was using DHCP so I changed the IP of the container in Proxmox from DHCP to a static IP. To my surprise this did not change the IP of the container. After many reboots. It showed the static in the alpine network config but did not apply. The only way I could get the new IP address to stick was to rename the interface from eth0 to eth1

I now get the NPM login screen but get the dreaded "bad gateway" error when trying to sign in.

Is there a preferred way to switch from DHCP to a static without breaking NPM?

[Follow up]
I thought a solution around this issue would be to install a standard Alpine LXC with the correct networking first then run the setup script rather than the create script.
Networking was confirmed working fine with the static IP but when I ran setup it seems to have modified Eth0 to DHCP again, despite /etc/network/interfaces showing my original static IP.

thanks
Gordon

Update of NPM causes Internal Error when changing "Block Common Exploit"

Script
nginx-proxy-manager

Describe the bug
After I updated from NPM v2.9.4 to v2.9.7 with the setup.sh script everything seemed to work fine. I tried to activate the "Block common exploits" option on an existing Proxy Host. Unfortunately it throws an Internal Error (Screenshot) when clicking Save. When you close that window the status becomes unknown but it continues working.

System info:

  • Proxmox Version: 7.0-11
  • Alpine Version: 3.14

Screenshots
Screenshot 2021-08-24 204824

Additional context
I don't know if this is a issue with the script, but I can't find a similar bug report on the NPM Issue tracker, which leads me to believe it's an issue with this script.

What I already tried

  • The issue persists with a clean Database

npm-install fails at line 250: rc-service openresty start

Script
nginx-proxy-manager

  • setup.sh and also npm-install.sh

Describe the bug
Setup fails at the step where openresty is launched, reporting that config test failed:

[error] Starting services
/tmp/npm_install.sh: line 250: rc-service openresty start
14
configuration file /usr/local/openresty/nginx/conf/nginx.conf test failed
openresty failed to start

System info:

  • Proxmox Version: 7.1.10
  • Alpine Version: 3.15-default_20211202

Additional context

  • Set up the lxc container myself, and added /data folder (migrated from an NPM setup on docker, which I wasn't happy with) before installation
  • container has 2 GB of disk space and 512 MiB RAM allocated - I hope that's enough

nginx.conf.txt

Output error messages from setup.sh

Is your feature request related to a problem? Please describe.
When a command in setup.sh fails, the script exits, but there is no output as to what the error is.

Describe the solution you'd like
When something fails the stdout/stderr should be output to the user.

Something as simple as the following could be used:

chronic() {
  # Run a command and output the stdin/stderr only if it fails
  # Usage:
  #   chronic <command> [<args>...]
  # Example:
  #   chronic yarn install
  tmp=$(mktemp) || return # this will be the temp file w/ the output
  "$@"  > "$tmp" 2>&1; # this should run the command, respecting all arguments
  ret=$?
  [ "$ret" -eq 0 ] || cat "$tmp" 1>&2;  # if $? (the return of the last run command) is not zero, cat the temp file
  rm -f "$tmp";
  return "$ret" # return the exit status of the command
}

"Internal Error" He cannot find a Certbot

Script
nginx-proxy-manager

Describe the bug
"Internal Error" He cannot find a Certbot

System info:

  • Proxmox Version: [6.3-6]

Screenshots
image

Additional context
Hello,

The script works great and the installation has worked completely as soon as I want to add a Let's Encrypt Certificate, it shows me an "Internal Error":

Error: Command failed: / opt / certbot / bin / certbot certonly --non-interactive --config "/etc/letsencrypt.ini" --cert-name "npm-2" --agree-tos --email "username@domain "--preferred-challenges" dns, http "--domains" subdomain.domain "
/ bin / sh: / opt / certbot / bin / certbot: not found

     at ChildProcess.exithandler (child_process.js: 308: 12)
     at ChildProcess.emit (events.js: 314: 20)
     at maybeClose (internal / child_process.js: 1022: 16)
     at Process.ChildProcess._handle.onexit (internal / child_process.js: 287: 5)

Error in proxmox 7 installation image

Using this line gives

curl -sL https://raw.githubusercontent.com/ej52/proxmox/main/lxc/nginx-proxy-manager/create.sh | bash -s

warn] Container will be created using the following settings.
[warn]
[warn] ctid: 121
[warn] hostname: nginx-proxy-manager
[warn] cores: 1
[warn] memory: 512
[warn] swap: 0
[warn] disksize: 2G
[warn] bridge: vmbr0
[warn] storage: local-lvm
[warn] templates: local
[warn]
[warn] If you want to abort, hit ctrl+c within 10 seconds...

[info] Updating LXC template list...
[info] Downloading LXC template...
[error] 143 NULL: _storage_type=$(pvesm status -storage $_storage 2>/dev/null | awk 'NR>1 {print $2}')

Ubuntu 18.04 Install: Command 'pip' not found

Script
nginx-proxy-manager

Describe the bug
I created an LXC container with Ubunti 18.04 and used the "alternative" install option.

System info:

  • Proxmox Version: 6.4-13
  • Ubuntu 18.04 - latest updates

Installation continued successfully after "apt install pip"

it gives error while yarn tries to be installed

Script
nginx-proxy-manager

Describe the bug
while tries to install yarn, keep giving timedout error

System info:

  • Proxmox Version: no proxmox
  • Ubuntu Version: Ubuntu 20.04

Screenshots
attached

Additional context
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info If you think this is a bug, please open a bug report with the information provided in "/tmp/tmp.RodvVZ2hNO/nginx-proxy-manager-2.9.5/frontend/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
..
[error] Building frontend
/tmp/npm_install.sh: line 170: yarn install
195: yarn install
ESOCKETTIMEDOUT".

yarn-error

[error] Downloading NPM v.tar.gz

Script
nginx-proxy-manager

Describe the bug
I get an "[error] Downloading NPM v.tar.gz". It seems the script is unable to get the NPM version number

System info:

  • Proxmox Version: 7.1.8
  • Alpine Version: 3.12

Screenshots
image

Additional context
I also tried upgrading to Aplpine v3.15, but got the same result

error when trying to run default command

curl -sL https://raw.githubusercontent.com/ej52/proxmox/main/lxc/nginx-proxy-manager/create.sh | bash -s

returns the following

[warn] Container will be created using the following settings.
[warn] 
[warn] ctid:     119
[warn] hostname: npm
[warn] cores:    1
[warn] memory:   512
[warn] swap:     0
[warn] disksize: 2G
[warn] bridge:   vmbr0
[warn] storage:  local-lvm
[warn] 
[warn] If you want to abort, hit ctrl+c within 10 seconds...


[info] Updating LXC template list...
[info] Downloading LXC template...
[info] Allocating storage for LXC container...
[info] Creating LXC container...
[error] A problem occured while creating LXC container.

Missing prereqs

Script
nginx-proxy-manager

Describe the bug
When initializing the backend, yarn install will fail due to make, cc, and others not being installed.

System info:

  • Proxmox Version: 6.4-4
  • Alpine Version: 3.13

Screenshots
image
image

NPM does not start on Ubuntu 18.04

Script
nginx-proxy-manager

Describe the bug

Aug  8 18:37:33 nginx-proxy-manager node[7283]: [8/8/2021] [6:37:33 PM] [Global   ] <E2><80><BA> <E2><84><B9>  info      Backend PID 7283 listening on port 3000 ...
Aug  8 18:37:33 nginx-proxy-manager node[7283]: [8/8/2021] [6:37:33 PM] [SSL      ] <E2><80><BA> <E2><9C><96>  error     Error: Command failed: certbot renew --non-interactive --quiet --config "/etc/letsencrypt.ini" --preferred-challenges "dns,http" --disable-hook-validation
Aug  8 18:37:33 nginx-proxy-manager node[7283]: Traceback (most recent call last):
Aug  8 18:37:33 nginx-proxy-manager node[7283]:   File "/usr/local/bin/certbot", line 7, in <module>
Aug  8 18:37:33 nginx-proxy-manager node[7283]:     from certbot.main import main
Aug  8 18:37:33 nginx-proxy-manager node[7283]: ModuleNotFoundError: No module named 'certbot'
Aug  8 18:37:33 nginx-proxy-manager node[7283]:     at ChildProcess.exithandler (child_process.js:390:12)
Aug  8 18:37:33 nginx-proxy-manager node[7283]:     at ChildProcess.emit (events.js:400:28)
Aug  8 18:37:33 nginx-proxy-manager node[7283]:     at maybeClose (internal/child_process.js:1055:16)
Aug  8 18:37:33 nginx-proxy-manager node[7283]:     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)

System info:

  • Proxmox Version: 6.4-13
  • Ubuntu 18.04

openresty doesn't start

Hi,
I've successfully built a a proxmox lxc container using your script. However after running an update using:
wget --no-cache -qO - https://raw.githubusercontent.com/ej52/proxmox/main/lxc/nginx-proxy-manager/setup.sh | sh
I get an error starting openresty.
It shows as stopped. When I try to start it, the msg is this:

  • Starting openresty ...
  • start-stop-daemon: /usr/local/openresty/bin/openresty is already running
  • Failed to start openresty [ !! ]
  • ERROR: openresty failed to start

Can't connect to ip of container

I installed this script in Proxmox, it said it was successful and gave me the ip to login at.
When I go to the ip on my local network nothing loads. I can access the container through
the console of the proxmox webui so I can at least see that it is running. Is there something more
that I need to do. (I am a linux beginner if that wasn't obvious)

404 not found - when try to install nginx-proxy-manager in proxmox

Script
nginx-proxy-manager
https://raw.githubusercontent.com/ej52/proxmox-scripts/main/lxc/nginx-proxy-manager/setup.sh

Describe the bug
The script "https://raw.githubusercontent.com/ej52/proxmox-scripts/main/lxc/nginx-proxy-manager/setup.sh" which is used during the installation process can not find the dependend script "https://raw.githubusercontent.com/ej52/proxmox-scripts/main/lxc/nginx-proxy-manager/install".
The called script ist missing.

System info:

  • Proxmox Version: 7.0-8
  • Alpine Version: [e.g. 3.12]

Screenshots
Code from install Script:
`[info] Creating LXC container...

  • _pct_options=(-arch $_arch -cmode shell -hostname $_host_name -cores $_cpu_cores -memory $_memory -net0 name=eth0,bridge=$_bridge,ip=dhcp -onboot 1 -ostype $_os_type -rootfs $_rootfs,size=$_disk_size -storage $_storage -swap $_swap -tags npm)
  • pct create 101 local:vztmpl/alpine-3.12-default_20200823_amd64.tar.xz -arch amd64 -cmode shell -hostname nginx-proxy-manager -cores 1 -memory 512 -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -ostype alpine -rootfs local-lvm:vm-101-disk-0,size=2G -storage local-lvm -swap 0 -tags npm
  • cat
  • info 'Setting up LXC container...'
  • echo -e '\e[32m[info] Setting up LXC container...\e[39m'
    [info] Setting up LXC container...
  • pct start 101
  • sleep 3
  • pct exec 101 -- sh -c 'wget --no-cache -qO - https://raw.githubusercontent.com/ej52/proxmox-scripts/main/lxc/nginx-proxy-manager/setup.sh | sh'
    wget: can't connect to remote host (185.199.110.133): Connection refused
  • popd
  • rm -rf /tmp/tmp.q6KuRJCpdk
    `

Cannot install on Ubuntu

Script
nginx-proxy-manager

Describe the bug
When i run the manual installation script: wget --no-cache -qO - https://raw.githubusercontent.com/ej52/proxmox/main/lxc/nginx-proxy-manager/setup.sh | sh

i get the following error:

[success] Installing dependencies
[success] Installing python
[success] Installing openresty
[error] Installing nodejs
/tmp/npm_install.sh: line 69: apt-get update
85: apt-get update && apt-get install -y -q --no-install-recommends openresty
90: apt-get update && apt-get install -y -q --no-install-recommends nodejs
//deb.nodesource.com/setup_14.x
...
connected.
request sent, awaiting response... 200 OK
13764 (13K) [text/plain]
'STDOUT'

/tmp/npm_install.sh: line 37: printf: `M': invalid format character
    0K .......... ...                                        100root@npm:~# 

System info:

  • Proxmox Version: 6.4-6
  • Ubuntu Version: 21.04

Screenshots
image

Can't install to a Ceph Pool

Is your feature request related to a problem? Please describe.
When I try to install to a Ceph pool for storage I get this error:
[error] 165 NULL: mkfs.ext4 $(pvesm path $_rootfs) &> /dev/null

Describe the solution you'd like
Be able to install to a Ceph Pool.

How can we use external mySQL database with this script?

As the title says really.

I'd like to use an already existant mySQL db, as per this method in the official docker version. How can I edit your script to allow this?

Edit: I'm trying to run npm directly in an LXC container, no Proxmox in my setup.

[error] 137 NULL: _storage_type

I'm getting the following error when running the script. PVE is current with default repos. Any ideas?

[info] Updating LXC template list...
[info] Downloading LXC template...
[error] 137 NULL: _storage_type=$(pvesm status -storage $_storage 2>/dev/null | awk 'NR>1 {print $2}')

root@pve:~# pvesm status
Name Type Status
local dir active
local-zfs zfspool active
pve_iso dir active
zoomzdisk1 dir active
zoomzstuff dir active

Oh, thanks for the script!

Your Script does not work for me on VM on ESXI7 With Alpine

Hi
I followed your perfect script on Proxmox ad described, and it worked perfect!
THX!

Now I want to set up a reverse manager on ESXi 7 in an Alpine VM
I logged in with putty with root
and put in your command for not using a proxmox container

Alternative Usage
If you are not using proxmox or want to install this on a existing Alpine box, you can run the setup script itself._

Pls see below:

revproxy:~# wget --no-cache -qO - https://raw.githubusercontent.com/ej52/proxmox/main/lxc/nginx-proxy-manager/setup.sh | sh
[info] Updating container OS...
ERROR: http://openresty.org/package/alpine/v3.13/main: No such file or directory
WARNING: Ignoring http://openresty.org/package/alpine/v3.13/main: No such file or directory
revproxy:~#

Where is the problem?
Am I doing something wrong?
Is something missing in my Alpine VM?

Pls. be so kind and help me get it running as before.
Many THX in advance

regards
Witzker

PS:
revproxy:~# cat /etc/alpine-release
3.13.4
I installed this image:
image

x86_64

Unable to login after update

I used the command wget --no-cache -qO - https://raw.githubusercontent.com/ej52/proxmox/main/lxc/nginx-proxy-manager/setup.sh | sh to update my conatiner to v2.9.16. NPM is working, but I can no longer log in. The login screen is there, but hitting the sign in button doesn't do anything. Rebooting the container did not help.

IP address doesn't show WebUI

Hey,

First off, thanks for making this awesome script!
It installs perfectly, or rather without errors, but then when I go to the IP it indicates, it says 'Site can't be reached'.
Any idea how to troubleshoot or solve that?

Tried with the DHCP address and setting a static, different IP for it and used the :81 port.
The container gets created successfully and I can access the shell there but I know too little about docker or npm yet to solve the problem on my own. Thanks!

How to upgrade NPM?

Hi @ej52, thanks for sharing these scripts, they are really useful. I used your setup.sh to install npm 2.8.0 on an alpine lxc container that I created manually on proxmox. Do you have any feedback on the recommended way to upgrade npm to 2.8.1 for example?

Add Backup instructions to website

It would be awesome to be able to backup data when using the "alternative solution" with a direct install ...

I assume it is needed to backup

  • /etc/letsencrypt
  • /var/lib/masql ... or better doing a mysql dump

?

Not working...

[success] Checking for latest openresty repository
[success] Updating container OS
[success] Installing dependencies
[error] Setting up python
/tmp/npm_install.sh: line 100: pip3 install --no-cache-dir cffi certbot

/usr/bin/python3 /usr/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpuv08pvgn
/tmp/pip-install-5oax8c4e/cryptography_ad12ff45019b400898d635f06023b4b2

running bdist_wheel
running build
running build_py
running egg_info
writing src/cryptography.egg-info/PKG-INFO
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing requirements to src/cryptography.egg-info/requires.txt
writing top-level names to src/cryptography.egg-info/top_level.txt
reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
no previously-included files found matching 'vectors'
no previously-included files matching '' found under directory 'vectors'
no previously-included files matching '
' found under directory '.github'
no previously-included files found matching 'release.py'
no previously-included files found matching '.coveragerc'
no previously-included files found matching 'codecov.yml'
no previously-included files found matching '.readthedocs.yml'
no previously-included files found matching 'dev-requirements.txt'
no previously-included files found matching 'tox.ini'
no previously-included files found matching 'mypy.ini'
no previously-included files matching '' found under directory '.zuul.d'
no previously-included files matching '
' found under directory '.zuul.playbooks'
adding license file 'LICENSE'
adding license file 'LICENSE.APACHE'
adding license file 'LICENSE.BSD'
adding license file 'LICENSE.PSF'
running build_ext
running build_rust

 =============================DEBUG ASSISTANCE=============================
 If you are seeing a compilation error please try the following steps to

 1) Upgrade to the latest pip and try again. This will fix errors for most

//pip.pypa.io/en/stable/installing/#upgrading-pip
for specific
instructions for your platform.

//cryptography.io/en/latest/faq/

//cryptography.io/en/latest/installation/#rust

3.8.10
Linux-5.13.19-4-pve-x86_64-with
n/a
60.9.0
1.1.2
=============================DEBUG ASSISTANCE=============================

can't find Rust compiler

If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

 pip install --upgrade pip

and then retry package installation.

is the recommended way to download and update the Rust compiler toolchain.
ta elbaliava( putsur ,ylevitanretlA .noitallatsni gnirud HTAP eht no si ti erusne dna reganam egakcap metsys ruoy morf relipmoc tsuR a gnillatsni yrt ,ecruos mor
is the recommended way to download and update the Rust compiler toolchai This package requires Rust >=1.41.0.
ta elbaliava( putsur ,ylevitanretlA .noitallatsni gnirud HTAP eht no si ti erusne dna reganam egakcap metsys ruoy morf relipm ----------------------------------------
Failed building wheel for cryptography
Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
You are using pip version 21.1.1; however, version 22.0.3 is available.
Could not You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
running build
running build_py
running egg_info
writing src/cryptography.egg-info/PKG-INFO
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing requirements to src/cryptography.egg-info/requires.txt
writing top-level names to src/cryptography.egg-info/top_level.txt
reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
no previously-included files found matching 'vectors'
no previously-included files matching '' found under directory 'vectors'
no previously-included files matching '
' found under directory '.github'
no previously-included files found matching 'release.py'
no previously-included files found matching '.coveragerc'
no previously-included files found matching 'codecov.yml'
no previously-included files found matching '.readthedocs.yml'
no previously-included files found matching 'dev-requirements.txt'
no previously-included files found matching 'tox.ini'
no previously-included files found matching 'mypy.ini'
no previously-included files matching '' found under directory '.zuul.d'
no previously-included files matching '
' found under directory '.zuul.playbooks'
adding license file 'LICENSE'
adding license file 'LICENSE.APACHE'
adding license file 'LICENSE.BSD'
adding license file 'LICENSE.PSF'
running build_ext
running build_rust

 =============================DEBUG ASSISTANCE=============================
 If you are seeing a compilation error please try the following steps to

 1) Upgrade to the latest pip and try again. This will fix errors for most

//pip.pypa.io/en/stable/installing/#upgrading-pip
for specific
instructions for your platform.

//cryptography.io/en/latest/faq/

//cryptography.io/en/latest/installation/#rust

3.8.10
Linux-5.13.19-4-pve-x86_64-with
n/a
60.9.0
1.1.2
=============================DEBUG ASSISTANCE=============================

can't find Rust compiler

If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

 pip install --upgrade pip

and then retry package installation.

is the recommended way to download and update the Rust compiler toolchain.
ta elbaliava( putsur ,ylevitanretlA .noitallatsni gnirud HTAP eht no si ti erusne dna reganam egakcap metsys ruoy morf relipmoc tsuR a gnillatsni yrt ,ecruos mor
is the recommended way to download and update the Rust compiler toolchai This package requires Rust >=1.41.0.
ta elbaliava( putsur ,ylevitanretlA .noitallatsni gnirud HTAP eht no si ti erusne dna reganam egakcap metsys ruoy morf relipm ----------------------------------------
Failed building wheel for cryptography
Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
You are using pip version 21.1.1; however, version 22.0.3 is available.
Could not You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
[error] 195 NULL: pct exec $_ctid -- sh -c "wget --no-cache -qO - $_raw_base/setup.sh | sh"

Proxmox 7 installation not possible - Pip error

Script
nginx-proxy-manager

Describe the bug
I run the script in the proxmox shell and received following error...i dont know how to fix this but it seems there is a problem with Pip. Please help me i used the default scipt options

System info:

  • Proxmox Version: 7.1-11
  • Alpine Version: dont know

Screenshots
image
image
image
image

Additional context
Please help me to fix this

how to login with Putty

Sorry I'm new and managed successfully to install with your perfect script
THX
Now I want to log in with putty & FileZilla

Pls. Tel me how
THX for patience with a Newbie

Unable to create SSL certs - NodeJS version needs to be updated

Script
nginx-proxy-manager

Describe the bug
When installing this manually using the script for debian/ubuntu as shown in the README, installation works however there are bugs within NPM. This is caused by installing NodeJS 14.x as some of the features used in NPM require NodeJS 15.x or above.

I encountered the issue when trying to create a SSL certificate. The replaceAll() npm uses is not present in 14.x. After forking and changing to use NodeJS 16.x all issues went away.

System info:
System: Ubuntu 20.04

Login to NPM not possible after updating Alpine from 3.12 to 3.13

Hi
If I call the NRM URL:81 as before site is not available.

The NRM service must still be running - I can reach my sites which were redirected to the ESXi VMs from the internet as before the Update to Alpine 3.13 !

What I did:
Log In with putty:
Check Version
cat /etc/alpine-release
OUTPUT:
3.12.7
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.12.7
PRETTY_NAME="Alpine Linux v3.12"

apk update
apk upgrade
Edit the file :/etc/apk/repositories
I have now there:
#/media/cdrom/apks
http://mirror.leaseweb.com/alpine/v3.13/main
http://mirror.leaseweb.com/alpine/v3.13/community
#http://mirror.leaseweb.com/alpine/edge/main
#http://mirror.leaseweb.com/alpine/edge/community
#http://mirror.leaseweb.com/alpine/edge/testing

http://openresty.org/package/alpine/v3.13/main

Safe file
apk update
apk upgrade --available
sync
Reboot
Check version:
cat /etc/alpine-release

What has to be done to fix the login to Reverse Manager?
Hope for help for a newbie
THX

Update NPM: reloading nginx failed

Hello !

I'm trying to execute again your script setup.sh to update the NPM version (from 2.8.0 to 2.8.1), everythings seems to working great until reloading nginx:
2021-04-27 12_06_53-Window

Any thoughts about this ? the PID file seems not defined in the default /etc/nginx/nginx.conf
Maybe change and do /usr/local/openresty/nginx/sbin/nginx -s reload instead ?
Thanks!~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.