A collection of docker compose files that make it easy to setup a self-hosted home server with Immich, Jellyfin, and Nextcloud.
- Setup automatic backup and update for docker containers
- Add the option to not setup some of the containers
- Add the option to only allow certain twingate users access to certain apps
Docker engine install documentation
git clone https://github.com/godalming123/server-docker-files.git
cd server-docker-files
- Go to https://duckdns.org, and create an account with one domain for your server which has the
current_ip
option set to the IP address of your server - Edit
caddy/Caddyfile
, and enter your duckDNS token (can be found on the duckDNS website when you are signed in), and your domain
immich/.env
DB_PASSWORD=postgres # CHANGE THIS VALUE TO A RANDOM STRING OF LETTERS FOR SECURITY
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
nextcloud/.env
MYSQL_ROOT_PASSWORD=<CHANGE_THE_ROOT_PASSWORD_TO_A_RANDOM_STRING>
MYSQL_PASSWORD=<CHANGE_THE_PASSWORD_TO_A_RANDOM_STRING>
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud
MYSQL_HOST=db
OVERWRITECLIURL="https://nextcloud.<YOUR_DUCKDNS_DOMAIN>.duckdns.org"
OVERWRITEPROTOCOL="https"
Create a jellyfin/media
folder, and copy your media files there. If possible, try to convert media files to a codec that is supported on all of the devices that you use before you upload them. This means that the server does not have to convert the files to a codec that the client supports as the client is consuming them, which saves CPU, and can fix frame dropping issues. VLC media player can be used to do these conversions, although each file has to be manually converted.
sudo docker compose --project-directory immich up -d
sudo docker compose --project-directory jellyfin up -d
sudo docker compose --project-directory nextcloud up -d
sudo docker compose --project-directory caddy up -d
Go to https://imich.YOUR_DUCKDNS_DOMAIN.org/
, and setup your account. Immich has some AI features enabled out of the box that only ever run on the server, where the data is never sent to a third party. Howerver, this cuases the server to use 100% CPU until it has processed all of the photos that you upload when you import your photos and videos. These AI features can be disabled by pressing Administration -> Jobs -> Stop job.
Go to https://nextcloud.YOUR_DUCKDNS_DOMAIN.org/
, and setup your account.
Go to http://jellyfin.YOUR_DUCKDNS_DOMAIN.org/web/index.html#!/wizardstart.html
and setup your account.
Here is the command for debian:
sudo apt install unattended-upgrades
sudo systemctl enable --now unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades
Go to https://auth.twingate.com/signup-v2, and:
- Create a twingate account
- Setup a resoarce (with your server's IP address as a URL) and connector for your server
- Edit
twingate/docker-compose.yml
with the following contents:name: twingate services: twingate_connector: container_name: twingate_connector image: twingate/connector:latest environment: - TWINGATE_NETWORK=<ADD_YOUR_NETWORK_NAME_HERE> - TWINGATE_ACCESS_TOKEN=<ADD_YOUR_ACCESS_TOKEN_HERE> - TWINGATE_REFRESH_TOKEN=<ADD_YOUR_REFRESH_TOEKN_HERE> restart: unless-stopped
- Run docker compose up
sudo docker compose --project-directory twingate up -d
- Install twingate and sign in on the client that you want to access the network with
To keep your docker compose containers updated, run the following commands from the folders with the docker compose file in:
sudo docker compose pull
sudo docker compose up --force-recreate -d
sudo docker image prune -f