herlesupreeth
docker_open5gs
Shell

Docker files to run open5gs + IMS + eNB + gNB + NR-UE in a docker

Last updated Jul 9, 2026
548
Stars
308
Forks
125
Issues
+2
Stars/day
Attention Score
90
Language breakdown
No language data available.
Files click to expand
README

docker_open5gs

Quite contrary to the name of the repository, this repository contains docker files to deploy an Over-The-Air (OTA) or RF simulated 4G/5G network using following projects:
  • Core Network (4G/5G) - open5gs - https://github.com/open5gs/open5gs
  • IMS (VoLTE + VoNR) - kamailio - https://github.com/kamailio/kamailio
  • IMS HSS - https://github.com/nickvsnetworking/pyhss
  • Osmocom HLR - https://github.com/osmocom/osmo-hlr
  • Osmocom MSC - https://github.com/osmocom/osmo-msc
  • srsRAN4G (4G eNB + 4G UE + 5G UE) - https://github.com/srsran/srsRAN4G
  • srsRANProject (5G gNB) - https://github.com/srsran/srsRANProject
  • UERANSIM (5G gNB + 5G UE) - https://github.com/aligungr/UERANSIM
  • eUPF (5G UPF) - https://github.com/edgecomllc/eupf
  • OpenSIPS IMS - https://github.com/OpenSIPS/opensips
  • Sigscale OCS - https://github.com/sigscale/ocs
  • Osmo-epdg + Strongswan-epdg
- https://gitea.osmocom.org/erlang/osmo-epdg - https://gitea.osmocom.org/ims-volte-vowifi/strongswan-epdg
  • SWu-IKEv2 - https://github.com/fasferraz/SWu-IKEv2

Table of Contents

- Get Pre-built Docker images - Build Docker images from source - Single Host setup configuration - Multihost setup configuration - 4G deployment - 5G SA deployment - Provisioning of SIM information in open5gs HSS - Provisioning of IMSI and MSISDN with OsmoHLR - Provisioning of SIM information in pyHSS - Provisioning of Diameter Peer + Subscriber information in Sigscale OCS - Pre-requisites - Deploy the required components - Provision SIM and IMS subscriber information - Manually configure DNS settings on your phone (WiFi connection) - UE configuration

Tested Setup

Docker host machine

  • Ubuntu 22.04 or above
Over-The-Air setups:
  • srsRAN_Project gNB using Ettus USRP B210
  • srsRAN_Project (5G gNB) using LibreSDR (USRP B210 clone)
  • srsRAN_4G eNB using LimeSDR Mini v1.3
  • srsRAN_4G eNB using LimeSDR-USB
  • srsRAN_4G eNB using LibreSDR (USRP B210 clone)
RF simulated setups:
  • srsRAN_4G (eNB + UE) simulation over ZMQ
  • srsRANProject (5G gNB) + srsRAN4G (5G UE) simulation over ZMQ
  • UERANSIM (gNB + UE) simulator

Prepare Docker images

  • Mandatory requirements:
* docker-ce - Version 22.0.5 or above * docker compose - Version 2.14 or above

You can either pull the pre-built docker images or build them from the source.

Get Pre-built Docker images

Pull base images:

docker pull ghcr.io/herlesupreeth/docker_open5gs:master docker tag ghcr.io/herlesupreeth/dockeropen5gs:master dockeropen5gs

docker pull ghcr.io/herlesupreeth/docker_grafana:master docker tag ghcr.io/herlesupreeth/dockergrafana:master dockergrafana

docker pull ghcr.io/herlesupreeth/docker_metrics:master docker tag ghcr.io/herlesupreeth/dockermetrics:master dockermetrics

You can also pull the pre-built images for additional components

For IMS components:

docker pull ghcr.io/herlesupreeth/docker_osmohlr:master docker tag ghcr.io/herlesupreeth/dockerosmohlr:master dockerosmohlr

docker pull ghcr.io/herlesupreeth/docker_osmomsc:master docker tag ghcr.io/herlesupreeth/dockerosmomsc:master dockerosmomsc

docker pull ghcr.io/herlesupreeth/docker_pyhss:master docker tag ghcr.io/herlesupreeth/dockerpyhss:master dockerpyhss

docker pull ghcr.io/herlesupreeth/docker_kamailio:master docker tag ghcr.io/herlesupreeth/dockerkamailio:master dockerkamailio

docker pull ghcr.io/herlesupreeth/docker_mysql:master docker tag ghcr.io/herlesupreeth/dockermysql:master dockermysql

docker pull ghcr.io/herlesupreeth/docker_opensips:master docker tag ghcr.io/herlesupreeth/dockeropensips:master dockeropensips

For srsRAN components:

docker pull ghcr.io/herlesupreeth/docker_srslte:master docker tag ghcr.io/herlesupreeth/dockersrslte:master dockersrslte

docker pull ghcr.io/herlesupreeth/docker_srsran:master docker tag ghcr.io/herlesupreeth/dockersrsran:master dockersrsran

For UERANSIM components:

docker pull ghcr.io/herlesupreeth/docker_ueransim:master docker tag ghcr.io/herlesupreeth/dockerueransim:master dockerueransim

For EUPF component:

docker pull ghcr.io/herlesupreeth/docker_eupf:master docker tag ghcr.io/herlesupreeth/dockereupf:master dockereupf

For Sigscale OCS component:

docker pull ghcr.io/herlesupreeth/docker_ocs:master docker tag ghcr.io/herlesupreeth/dockerocs:master dockerocs

For Osmo-epdg + Strongswan-epdg component:

docker pull ghcr.io/herlesupreeth/docker_osmoepdg:master docker tag ghcr.io/herlesupreeth/dockerosmoepdg:master dockerosmoepdg

For SWu-IKEv2 component:

docker pull ghcr.io/herlesupreeth/dockerswuclient:master docker tag ghcr.io/herlesupreeth/dockerswuclient:master dockerswuclient

Build Docker images from source

Clone repository and build base docker image of open5gs, kamailio, srsRAN4G, srsRANProject, ueransim

# Build docker image for open5gs EPC/5GC components
git clone https://github.com/herlesupreeth/docker_open5gs
cd docker_open5gs/base
docker build --no-cache --force-rm -t docker_open5gs .

Build docker image for kamailio IMS components

cd ../ims_base docker build --no-cache --force-rm -t docker_kamailio .

Build docker image for srsRAN_4G eNB + srsUE (4G+5G)

cd ../srslte docker build --no-cache --force-rm -t docker_srslte .

Build docker image for srsRAN_Project gNB

cd ../srsran docker build --no-cache --force-rm -t docker_srsran .

Build docker image for UERANSIM (gNB + UE)

cd ../ueransim docker build --no-cache --force-rm -t docker_ueransim .

Build docker image for EUPF

cd ../eupf docker build --no-cache --force-rm -t docker_eupf .

Build docker image for OpenSIPS IMS

cd ../opensipsimsbase docker build --no-cache --force-rm -t docker_opensips .

Build docker image for Osmo-epdg + Strongswan-epdg

cd ../osmoepdg docker build --no-cache --force-rm -t docker_osmoepdg .

Build docker image for SWu-IKEv2

cd ../swu_client docker build --no-cache --force-rm -t dockerswuclient .

Build docker images for additional components

cd ..
set -a
source .env
set +a
sudo ufw disable
sudo sysctl -w net.ipv4.ip_forward=1
sudo cpupower frequency-set -g performance

For 4G deployment only

docker compose -f 4g-volte-deploy.yaml build

For 5G deployment only

docker compose -f sa-deploy.yaml build

Network and deployment configuration

The setup can be mainly deployed in two ways:

  • Single host setup where eNB/gNB and (EPC+IMS)/5GC are deployed on a single host machine
  • Multi host setup where eNB/gNB is deployed on a separate host machine than (EPC+IMS)/5GC

Single Host setup configuration

Edit only the following parameters in .env as per your setup
MCC
MNC
DOCKERHOSTIP --> This is the IP address of the host running your docker setup
UEIPV4INTERNET --> Change this to your desired (Not conflicted) UE network ip range for internet APN
UEIPV4IMS --> Change this to your desired (Not conflicted) UE network ip range for ims APN

Multihost setup configuration

4G deployment

On the host running the (EPC+IMS)

Edit only the following parameters in .env as per your setup

MCC MNC DOCKERHOSTIP --> This is the IP address of the host running (EPC+IMS) SGWUADVERTISEIP --> Change this to value of DOCKERHOSTIP UEIPV4INTERNET --> Change this to your desired (Not conflicted) UE network ip range for internet APN UEIPV4IMS --> Change this to your desired (Not conflicted) UE network ip range for ims APN

Under mme section in docker compose file (4g-volte-deploy.yaml), uncomment the following part

...     # ports:     #   - "36412:36412/sctp" ...

Then, uncomment the following part under sgwu section

...     # ports:     #   - "2152:2152/udp" ...

On the host running the eNB

Edit only the following parameters in .env as per your setup

MCC MNC DOCKERHOSTIP --> This is the IP address of the host running eNB MME_IP --> Change this to IP address of host running (EPC+IMS) SRSENBIP --> Change this to the IP address of the host running eNB

Replace the following part in the docker compose file (srsenb.yaml)

networks:       default:         ipv4address: ${SRSENB_IP} networks:   default:     external:       name: dockeropen5gsdefault
with
network_mode: host

5G SA deployment

On the host running the 5GC

Edit only the following parameters in .env as per your setup

MCC MNC DOCKERHOSTIP --> This is the IP address of the host running 5GC UPFADVERTISEIP --> Change this to value of DOCKERHOSTIP UEIPV4INTERNET --> Change this to your desired (Not conflicted) UE network ip range for internet APN UEIPV4IMS --> Change this to your desired (Not conflicted) UE network ip range for ims APN

Under amf section in docker compose file (sa-deploy.yaml), uncomment the following part

...     # ports:     #   - "38412:38412/sctp" ...

Then, uncomment the following part under upf section

...     # ports:     #   - "2152:2152/udp" ...

On the host running the gNB

Edit only the following parameters in .env as per your setup

MCC MNC DOCKERHOSTIP --> This is the IP address of the host running gNB AMF_IP --> Change this to IP address of host running 5GC SRSGNBIP --> Change this to the IP address of the host running gNB

Replace the following part in the docker compose file (srsgnb.yaml)

networks:       default:         ipv4address: ${SRSGNB_IP} networks:   default:     external: true     name: dockeropen5gsdefault
with
network_mode: host

Network Deployment

4G deployment
# 4G Core Network + IMS + SMS over SGs (uses Kamailio IMS)
docker compose -f 4g-volte-deploy.yaml up

4G Core Network + IMS + SMS over SGs (uses openSIPS IMS)

docker compose -f 4g-volte-opensips-ims-deploy.yaml up

srsRAN eNB using SDR (OTA)

docker compose -f srsenb.yaml up -d && docker container attach srsenb

srsRAN ZMQ eNB (RF simulated)

docker compose -f srsenbzmq.yaml up -d && docker container attach srsenbzmq

srsRAN ZMQ 4G UE (RF simulated)

docker compose -f srsuezmq.yaml up -d && docker container attach srsuezmq

4G Core Network + IMS + SMS over SGs (uses Kamailio IMS) + Osmo-epdg + Strongswan-epdg

docker compose -f 4g-volte--vowifi-deploy.yaml up

SWu-IKEv2 (ePDG testing)

docker compose -f swuclient.yaml up -d && docker container attach swuclient
5G SA deployment
# 5G Core Network
docker compose -f sa-deploy.yaml up

srsRAN gNB using SDR (OTA)

docker compose -f srsgnb.yaml up -d && docker container attach srsgnb

srsRAN ZMQ gNB (RF simulated)

docker compose -f srsgnbzmq.yaml up -d && docker container attach srsgnbzmq

srsRAN ZMQ 5G UE (RF simulated)

docker compose -f srsue5gzmq.yaml up -d && docker container attach srsue5gzmq

UERANSIM gNB (RF simulated)

docker compose -f nr-gnb.yaml up -d && docker container attach nr_gnb

UERANSIM NR-UE (RF simulated)

docker compose -f nr-ue.yaml up -d && docker container attach nr_ue

Docker Compose files overview

This repository provides several Docker Compose files to support different deployment scenarios and components. Below is a summary of the compose files and their purposes:

| Compose File | Description | |------------------------------------|----------------------------------------------------------------------------------------------------| | 4g-volte-deploy.yaml | Deploys 4G Core Network (EPC) with IMS (VoLTE) using Kamailio. | | 4g-volte-opensips-ims-deploy.yaml| Deploys 4G Core Network with IMS using OpenSIPS. | | sa-deploy.yaml | Deploys 5G Standalone (SA) Core Network (5GC). | | sa-vonr-deploy.yaml | Deploys 5G Standalone (SA) Core Network (5GC) with IMS (VoNR) using Kamailio. | | srsenb.yaml | Deploys srsRAN 4G eNB for OTA setups using SDR hardware. | | srsenb_zmq.yaml | Deploys srsRAN 4G eNB for RF simulated setups over ZMQ. | | srsue_zmq.yaml | Deploys srsRAN 4G UE for RF simulated setups over ZMQ. | | srsran.yaml | Deploys srsRAN_4G components (eNB/UE). | | srsgnb.yaml | Deploys srsRAN 5G gNB for OTA setups using SDR hardware. | | srsgnb_zmq.yaml | Deploys srsRAN 5G gNB for RF simulated setups over ZMQ. | | srsue5gzmq.yaml | Deploys srsRAN 5G UE for RF simulated setups over ZMQ. | | nr-gnb.yaml | Deploys UERANSIM 5G gNB simulator. | | nr-ue.yaml | Deploys UERANSIM 5G UE simulator. | | 4g-volte-ocs-deploy.yaml | Deploys 4G Core Network (EPC) + Sigscale OCS with IMS (VoLTE) using Kamailio. | | 4g-external-ims-deploy.yaml | Deploys 4G Core Network (EPC) + Sigscale OCS + PyHSS (IMS) with no IMS components. | | 4g-volte-vowifi-deploy.yaml | Deploys 4G Core Network (EPC) + Osmocom EPDG with IMS (VoLTE/VoWiFi) using Kamailio. | | swu_client.yaml | Deploys SWu-IKEv2 client for ePDG testing. | | sa-vonr-ibcf-deploy.yaml | Deploys 5G Standalone (SA) Core Network (5GC) + IMS (VoNR) using Kamailio + IBCF. | | sa-vonr-opensips-ims-deploy.yaml | Deploys 5G Standalone (SA) Core Network (5GC) with IMS (VoNR) using OpenSIPS (Experimental). | | oaienb.yaml | Deploys OAI eNB for OTA setups using SDR hardware (Untested and Unmaintained). | | oaignb.yaml | Deploys OAI 5G gNB for OTA setups using SDR hardware (Untested and Unmaintained). |

Provisioning of SIM information

Provisioning of SIM information in open5gs HSS as follows:

Open (http://HOSTIP>:9999) in a web browser, where HOSTIP> is the IP of the machine/VM running the open5gs containers. Login with following credentials

Username : admin Password : 1423

Using Web UI, add a subscriber with following details:

IMSI : <SIM_IMSI> (e.g. 001010123456790)
MSISDN : <DESIRED_MSISDN> (e.g. 9076543210)
AMF : 8000
K : <SIM_K> (e.g. 8baf473f2f8fd09487cccbd7097c6862)
OPC : <SIM_OPC> (e.g. 8E27B6AF0E692E750F32667A3B14605D)

APN Configuration:


| APN | Type | QCI | ARP | Capability | Vulnerablility | MBR DL/UL(Kbps) | GBR DL/UL(Kbps) | PGW IP |
| internet | IPv4 | 9 | 8 | Disabled | Disabled | unlimited/unlimited | | | | | | 1 | 2 | Enabled | Enabled | 128/128 | 128/128 | | | | | 2 | 4 | Enabled | Enabled | 128/128 | 128/128 | |
| ims | IPv4 | 5 | 1 | Disabled | Disabled | 3850/1530 | | | | | | 1 | 2 | Enabled | Enabled | 128/128 | 128/128 | | | | | 2 | 4 | Enabled | Enabled | 128/128 | 128/128 | | ---------------------------------------------------------------------------------------------------------------------

or using cli

docker exec -it webui misc/db/open5gs-dbctl adduewith_apn 001010123456790 8baf473f2f8fd09487cccbd7097c6862 8E27B6AF0E692E750F32667A3B14605D internet
docker exec -it webui misc/db/open5gs-dbctl update_apn 001010123456790 ims 0

Provisioning of IMSI and MSISDN with OsmoHLR as follows:

  • First, telnet to OsmoHLR from host machine using the following command:
$ telnet 172.22.0.32 4258

OsmoHLR> enable OsmoHLR#

  • Then, register the subscriber information as in following example:
OsmoHLR# subscriber imsi 001010123456790 create
OsmoHLR# subscriber imsi 001010123456790 update msisdn 9076543210

Replace IMSI and MSISDN as per your programmed SIM

Provisioning of SIM information in pyHSS is as follows:

  • Goto http://HOSTIP>:8080/docs/
  • Select apn -> Create new APN -> Press on Try it out. Then, in payload section use the below JSON and then press Execute
{
  "apn": "internet",
  "apnambrdl": 0,
  "apnambrul": 0
}

Take note of apn_id specified in Response body under Server response for internet APN

Repeat creation step for following payload

{
  "apn": "ims",
  "apnambrdl": 0,
  "apnambrul": 0
}

Take note of apn_id specified in Response body under Server response for ims APN

Execute this step of APN creation only once

  • Next, select auc -> Create new AUC -> Press on Try it out. Then, in payload section use the below example JSON to fill in ki, opc and amf for your SIM and then press Execute
{
  "ki": "8baf473f2f8fd09487cccbd7097c6862",
  "opc": "8E27B6AF0E692E750F32667A3B14605D",
  "amf": "8000",
  "sqn": 0,
  "imsi": "001010123456790"
}

Take note of auc_id specified in Response body under Server response

Replace imsi, ki, opc and amf as per your programmed SIM

  • Next, select subscriber -> Create new SUBSCRIBER -> Press on Try it out. Then, in payload section use the below example JSON to fill in imsi, aucid and apnlist for your SIM and then press Execute
{
  "imsi": "001010123456790",
  "enabled": true,
  "auc_id": 1,
  "default_apn": 1,
  "apn_list": "1,2",
  "msisdn": "9076543210",
  "ueambrdl": 0,
  "ueambrul": 0
}
  • auc_id is the ID of the AUC created in the previous steps
  • default_apn is the ID of the internet APN created in the previous steps
  • apn_list is the comma separated list of APN IDs allowed for the UE i.e. APN ID for internet and ims APN created in the previous steps
Replace imsi and msisdn as per your programmed SIM
  • Finally, select imssubscriber -> Create new IMS SUBSCRIBER -> Press on Try it out. Then, in payload section use the below example JSON to fill in imsi, msisdn, msisdnlist, scscfpeer, scscfrealm and scscf for your SIM/deployment and then press Execute
{
    "imsi": "001010123456790",
    "msisdn": "9076543210",
    "sh_profile": "string",
    "scscf_peer": "scscf.ims.mnc001.mcc001.3gppnetwork.org",
    "msisdn_list": "[9076543210]",
    "ifcpath": "defaultifc.xml",
    "scscf": "sip:scscf.ims.mnc001.mcc001.3gppnetwork.org:6060",
    "scscf_realm": "ims.mnc001.mcc001.3gppnetwork.org"
}

Replace imsi, msisdn and msisdn_list as per your programmed SIM

Replace scscfpeer, scscf and scscfrealm as per your deployment

Provisioning of Diameter Peer + Subscriber information in Sigscale OCS as follows (Skip if OCS is not deployed):

  • Goto http://HOSTIP>:8083
  • Login with following credentials
Username : admin
Password : admin
  • Configure SMF as Diameter Peer as mentioned here - https://sigscale.atlassian.net/wiki/spaces/SO/pages/3833890/How-To+with+OCS#Add-an-DIAMETER-client-(DRA%2FSGSN%2FPGW)
NOTE: IP address must be equal to SMF_IP in .env file and the Protocol must be set to Diameter.
  • Subscriber information can be provisioned as mentioned here - https://sigscale.atlassian.net/wiki/spaces/SO/pages/3833890/How-To+with+OCS#Add-a-subscriber
NOTE: The IMSI and the MSISDN must be equal to the one provisioned in open5gs HSS and/or pyHSS.

Testing VoWiFi with COTS UE

Pre-requisites

- Set DOCKERHOSTIP to the IP of the host machine where docker_open5gs is deployed.

Deploy the required components

Ensure you have the following services running: - 4G Core Network (EPC) - IMS (Kamailio or OpenSIPS) - Osmo-ePDG and Strongswan-ePDG

Start the VoWiFi-enabled deployment using:

docker compose -f 4g-volte-vowifi-deploy.yaml up

Provision SIM and IMS subscriber information

- Add subscriber details in open5gs HSS or pyHSS as described in the provisioning sections above. - Ensure the IMSI, MSISDN, and authentication keys match those programmed on your SIM.

Manually configure DNS settings on your phone (WiFi connection)

- On your phone, go to the WiFi settings and select the network you are connected to. - Edit the network settings and look for the DNS configuration option (may be under "Advanced" or "IP settings"). - On Android devices, switch from DHCP to Static IP configuration to manually set DNS. - On iOS devices, you can directly set the DNS server. - Set the DNS server to point to DOCKERHOSTIP. - Save the settings and reconnect to the WiFi network.

Tip: Proper DNS resolution is required for the UE to locate and register with IMS and ePDG services.

UE configuration

- On your UE (User Equipment), ensure VoWiFi (WiFi calling) is enabled.

Not supported

  • IPv6 usage in Docker
🔗 More in this category

© 2026 GitRepoTrend · herlesupreeth/docker_open5gs · Updated daily from GitHub