I use gitea in a docker container and when I tried setting a custom favicon & logo by putting the images to the GITEA_CUSTOM/public/assets/img, but none of the images i put there showed up. Tried redoing the process 7 times, It just didn’t work.
What steps did you take to replace images? Are you certain the $GITEA_CUSTOM
is correct folder? What does Docker compose.yml look like?
- Set the
GITEA_CUSTOM
variable in docker-compose.yml - Ran
docker-compose up -d
- Made
$GITEA_CUSTOM/public/assets/img
- Uploaded the files using
curl --output filename.png https://url-to-file.tld/file/image.png
. I also did the same with other .svg and .png files (i converted png files into svg before uploading them)
My docker-compose is:
version: '3'
networks:
gitea:
external: false
services:
server:
image: gitea/gitea:1.20.5
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA_CUSTOM=/data/gitea/custom
restart: always
networks:
- gitea
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- '3000:3000'
- '222:22'
I believe this is the incorrect directory. According to docs, it should be $GITEA_CUSTOM/public/img
(Customizing Gitea | Gitea Documentation).
I have not gotten any of this to work. I put a custom logo.svg in /img and if I run gitea help
, It says my CustomPath is /usr/local/bin/custom. So I’ve put the logo in /usr/local/bin/custom/public/assets/img, and I have put it in /usrl/local/bin/custom/assets/img.
When I look in Site Administration > Configuration, the Custom File Root Path is /var/lib/gitea/custom. So again, I put the file at /var/lib/gitea/custom/public/assets/img, and /var/lib/gitea/custom/public/img. I’ve tried restarting Gitea as a service, and none of these four paths replace the logo.