jarischaefer / docker-librenms

Docker image for LibreNMS
MIT License
115 stars 37 forks source link

No application encryption key has been specified. #137

Closed MeCJay12 closed 2 years ago

MeCJay12 commented 2 years ago

Hello! Recently setup this container migrating data from an existing standalone server. Everything is going well but when I run validate.sh, I get and error:

librenms@librenms:~$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 22.8.0
DB Schema | 2022_07_03_1947_add_app_data (244)
PHP       | 8.1.9
Python    | 3.10.4
Database  | MySQL 8.0.30
RRDTool   | 1.7.2
SNMP      | 5.9.1
====================================

[OK]    Composer Version: 2.4.1
[OK]    Dependencies up-to-date.

In EncryptionServiceProvider.php line 101:

  No application encryption key has been specified.

I am passing APP_KEY through but if I echo $APP_KEY in the container get nothing. Any idea? Is this even an issue? Docker run command:

docker run -d \
    --restart always \
    --network better_bridge \
    --name LibreNMS \
    -p 514:514 \
    -p 514:514/udp \
    -v /mnt/Docker/LibreNMS/logs:/opt/librenms/logs \
    -v /mnt/Docker/LibreNMS/rrd:/opt/librenms/rrd \
    -e DB_HOST=MySQL. \
    -e DB_NAME=LibreNMS \
    -e DB_USER=LibreNMS \
    -e DB_PASS="password" \
    -e BASE_URL=http://librenms.domain.com \
    -e ENABLE_SYSLOG=true \
    -e DAILY_ON_STARTUP=true \
    -e APP_KEY="base64:<generated>" \
    -e TZ="America/New_York" \
    -h librenms.domain.com \
    jarischaefer/docker-librenms
MeCJay12 commented 2 years ago

Found that my previous install had a base64 APP_KEY in the .env file that I needed to supply.