pztrn 9eebc61f9a
ci/woodpecker/tag/build Pipeline was successful
Remove crond from busybox launching.
2026-08-11 21:22:44 +05:00
2026-07-24 20:15:08 +05:00
2026-08-11 21:22:44 +05:00
2026-08-11 21:22:44 +05:00

inn2 Docker container

This repository holds files neccessary to build inn2 (InterNet News 2), a NNTP server.

This container is based on greenbender's image and includes enabled nocems processing and cleanfeed.

Usage

Configuration files are described on inn official site (select proper version from right sidebar).

Using this container with compose is simple:

---
services:
  inn:
    image: "code.pztrn.name/containers/inn2"
    restart: always
    ports:
      - 119:119
      - 563:563
    volumes:
      - "./data/db:/inn2/db"
      - "./data/etc:/inn2/etc"
      - "./data/log:/inn2/log"
      - "./data/run:/inn2/run"
      - "./data/spool:/inn2/spool"
      - "./data/tmp:/inn2/tmp"
      - "./data/syslog:/var/log"
      - "./data/www:/var/www"
    ulimits:
      nofile:
        soft: 65535
        hard: 65535

It is recommended to use macvlan/ipvlan network for container so real user IP will flow within inn2 as by default it will be docker's network gateway for compose project. For that compose file will looks like:

---
services:
  inn:
    image: "code.pztrn.name/containers/inn2:2.7.4"
    restart: always
    volumes:
      - "./data/db:/inn2/db"
      - "./data/etc:/inn2/etc"
      - "./data/log:/inn2/log"
      - "./data/run:/inn2/run"
      - "./data/spool:/inn2/spool"
      - "./data/tmp:/inn2/tmp"
      - "./data/syslog:/var/log"
      - "./data/www:/var/www"
    networks:
      inn2-ipvlan:
        ipv4_address: 192.168.168.168 # ip address from real LAN.
        ipv6_address: fd00:0:1:2::168 # ip address from real LAN.
    ulimits:
      nofile:
        soft: 65535
        hard: 65535

networks:
  inn2-ipvlan:
    driver: ipvlan
    driver_opts:
      parent: ens18 # put your real interface name here.
      ipvlan_mode: l2
    ipam:
      config:
        - subnet: 192.168.168.160/27 # put real LAN subnet here.
          gateway: 192.168.168.161 # put real LAN gateway here.
          ip_range: 192.168.168.168/32 # ip address from real LAN.
        - subnet: fd00:0:1:2::/64 # put real LAN subnet here.
          gateway: fd00:0:1:2::1 # put real LAN gateway here.
          ip_range: fd00:0:1:2::168/128 # ip address from real LAN.
    enable_ipv6: true

Note that this code is built to support dual-stack (IPv4+IPv6). You should either:

  1. Remove IPv6 things if not using it.
  2. Set up SNAT6 for outgoing connections to work (on host or router).
  3. Add globally routable address to IPAM config and network definition in container.

Cronjobs

INN requires some cronjobs to be executed due to it's architecture. Previously this image was launching crond from busybox, but it is a pain to configure it to work properly, so you should use some external cron service.

Example from oldproto.ru:

# min   hour    day     month   weekday command
0       0       *       *       *       docker compose exec -u news inn news.daily expireover lowmark delayrm norotate
15      *       *       *       *       docker compose exec -u news inn rnews -U
0       4       *       *       *       docker compose exec -u news inn ctlinnd -t 120 -s reload incoming.conf 'flush cache'
*/10    *       *       *       *       docker compose exec -u news inn nntpsend
15      5       *       *       *       docker compose exec -u news inn ctlinnd flush inpaths!
30      5       *       *       *       docker compose exec -u news inn sendinpaths -c
30      4       *       *       *       docker compose exec -u news inn actsyncd /inn2/etc/actsync.cfg

Sending emails

As this container has no postfix installed (why do you might ever need it here?) you can use ssmtp which installed in container to get mails sent over SMTP.

No See 'Em's

This container has nocem enabled and neccessary data will be loaded on first start from NoCeM registry.

Make sure you have news.lists.filters group created.

Cleanfeed

Cleanfeed is automatically installed from infybofh's repository. Configuration is located in /inn2/etc/cleanfeed directory within container, please configure it according to your needs.

Versioning

Image versioning follows official inn2 versions with additional optional version postfix added to indicate image fixes for particular version.

Examples:

  • 2.7.4-3 - inn version 2.7.4 and 3 additional fixes applied to container or inn's dependencies.
  • 2.7.6 - inn version 2.7.6 without additional container fixes.

All notable changes to container and it's building process are noted in CHANGELOG.md.

Data directories and permissions

Configuration is kept in /inn2/etc, mount it in your local filesystem. Entrypoint script will copy default configuration for you if missing.

This container exposes /inn2/db, /inn2/spool, /inn2/log as volumes, so you may either:

  • Leave as is, Docker will create separate volume for your data.
  • Mount volume somewhere, like in compose example above.

inn2 is launched as UID/GID 600 in container, so chown directories properly according to your Docker configuration:

  • If you're not using userns isolation - use chown 600:600.
  • If you're using it - use 600 + id from /etc/subuid, e.g. if you're using default Docker remapping this could be chown 100600:100600.

Logs

Logs are split in two destinations:

  • /inn2/log - default INN logs destination.
  • /var/log - syslog logs.

As INN might log in both of them you should mount a directory for each.

For syslog logs it is a known bug that logs isn't written in /var/log/innd or /var/log/nnrpd, take a look at /var/log/syslogd/everything/current for logs with news topic. This might be fixed somewhere soon.

S
Description
InterNet News version 2 in Docker.
Readme
85 KiB
Languages
Dockerfile 53.9%
Shell 46.1%