Command Line Installation
1. Download the latest Docker image
# Use the following command to pull the image directly when the network is normal
sudo docker pull vstarspace/lightedium:latest
Note: When unable to access DockerHub, please use the following command to pull the image
# The first command is to pull the image
# Currently available docker image acceleration sources:
# docker.xuanyuan.me
# docker.1panel.live
# docker.melikeme.cn
# a.ussh.net
# Use one of them as an acceleration mirror, for example:
sudo docker pull docker.xuanyuan.me/vstarspace/lightedium:latest
# The second command is to tag the image as Docker hub source, so it can be used when creating containers graphically
sudo docker tag docker.xuanyuan.me/vstarspace/lightedium:latest vstarspace/lightedium:latest
# sudo docker pull docker.1panel.live/vstarspace/lightedium:latest
# sudo docker tag docker.1panel.live/vstarspace/lightedium:latest vstarspace/lightedium:latest
# sudo docker pull docker.melikeme.cn/vstarspace/lightedium:latest
# sudo docker tag docker.melikeme.cn/vstarspace/lightedium:latest vstarspace/lightedium:latest
# sudo docker pull a.ussh.net/vstarspace/lightedium:latest
# sudo docker tag a.ussh.net/vstarspace/lightedium:latest vstarspace/lightedium:latest
2. Create a new folder: ./lightedium
Since files inside the Docker container will be deleted when the container is deleted;
Therefore, the host needs to map folders to the container to save data and files;
Note: Please replace /xxx with an appropriate path according to the actual directory structure in your NAS;
mkdir /xxx/lightedium
3. Create and start the container
Command to create a container using docker run:
docker run -d \
--name="lightedium" \
-v /xxx/lightedium:/data \
-v /xxx/folder1:/mnt/folder1 \
-v /xxx/folder2:/mnt/folder2 \
-p 8000:10240 \
-e TZ="Asia/Shanghai" \
-e LIGHTEDIUM_LOGIN_USERNAME="admin" \
-e LIGHTEDIUM_LOGIN_PASSWORD="admin123" \
-e LIGHTEDIUM_WORK_DIR="/data" \
--restart="unless-stopped" \
vstarspace/lightedium:latest
Description:
/xxx/lightedium/is the folder created in the previous step (i.e., the directory in the host), this is a directory that must be mapped (data persistence)
/xxx/folder1,/xxx/folder2are folders where existing photos are located; you can add multiple directories to be mapped according to the actual situation
/folder1,/folder2are just examples, please replace them according to the actual situation, note that the directory paths should not conflict with the container's internal system directories;We recommend that you uniformly place the directories to be mapped under the
/mntdirectory, which can avoid directory conflict issuesContainer internal system directory list: /bin, /boot, /dev, /etc, /home, /lib, /media, /mnt, /opt, /proc, /root, /run, /sbin, /srv, /sys, /tmp, /usr, /var, /lib64, /config
8000is the host's port,10240is the container's internal port, can be modified according to the actual situationTZ is the time zone,
Asia/Shanghaiis the China time zone, can be modified according to the actual situation
LIGHTEDIUM_LOGIN_USERNAMEis the login username,LIGHTEDIUM_LOGIN_PASSWORDis the login password, can be modified according to the actual situation
LIGHTEDIUM_WORK_DIRis the working directory, can be modified according to the actual situation and needs to be consistent with the directory mapped to /data
Docker Compose Installation
Note: docker compose has the same effect as creating a container with docker run above, just choose one of the methods to run;
Configure dockercompose.yml file
version: "3"
services:
lightedium:
image: vstarspace/lightedium:latest
container_name: lightedium
restart: unless-stopped
ports:
- "8000:10240"
volumes:
- /xxx/lightedium:/data:rw
- /xxx/folder1:/mnt/folder1:rw
- /xxx/folder2:/mnt/folder2:rw
environment:
# Set account (optional, comment out if not needed)
- LIGHTEDIUM_LOGIN_USERNAME=admin
# Set password (optional, comment out if not needed)
- LIGHTEDIUM_LOGIN_PASSWORD=admin123
# Set time zone
- TZ=Asia/Shanghai
# Set working directory (data storage, thumbnail storage)
- LIGHTEDIUM_WORK_DIR=/data
# If you need to set resource limits, uncomment the following
# deploy:
# resources:
# limits:
# cpus: '1.0'
# memory: 1G
Run
docker-compose up -d
# Or execute as follows with the new version of docker
docker compose up -d
Initial Installation
- Use a browser to open the address:
http://192.168.1.10:8000/, where 192.168.1.10 is the NAS IP, and 8000 is the mapped port number - Login account and password: admin/admin123
- Login to the page and add folders. If you have already uniformly mapped the folders to the /mnt directory, you can directly add the /mnt directory
FeiNiu FnOS Installation Tutorial
Bilibili video tutorial: https://www.bilibili.com/video/BV1vk7ZzDE95/
Synology Installation Tutorial
Bilibili video tutorial: https://www.bilibili.com/video/BV1GdE1z7EvZ/