[GH-ISSUE #821] RPi4 - "Bad Gateway" on first login #695

Closed
opened 2026-02-26 06:34:01 +03:00 by kerem · 9 comments
Owner

Originally created by @willsmi1256 on GitHub (Jan 12, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/821

What is troubling you?
First some info about my system:

  • RPi4 4GB (part of a swarm of 5) running Raspbian Lite which is fully up to date
  • Currently installed is Docker and docker-compose and I'm running the Portainer service on this machine as well

I'm pretty new to Docker in general, so I figured I would follow the default instructions to start with. I used the exact docker-compose file on this page. The install goes off without a hitch, but the app ends up in an unhealthy state. I did some looking and found bug 483 which is exactly my error as well as several other similar threads posted elsewhere.

I've read through as much as I could, but I can't seem to make any of the suggested compose files work either. They all give me the same errors. From what I can tell, the issue is that the app can't connect to the DB because it's not an ARM version, but I've tried several different mariadb versions as well SQLite (following the instructions on that setup page) that are supposed to be ARM friendly that also don't work.

I guess I'm really just hoping for some guidance here since it doesn't seem like the provided instructions are valid for my set up.

Logs here: _pi_app_1_logs.txt

Originally created by @willsmi1256 on GitHub (Jan 12, 2021). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/821 **What is troubling you?** First some info about my system: - RPi4 4GB (part of a swarm of 5) running Raspbian Lite which is fully up to date - Currently installed is Docker and docker-compose and I'm running the Portainer service on this machine as well I'm pretty new to Docker in general, so I figured I would follow the default instructions to start with. I used the exact docker-compose file on [this page](https://nginxproxymanager.com/setup/). The install goes off without a hitch, but the app ends up in an unhealthy state. I did some looking and found [bug 483](https://github.com/jc21/nginx-proxy-manager/issues/483) which is exactly my error as well as several other similar threads posted elsewhere. I've read through as much as I could, but I can't seem to make any of the suggested compose files work either. They all give me the same errors. From what I can tell, the issue is that the app can't connect to the DB because it's not an ARM version, but I've tried several different mariadb versions as well SQLite (following the instructions on that setup page) that are supposed to be ARM friendly that also don't work. I guess I'm really just hoping for some guidance here since it doesn't seem like the provided instructions are valid for my set up. Logs here: [_pi_app_1_logs.txt](https://github.com/jc21/nginx-proxy-manager/files/5799305/_pi_app_1_logs.txt)
kerem 2026-02-26 06:34:01 +03:00
Author
Owner

@SF73 commented on GitHub (Jan 14, 2021):

I'm also running it on a rpi4. I had the same problem and found a solution.
I changed the mariadb image from jc21/mariadb-aria:10.4 to yobasystems/alpine-mariadb:armhf

<!-- gh-comment-id:760368444 --> @SF73 commented on GitHub (Jan 14, 2021): I'm also running it on a rpi4. I had the same problem and found a solution. I changed the mariadb image from `jc21/mariadb-aria:10.4` to `yobasystems/alpine-mariadb:armhf`
Author
Owner

@willsmi1256 commented on GitHub (Jan 15, 2021):

I changed the mariadb image from jc21/mariadb-aria:10.4 to yobasystems/alpine-mariadb:armhf

Just gave this a shot. Same deal "Bad Gateway"

<!-- gh-comment-id:760626840 --> @willsmi1256 commented on GitHub (Jan 15, 2021): > I changed the mariadb image from `jc21/mariadb-aria:10.4` to `yobasystems/alpine-mariadb:armhf` Just gave this a shot. Same deal "Bad Gateway"
Author
Owner

@jiriteach commented on GitHub (Jan 15, 2021):

Im running NPM on a RPI4/8GB and no problems. Use yobasystems/alpine-mariadb:latest as the db image. Make sure your environment has MYSQL_ prefixes instead of MARIADB_ and also change the default passwords.

Launch and use Portainer to check if its running after launch. If not - check the log from Portainer which will show you what error is being thrown.

<!-- gh-comment-id:760632787 --> @jiriteach commented on GitHub (Jan 15, 2021): Im running NPM on a RPI4/8GB and no problems. Use yobasystems/alpine-mariadb:latest as the db image. Make sure your environment has MYSQL_ prefixes instead of MARIADB_ and also change the default passwords. Launch and use Portainer to check if its running after launch. If not - check the log from Portainer which will show you what error is being thrown.
Author
Owner

@willsmi1256 commented on GitHub (Jan 15, 2021):

For some reason, switching to the Latest branch from the Armhf was what did the trick. I already had new passwords and the Mysql prefixes in my file, so that was all that changed. Thanks so much!

<!-- gh-comment-id:760641901 --> @willsmi1256 commented on GitHub (Jan 15, 2021): For some reason, switching to the Latest branch from the Armhf was what did the trick. I already had new passwords and the Mysql prefixes in my file, so that was all that changed. Thanks so much!
Author
Owner

@mbino commented on GitHub (Jan 20, 2021):

I'm also running it on a rpi4. I had the same problem and found a solution.
I changed the mariadb image from jc21/mariadb-aria:10.4 to yobasystems/alpine-mariadb:armhf

How do you do this?

<!-- gh-comment-id:763258684 --> @mbino commented on GitHub (Jan 20, 2021): > > > I'm also running it on a rpi4. I had the same problem and found a solution. > I changed the mariadb image from `jc21/mariadb-aria:10.4` to `yobasystems/alpine-mariadb:armhf` How do you do this?
Author
Owner

@willsmi1256 commented on GitHub (Jan 20, 2021):

Here's the compose file I used. Replace #PASS# with your passwords

version: "3"
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: always
ports:
# Public HTTP Port:
- '80:80'
# Public HTTPS Port:
- '443:443'
# Admin Web Port:
- '81:81'
environment:
# These are the settings to access your db
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "npm"
DB_MYSQL_PASSWORD: "#PASS#"
DB_MYSQL_NAME: "npm"
# If you would rather use Sqlite uncomment this
# and remove all DB_MYSQL_* lines above
# DB_SQLITE_FILE: "/data/database.sqlite"
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db
db:
image: yobasystems/alpine-mariadb:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: '#PASS#'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: '#PASS#'
volumes:
- ./data/mysql:/var/lib/mysql

<!-- gh-comment-id:763283868 --> @willsmi1256 commented on GitHub (Jan 20, 2021): Here's the compose file I used. Replace #PASS# with your passwords version: "3" services: app: image: 'jc21/nginx-proxy-manager:latest' restart: always ports: # Public HTTP Port: - '80:80' # Public HTTPS Port: - '443:443' # Admin Web Port: - '81:81' environment: # These are the settings to access your db DB_MYSQL_HOST: "db" DB_MYSQL_PORT: 3306 DB_MYSQL_USER: "npm" DB_MYSQL_PASSWORD: "#PASS#" DB_MYSQL_NAME: "npm" # If you would rather use Sqlite uncomment this # and remove all DB_MYSQL_* lines above # DB_SQLITE_FILE: "/data/database.sqlite" # Uncomment this if IPv6 is not enabled on your host # DISABLE_IPV6: 'true' volumes: - ./data:/data - ./letsencrypt:/etc/letsencrypt depends_on: - db db: image: yobasystems/alpine-mariadb:latest restart: always environment: MYSQL_ROOT_PASSWORD: '#PASS#' MYSQL_DATABASE: 'npm' MYSQL_USER: 'npm' MYSQL_PASSWORD: '#PASS#' volumes: - ./data/mysql:/var/lib/mysql
Author
Owner

@NovaViper commented on GitHub (Feb 5, 2021):

I tried this solution but it's still giving me that error on my pi 4

<!-- gh-comment-id:774095810 --> @NovaViper commented on GitHub (Feb 5, 2021): I tried this solution but it's still giving me that error on my pi 4
Author
Owner

@Zusier commented on GitHub (Jul 5, 2021):

Using yobasystems/alpine-mariadb:latest instead of yobasystems/alpine-mariadb:armhf Worked for me. Thanks

<!-- gh-comment-id:874277218 --> @Zusier commented on GitHub (Jul 5, 2021): Using `yobasystems/alpine-mariadb:latest` instead of `yobasystems/alpine-mariadb:armhf` Worked for me. Thanks
Author
Owner

@ptalmeida commented on GitHub (Oct 23, 2021):

Only using yobasystems/alpine-mariadb:10.4.17 and not yobasystems/alpine-mariadb worked for me.

<!-- gh-comment-id:950225679 --> @ptalmeida commented on GitHub (Oct 23, 2021): Only using `yobasystems/alpine-mariadb:10.4.17` and not `yobasystems/alpine-mariadb` worked for me.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#695
No description provided.