ronwit
Member
OP
Budget King
- Joined:
- Jun 2024
- Posts:
- 122
- From:
- Osaka, Japan
Actually I want to share my docker compose for tiny vps, basically 2GB ram on Contabo KVM plan (´・ω・`)
14 containers running: nginx proxy manager, pihole, nextcloud, jellyfin, *mumbles*... maybe too much? I dont know
Here is compose.yaml (please be gentle xd)
version: '3.8'
services:
npm:
image: jc21/nginx-proxy-manager:latest
ports: "80:80" "443:443" "81:81"
pihole:
image: pihole/pihole
environment: TZ=Asia/Tokyo
nextcloud:
image: nextcloud:apache
depends_on: db
db:
image: mariadb
environment: MYSQL_ROOT_PASSWORD=secret
jellyfin:
image: jellyfin/jellyfin
# ...and 9 more actually~
Basically I think 2GB is enough for everything if I just add swap but nginx sometimes OOM killer comes (´;ω;`)
Anyone want to audit? Maybe we make starter pack repo for low-end docker...? (´・ω・`)
instant noodles, instant deploys
sofialund
Member
homelab heatstroke
- Joined:
- Jul 2024
- Posts:
- 140
- From:
- Buenos Aires, Argentina
¡the setup ambitious is! But the memory available small, no? Vos tenés 14 containers with the database heavy~
I see the swap of 2GB also. ¡the swap slow is, not solution!
The problem main: the Nextcloud with the MariaDB together eat the RAM much. ¡and the Jellyfin with the video transcoding! Caramba, vos need the hardware acceleration or the CPU will cry~
My suggestion: separate the host in two VPS small, or use the SQLite for the light things. ¡the Pihole alone uses the memory 150MB! (´・ω・`) no, wait, that face not mine~
hot air, steady hand, magic smoke
kasiaxus
Member
- Joined:
- Aug 2024
- Posts:
- 74
- From:
- Wrocław, Poland
My OVHcloud box , 1GB ram, this runs 6 containers only xd
Your compose missing memory limits, this is why OOM kills nginx actually
services:
npm:
deploy:
resources:
limits:
memory: 128M
Without limits, docker eats everything, voilà... wait, not my line xd
Swap on Contabo ssd is okay for logs, not for active database, this will be slow like my old pentium
Maybe start pack should have base limits for every service? I can help with this, have some templates from my setup
POLISH SERVERS. LOUD FANS. GOOD PRICE.
ronwit
Member
OP
Budget King
- Joined:
- Jun 2024
- Posts:
- 122
- From:
- Osaka, Japan
Oof, the caddy suggestion hits different. I was so proud of my npm setup (´・ω・`)
But yeah, jellyfin transcode made my cpu stay at 90% when my sister watched anime. Dropped it last night, freed 400MB instantly. MariaDB still eating 350MB tho, maybe sqlite for nextcloud personal use?
Also @Hel your 1.8GB after hypervisor, how you know this? Contabo panel shows 2GB but maybe lies? https://my.contabo.com Xd
instant noodles, instant deploys
kasiaxus
Member
- Joined:
- Aug 2024
- Posts:
- 74
- From:
- Wrocław, Poland
Contabo panel shows 2GB but maybe lies?
Not lies, just linux. Kernel, systemd, docker daemon, all eat before containers start. On my OVHcloud 1GB box, `free -h` shows 850MB usable. Normal.
Here is my starter template for 2GB, tested on OVHcloud and Hetzner:
services:
caddy:
image: caddy:alpine
deploy:
resources:
limits:
memory: 64M
pihole:
image: pihole/pihole
deploy:
resources:
limits:
memory: 128M
nextcloud:
image: nextcloud:apache
deploy:
resources:
limits:
memory: 256M
db:
image: postgres:alpine
deploy:
resources:
limits:
memory: 128M
command: >
postgres -c shared_buffers=32MB
-c effective_cache_size=64MB
-c work_mem=4MB
Postgres tuneable better than MariaDB for small ram, voilà.
POLISH SERVERS. LOUD FANS. GOOD PRICE.