[Solved] static IP for Containers

Having any issues installing YAMS? This is the place to ask!
Post Reply
Freescreen
Posts: 4
Joined: Fri Mar 14, 2025 3:18 pm
Argentina

[Solved] static IP for Containers

Post by Freescreen »

Hi,

i have autobrr behind gluetun. So i must every restart update the IP Form radarr and sonarr.

How can i get static IP for the network containers.

I try this one to radarr, but there come an error:

Code: Select all

validating /opt/yams/docker-compose.yaml: services.networks Additional property default is not allowed

Code: Select all

networks:
    default:
        ipv4_address: 172.18.0.6

Any one can help me?

User avatar
rogs
Site Admin
Posts: 267
Joined: Mon Oct 23, 2023 12:53 pm
Location: Montevideo, Uruguay
Gender:
Contact:
Uruguay

Re: static IP for Containers

Post by rogs »

Hey @Freescreen!

You can follow this StackOverflow to add static IPs to your containers: https://stackoverflow.com/questions/394 ... er-compose

Cheers!

Roger.

YAMS Creator

E: roger (at) rogs.me. Fuck you, email bots.
W: https://rogs.me
gpg: curl -sL https://rogs.me/rogs.txt | gpg --import
fingerprint: ADDF BCB7 8B86 8D93 FC4E 3224 C7EC E9C6 C36E C2E6


Also, I love cats :mrgreen:

Pirate jet, pirate jet
Freescreen
Posts: 4
Joined: Fri Mar 14, 2025 3:18 pm
Argentina

Re: static IP for Containers

Post by Freescreen »

Thanks , it works!
yaml>

Code: Select all

networks:
  netya: # here we set the network name
    driver: bridge
    ipam:
      driver: default
      config:
      - subnet:  172.19.0.0/16
        gateway: 172.19.0.1

For containers>

Code: Select all

networks:
       netya:
         ipv4_address: 172.19.0.2
Post Reply