I have been using Nginx Proxy Manger in my homelab for a couple of years now and a few months ago I started having issues signing into the the web interface. I have NPM installed using this docker compose file using mariadb that I got from the NPM site.
version: ‘3.8’
services:
app:
image: ‘jc21/nginx-proxy-manager:latest’
restart: unless-stopped
ports:
- ‘80:80’
- ‘443:443’
- ‘81:81’
environment:
# Mysql/Maria connection parameters:
DB_MYSQL_HOST: “db”
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: “npm”
DB_MYSQL_PASSWORD: “npm”
DB_MYSQL_NAME: “npm”
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: ‘true’
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db
db:
image: ‘jc21/mariadb-aria:latest’
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ‘npm’
MYSQL_DATABASE: ‘npm’
MYSQL_USER: ‘npm’
MYSQL_PASSWORD: ‘npm’
volumes:
- ./mysql:/var/lib/mysql
When I looked at the logs of the Nginx container I see a repeating error of
[6/24/2023] [5:58:59 PM] [Global ] ›
error create table `migrations` (
id
int unsigned not null auto_increment primary key, `name` varchar(255), `batch` int, `migration_time` timestamp) - ER_CANT_CREATE_TABLE: Can’t create table `npm`.`migrations` (errno: 13 “Permission denied”)
I looked at the logs of the mariadb container and it shows that it has booted up and is listening.
So as a hail mary attempt I restarted the the mariadb container and the logs show a good communication between the Nginx container and the mariadb container, I can sign in again without issue, everything seems to be working as per normal. No problem right? Well, as soon as I reboot this machine or rebuild this docker-compose stack, I have the same problem every time. If I restart the mariadb container again it works as intended. I cannot figure out why this keeps failing when starting.
I have looked through the docker logs and found no issues. I am at a complete loss for anything else to look at. I can’t figure out why this is happening. If anyone can point me in a direction for a fix I would greatly appreciate it.