H
Homarr2d ago
artrin

Problem with deployment through docker

Hi, I used to have a Homarr instance on another pc, I copied the dokcer-compose.yml file but when deploying for some reasons it can't create the things it need to work and (db, redis, trusted-certificates) and so when trying to connect it gives error 500. It is running with my user privileges, as any other docker container I run and I am the owner of the directory it should create those things into. What can I do?
Solution:
Running as a different user | Homarr documentation
By default the container is running with user root and group root.
Jump to solution
11 Replies
Cakey Bot
Cakey Bot2d ago
Thank you for submitting a support request. Depending on the volume of requests, our team should get in contact with you shortly.
⚠️ Please include the following details in your post or we may reject your request without further comment: - Log (See https://homarr.dev/docs/community/faq#how-do-i-open-the-console--log) - Operating system (Unraid, TrueNAS, Ubuntu, ...) - Exact Homarr version (eg. 0.15.0, not latest) - Configuration (eg. docker-compose, screenshot or similar. Use ``your-text`` to format) - Other relevant information (eg. your devices, your browser, ...)
Frequently Asked Questions | Homarr documentation
Can I install Homarr on a Raspberry Pi?
Manicraft1001
Manicraft10012d ago
!qa required_data
Cakey Bot
Cakey Bot2d ago
Thank you for your question. Our support team has noted that your request does not meet the minimum required data so we are unable to answer your question. Please provide: - your Homarr logs - your setup configuration (eg. docker compose, docker run, helm chart, screenshot, ...) - A detailed description of your problem or question with additional images where necessary - Your operating system - Version of Homarr (do not say latest! say 0.15.2, ...) Failure to comply with this will result in a permanent closure of your support request.
artrin
artrinOP2d ago
sorry this is the homarr log:
Solution
Manicraft1001
Manicraft10012d ago
Running as a different user | Homarr documentation
By default the container is running with user root and group root.
artrin
artrinOP2d ago
yes, but as with every other docker container, it runs as 1000:1000 as stated in the .env file. Here is the docker-compose.yml services: homarr: container_name: homarr image: ghcr.io/homarr-labs/homarr:latest restart: unless-stopped networks: - default - socket_proxy volumes: - ${DOCKERPATH}Homarr/appdata:/appdata ports: - 7575:7575 env_file: - '/home/artrin/home-media-server/.env' environment: - SECRET_ENCRYPTION_KEY=76b33d33e1aba6f436a7c5e4f62ea87d978f015b9e405498d6e4e844745d5085 should i let it run as root? I don't understant why only homarr has this issue with permissions
Manicraft1001
Manicraft10012d ago
!qa leaked_secret_key
Cakey Bot
Cakey Bot2d ago
Our team noted that at least one of your messages contains a secrets encryption key used in Homarr. As documented at the installation docs, the secrets encryption key is a cruicial key that will be used to encrypt your data. By posting this key you compromised part of your security and we strongly recommend you to change it, since malicious acters could gain access to your integration passwords, usernames and tokens by decrypting your database if they gain access to said database. To do this, update the secrets encryption key variable. Doing so will break all integrations and you must manually re-enter the secrets again. Manually removing it after posting does not fix your issue since automated bots can and will scrape messages for leaked data. To avoid such problems in the future, please always remove the encryption key when posting online. The Homarr team will never ask you for any passwords or the secrets encryption key.
Docker | Homarr documentation
Docker is our recommended installation method for beginners and professionals.
Manicraft1001
Manicraft10012d ago
You can run as root (which will likely "fix" the problem), but for running with any other user, you must follow the guide I've linked you
artrin
artrinOP2d ago
ok I've just looked on the documentation you sent about using different user and apparently the issue is that it creates the folder appdata/ and only then changes user from root to 1000 so the owner of appdata was root, I changed that and now it works! don't know why this happens tho

Did you find this page helpful?