Transferium is an optional Netpicker container that acts as a file server for network devices. It supports SCP, SFTP, FTP and TFTP for configuration backups, configuration restores and operating system image transfers.
This article explains how to enable Transferium, configure network access and resolve SSH port conflicts.
For platform-specific file-transfer configurations, see File Transfer YAML.
Before you start
- Netpicker is installed with Docker Compose.
- You know the IP address on the Netpicker host that your network devices can reach.
- You have console or out-of-band access to the host in case SSH access is interrupted while changing its settings.
Step 1: Choose how to resolve the port 22 conflict
Transferium uses TCP port 22 for SCP/SFTP, which the host operating system's SSH service normally uses. This conflict can be resolved using either of the following approaches:
| Option A: Change host SSH port | Option B: Secondary IP | |
|---|---|---|
| Host SSH | 192.168.10.100:2222 | 192.168.10.100:22 |
| Transferium | 192.168.10.100:22 | 192.168.10.101:22 |
| Additional IP required | No | Yes |
| Best when | Host SSH port can change | Host SSH must remain on port 22 |
The IP addresses, port 2222 and interface name ens160 used in this article are examples. Replace them with values appropriate for your environment.
Step 2: Prepare the host
Option A: Move host SSH to port 2222
1. Allow the new SSH port through the firewall before changing the SSH configuration.
For Ubuntu/Debian with UFW:
sudo ufw allow 2222/tcp
For RHEL with firewalld:
sudo firewall-cmd --permanent --add-port=2222/tcp
sudo firewall-cmd --reload
On RHEL with SELinux enforcing, register the new SSH port if it is not already assigned:
sudo semanage port -a -t ssh_port_t -p tcp 2222
2. Edit /etc/ssh/sshd_config and configure:
Port 2222
Ensure there are no conflicting Port or ListenAddress directives in /etc/ssh/sshd_config.d/.
3. Validate the configuration and restart SSH:
sudo sshd -t
sudo systemctl restart ssh
The service is called sshd on RHEL.
On Ubuntu 24.04 installations using SSH socket activation, apply the changes using:
sudo systemctl daemon-reload
sudo systemctl restart ssh.socket
On Ubuntu 22.10 to 23.04, the port in sshd_config is not applied to the socket automatically. Set it in a drop-in for ssh.socket (ListenStream=2222) instead.
4. Verify SSH access on the new port.
Keep your existing SSH session open and test from a second terminal:
ssh -p 2222 [email protected]
5. Confirm that TCP port 22 is available:
sudo ss -ltnp 'sport = :22'
There should be no listening service on TCP port 22.
Option B: Add a secondary IP address for Transferium
1. Identify the network interface and assign an available secondary IP address:
ip -br address
sudo ip addr add 192.168.10.101/24 dev ens160
This configuration is temporary and will be lost after a reboot. Configure the address persistently using Netplan, NetworkManager or your distribution's network configuration before deploying Transferium. Otherwise the container will fail to start after a reboot, because Docker cannot bind to an address that does not exist.
2. Edit /etc/ssh/sshd_config and restrict SSH to the primary IP address:
ListenAddress 192.168.10.100
Ensure there are no additional wildcard or conflicting ListenAddress directives in the SSH configuration files.
3. Validate and restart SSH as described in Option A.
4. Verify the SSH listening address:
sudo ss -ltnp 'sport = :22'
SSH should be listening on 192.168.10.100:22, not on 0.0.0.0:22, [::]:22 or the secondary IP address.
Confirm that administrative SSH access still works before closing your existing session:
ssh [email protected]
Step 3: Add Transferium to Docker Compose
Transferium can be configured using either:
- The provided
options/transferium.ymlfile. - Your existing
docker-compose.override.ymlfile, by adding the Transferium configuration.
If using passive FTP, set FTP_PASV_ADDRESS to the Transferium IP address reachable by your network devices.
The following configuration is an example for Option A:
services:
transferium:
image: netpicker/transferium
container_name: transferium
restart: unless-stopped
volumes:
- transferium:/transferium:z
environment:
FTP_PASV_ADDRESS: "192.168.10.100"
FTP_PASV_PORTS: "31000-31015"
ports:
- "22:22/tcp" # SCP / SFTP
- "21:21/tcp" # FTP control
- "20:20/tcp" # FTP active data
- "31000-31015:31000-31015/tcp" # FTP passive data
- "69:69/udp" # TFTP
healthcheck:
test: ["CMD", "/usr/local/bin/healthcheck"]
start_period: 5s
interval: 60s
volumes:
transferium:
When adding this configuration to an existing override file, merge it into the existing services: and volumes: sections rather than duplicating them.
For Option B, set FTP_PASV_ADDRESS to 192.168.10.101 and replace the port mappings as follows:
ports:
- "192.168.10.101:22:22/tcp"
- "192.168.10.101:21:21/tcp"
- "192.168.10.101:20:20/tcp"
- "192.168.10.101:31000-31015:31000-31015/tcp"
- "192.168.10.101:69:69/udp"
This ensures that Transferium publishes its ports only on the secondary IP address.
Important: When more than one Compose file is used, Docker Compose adds the ports entries from each file together rather than replacing them. Either edit the port mappings in the file that defines Transferium, or start the list in your override file with ports: !override (Docker Compose 2.24.4 or later). Otherwise the original 22:22 mapping remains and the container will fail to start or will listen on all IP addresses.
Network and firewall requirements
Ensure that network devices can reach the Transferium IP address and that routing and firewall policies permit the required file-transfer traffic:
| Protocol | Port |
|---|---|
| SCP / SFTP | TCP 22 |
| FTP | TCP 20, 21 |
| FTP passive data | TCP 31000–31015 |
| TFTP | UDP 69 |
Remove the port mappings for protocols you do not use. For example, if your devices only use SCP/SFTP, publish only TCP port 22.
Note: Docker-published ports may bypass standard host firewall rules, such as UFW. Restrict access to authorized device networks using appropriate Docker firewall rules or an upstream network firewall.
Step 4: Start Transferium
If Transferium is configured in docker-compose.override.yml:
docker compose config --quiet
docker compose up -d transferium
If you are using the options file:
docker compose \
-f docker-compose.yml \
-f docker-compose.override.yml \
-f options/transferium.yml \
up -d transferium
Include all Compose files used by your installation and omit the override file if it does not exist. Use the same combination of Compose files for subsequent deployment and maintenance operations.
Use docker compose config with the same file arguments to verify the effective configuration, particularly the published ports.
Step 5: Configure Netpicker
In the Netpicker UI, navigate to Admin → Settings and configure the environment variable:
SHENV_JUMP_HOST
Set its value to the Transferium IP address that your network devices can reach:
- Option A: 192.168.10.100
- Option B: 192.168.10.101
Step 6: Verify the setup
On the Netpicker host, run:
docker ps --filter name=transferium
docker port transferium
docker logs --tail=100 transferium
Confirm that:
- The Transferium container is running and healthy.
- The ports are published on the intended IP address.
- There are no errors in the container logs.
From a machine on the device management network, verify that the SCP/SFTP port is reachable:
nc -vz 192.168.10.100 22
Use the secondary IP address if you selected Option B.
Finally, run a file-transfer job against a test device to verify that the complete transfer process works.
