This media server is designed to run a variety of services, including:
- Immich Server: a photo and video sharing platform
- Immich Machine Learning: a machine learning model for image and video processing
- Redis: an in-memory data store
- PostgreSQL: a relational database
- Plex: a media management and streaming platform
- Nginx: a web server and reverse proxy
- Container Name:
immich_server
- Environment Variables:
UPLOAD_LOCATION
: the location of media files on the host machine (default:./immich/library
)EXTERNAL_LIB
: a library path for external media
- Container Name:
immich_machine_learning
- Environment Variables:
UPLOAD_LOCATION
: the location of media files on the host machine
- Container Name:
immich_redis
- Container Name:
immich_postgres
- Environment Variables:
POSTGRES_PASSWORD
: your database password (default:postgres
)POSTGRES_USER
: your database username (default:postgres
)POSTGRES_DB
: your database name (default:immich
)
- Container Name:
plex
- Environment Variables:
PUID
: the user ID for Plex to run asPGID
: the group ID for Plex to run asTZ
: the timezone for Plex to usePLEX_CLAIM_TOKEN
: your Plex server claim token (replace with your own token)
- Container Name:
nginx
- Ports:
80:80
443:443
- Nginx reverse proxy is setup to expose the media services outside the home network using the public IP of the host. By default this is setup using
http
which is insecure. - There are many ways to setup
SSL/https
. Place SSLkey.pem
andcert.pem
in./ssl
folder. If you own a custom domain, cloudflare is the simplest and most secure option if setup correctly; even better if a tunnel is used.
The following volumes are mounted:
model-cache
: a cache directory for model storage/etc/localtime:/etc/localtime:ro
: syncs the container's time with the host's time/var/lib/postgresql/data
: mounts the database storage directory./plexmediaserver
: mounts the Plex server application data directory./ssl
: mounts the SSL certificate and key files
To run the media server, navigate to the media-server
directory in your terminal and run the following command:
sudo docker compose up -d
This will start all containers in detached mode. You can view the logs for each container using the following command:
sudo docker compose logs --follow <container_name>
Replace <container_name>
with the name of the container you want to view the logs for.
To stop the media server, run the command:
sudo docker compose down
- The
hwaccel.*.yml
files contain docker configurations for hardware acceleration usingopenvino
for Intel CPUs, andcuda
for nvidia GPUs, for Immich. - The
docker-compose.yml
usesopenvino
by default. - HW acceleration in Plex can be enabled from the web interface.
- Copy
sample-configs/.env
into the root of this project (same location asdocker-compose.yml
). - Update all placeholder variables with your own values.
- Make sure to replace
postgres
with a secure password for PostgreSQL. - For individual services, refer to their docker-compose documentations for more options.