|
# **The current recommended way of installing FreeDMR is in docker. **
|
|
# \*\*The current recommended way of installing FreeDMR is in docker. \*\*
|
|
|
|
|
|
Docker is the fastest way to having a running system, complete with proxy and echo, ready
|
|
Docker is the fastest way to having a running system, complete with proxy and echo, ready to serve repeaters and hotspots. The Docker image can be run on any system that can run Linux docker containers. We recommend Debian 11.
|
|
to serve repeaters and hotspots. The Docker image can be run on any system that can run Linux
|
|
|
|
docker containers. We recommend Debian 11.
|
|
|
|
|
|
|
|
Not convinced? Read [Why Docker?](Why Docker)
|
|
Not convinced? Read [Why Docker?](Why%20Docker)
|
|
|
|
|
|
# Quick Start
|
|
# Quick Start
|
|
|
|
|
... | @@ -16,9 +14,9 @@ For a one-shot install on a Debian or Debian-based system, paste this into the t |
... | @@ -16,9 +14,9 @@ For a one-shot install on a Debian or Debian-based system, paste this into the t |
|
|
|
|
|
This works on Debian 10, 11, PiOs (Raspbian) and recent Ubuntu systems, on other flavours, you may need to follow the process below.
|
|
This works on Debian 10, 11, PiOs (Raspbian) and recent Ubuntu systems, on other flavours, you may need to follow the process below.
|
|
|
|
|
|
The FreeDMR docker image is multiarch so will work on x86, amd64, arm64 and armv7
|
|
The FreeDMR docker image is multiarch so will work on x86, amd64, arm64 and armv7
|
|
|
|
|
|
The rest of this page details the manual install process.
|
|
The rest of this page details the manual install process.
|
|
|
|
|
|
## Prerequisites
|
|
## Prerequisites
|
|
|
|
|
... | @@ -26,151 +24,23 @@ Firstly, you need a system running docker.Follow the instructions for your distr |
... | @@ -26,151 +24,23 @@ Firstly, you need a system running docker.Follow the instructions for your distr |
|
|
|
|
|
A change needs to be made to the docker config for openbridge to work correctly:
|
|
A change needs to be made to the docker config for openbridge to work correctly:
|
|
|
|
|
|
|
|
|
|
`echo '{ "userland-proxy": false}' > /etc/docker/daemon.json`
|
|
`echo '{ "userland-proxy": false}' > /etc/docker/daemon.json`
|
|
|
|
|
|
`systemctl restart docker`
|
|
`systemctl restart docker`
|
|
|
|
|
|
## Grab and edit the config file
|
|
## Grab and edit the config file
|
|
|
|
|
|
|
|
Get the file: [freedmr.cfg](https://gitlab.hacknix.net/hacknix/FreeDMR/-/blob/93a3fc244338ebc5c5a79ecd55e167fa519afd68/docker-configs/freedmr.cfg)
|
|
|
|
|
|
`mkdir /etc/freedmr`
|
|
`mkdir /etc/freedmr`
|
|
|
|
|
|
edit /etc/freedmr/freedmr.cfg with your favourite editor:
|
|
place the freedmr.cfg file in this directory.
|
|
|
|
|
|
[GLOBAL]
|
|
## Make rules file
|
|
PATH: ./
|
|
|
|
PING_TIME: 10
|
|
`echo "BRIDGES = {'9990': [{'SYSTEM': 'ECHO', 'TS': 2, 'TGID': 9990, 'ACTIVE': True, 'TIMEOUT': 2, 'TO_TYPE': 'NONE', 'ON': [], 'OFF': [], 'RESET': []},]}" > /etc/freedmr/rules.py`
|
|
MAX_MISSED: 3
|
|
|
|
USE_ACL: True
|
|
\##Make JSON directory
|
|
REG_ACL: PERMIT:ALL
|
|
|
|
SUB_ACL: DENY:0-100000
|
|
|
|
TGID_TS1_ACL: PERMIT:ALL
|
|
|
|
TGID_TS2_ACL: DENY:0-79
|
|
|
|
GEN_STAT_BRIDGES: True
|
|
|
|
ALLOW_NULL_PASSPHRASE: True
|
|
|
|
ANNOUNCEMENT_LANGUAGES:
|
|
|
|
DATA_GATEWAY: False
|
|
|
|
VALIDATE_SERVER_IDS: True
|
|
|
|
SERVER_ID: 0
|
|
|
|
|
|
|
|
[REPORTS]
|
|
|
|
REPORT: True
|
|
|
|
REPORT_INTERVAL: 60
|
|
|
|
REPORT_PORT: 4321
|
|
|
|
REPORT_CLIENTS: *
|
|
|
|
|
|
|
|
[LOGGER]
|
|
|
|
LOG_FILE: /dev/null
|
|
|
|
LOG_HANDLERS: console-timed
|
|
|
|
LOG_LEVEL: INFO
|
|
|
|
LOG_NAME: FreeDMR
|
|
|
|
|
|
|
|
[ALIASES]
|
|
|
|
TRY_DOWNLOAD: True
|
|
|
|
PATH: ./json/
|
|
|
|
PEER_FILE: peer_ids.json
|
|
|
|
SUBSCRIBER_FILE: subscriber_ids.json
|
|
|
|
TGID_FILE: talkgroup_ids.json
|
|
|
|
PEER_URL: https://www.radioid.net/static/rptrs.json
|
|
|
|
SUBSCRIBER_URL: https://www.radioid.net/static/users.json
|
|
|
|
TGID_URL: http://downloads.freedmr.uk/downloads/talkgroup_ids.json
|
|
|
|
LOCAL_SUBSCRIBER_FILE: local_subscriber_ids.json
|
|
|
|
STALE_DAYS: 1
|
|
|
|
SUB_MAP_FILE: sub_map.pkl
|
|
|
|
SERVER_ID_URL: http://downloads.freedmr.uk/downloads/FreeDMR_Hosts.csv
|
|
|
|
SERVER_ID_FILE: server_ids.tsv
|
|
|
|
TOPO_FILE: topography.json
|
|
|
|
|
|
|
|
#Control server shared allstar instance via dial / AMI
|
|
|
|
[ALLSTAR]
|
|
|
|
ENABLED: True
|
|
|
|
USER:admin
|
|
|
|
PASS: password
|
|
|
|
SERVER: asl.example.com
|
|
|
|
PORT: 5038
|
|
|
|
NODE: 11111
|
|
|
|
|
|
|
|
[OBP-TEST]
|
|
|
|
MODE: OPENBRIDGE
|
|
|
|
ENABLED: False
|
|
|
|
IP:
|
|
|
|
PORT: 62044
|
|
|
|
NETWORK_ID: 1
|
|
|
|
PASSPHRASE: mypass
|
|
|
|
TARGET_IP:
|
|
|
|
TARGET_PORT: 62044
|
|
|
|
USE_ACL: True
|
|
|
|
SUB_ACL: DENY:1
|
|
|
|
TGID_ACL: PERMIT:ALL
|
|
|
|
RELAX_CHECKS: True
|
|
|
|
ENHANCED_OBP: True
|
|
|
|
|
|
|
|
|
|
|
|
[SYSTEM]
|
|
|
|
MODE: MASTER
|
|
|
|
ENABLED: True
|
|
|
|
REPEAT: True
|
|
|
|
MAX_PEERS: 1
|
|
|
|
EXPORT_AMBE: False
|
|
|
|
IP: 127.0.0.1
|
|
|
|
PORT: 54000
|
|
|
|
PASSPHRASE:
|
|
|
|
GROUP_HANGTIME: 5
|
|
|
|
USE_ACL: True
|
|
|
|
REG_ACL: DENY:1
|
|
|
|
SUB_ACL: DENY:1
|
|
|
|
TGID_TS1_ACL: PERMIT:ALL
|
|
|
|
TGID_TS2_ACL: PERMIT:ALL
|
|
|
|
DEFAULT_UA_TIMER: 60
|
|
|
|
SINGLE_MODE: True
|
|
|
|
VOICE_IDENT: True
|
|
|
|
TS1_STATIC:
|
|
|
|
TS2_STATIC:
|
|
|
|
DEFAULT_REFLECTOR: 0
|
|
|
|
ANNOUNCEMENT_LANGUAGE: en_GB_2
|
|
|
|
GENERATOR: 100
|
|
|
|
ALLOW_UNREG_ID: False
|
|
|
|
PROXY_CONTROL: True
|
|
|
|
OVERRIDE_IDENT_TG:
|
|
|
|
|
|
|
|
[ECHO]
|
|
|
|
MODE: PEER
|
|
|
|
ENABLED: True
|
|
|
|
LOOSE: False
|
|
|
|
EXPORT_AMBE: False
|
|
|
|
IP: 127.0.0.1
|
|
|
|
PORT: 54916
|
|
|
|
MASTER_IP: 127.0.0.1
|
|
|
|
MASTER_PORT: 54915
|
|
|
|
PASSPHRASE: passw0rd
|
|
|
|
CALLSIGN: ECHO
|
|
|
|
RADIO_ID: 1000001
|
|
|
|
RX_FREQ: 449000000
|
|
|
|
TX_FREQ: 444000000
|
|
|
|
TX_POWER: 25
|
|
|
|
COLORCODE: 1
|
|
|
|
SLOTS: 1
|
|
|
|
LATITUDE: 00.0000
|
|
|
|
LONGITUDE: 000.0000
|
|
|
|
HEIGHT: 75
|
|
|
|
LOCATION: United Kingdom
|
|
|
|
DESCRIPTION: ECHO
|
|
|
|
URL: www.w1abc.org
|
|
|
|
SOFTWARE_ID: 20170620
|
|
|
|
PACKAGE_ID: MMDVM_FreeDMR
|
|
|
|
GROUP_HANGTIME: 5
|
|
|
|
OPTIONS:
|
|
|
|
USE_ACL: True
|
|
|
|
SUB_ACL: DENY:1
|
|
|
|
TGID_TS1_ACL: PERMIT:ALL
|
|
|
|
TGID_TS2_ACL: PERMIT:ALL
|
|
|
|
ANNOUNCEMENT_LANGUAGE: en_GB_2
|
|
|
|
|
|
|
|
## Make rules file
|
|
|
|
|
|
|
|
`echo "BRIDGES = {'9990': [{'SYSTEM': 'ECHO', 'TS': 2, 'TGID': 9990, 'ACTIVE': True, 'TIMEOUT': 2, 'TO_TYPE': 'NONE', 'ON': [], 'OFF': [], 'RESET': []},]}" > /etc/freedmr/rules.py`
|
|
|
|
|
|
|
|
##Make JSON directory
|
|
|
|
|
|
|
|
`mkdir -p /etc/freedmr/json`
|
|
`mkdir -p /etc/freedmr/json`
|
|
|
|
|
... | @@ -180,66 +50,70 @@ edit /etc/freedmr/freedmr.cfg with your favourite editor: |
... | @@ -180,66 +50,70 @@ edit /etc/freedmr/freedmr.cfg with your favourite editor: |
|
|
|
|
|
## create /etc/freedmr/docker-compose.yml with the following content
|
|
## create /etc/freedmr/docker-compose.yml with the following content
|
|
|
|
|
|
version: '2.4'
|
|
```
|
|
services:
|
|
version: '2.4'
|
|
freedmr:
|
|
services:
|
|
container_name: freedmr
|
|
freedmr:
|
|
cpu_shares: 1024
|
|
container_name: freedmr
|
|
mem_reservation: 600m
|
|
cpu_shares: 1024
|
|
volumes:
|
|
mem_reservation: 600m
|
|
- '/etc/freedmr/freedmr.cfg:/opt/freedmr/freedmr.cfg'
|
|
volumes:
|
|
- '/etc/freedmr/rules.py:/opt/freedmr/rules.py'
|
|
- '/etc/freedmr/freedmr.cfg:/opt/freedmr/freedmr.cfg'
|
|
#Write JSON files outside of container
|
|
- '/etc/freedmr/rules.py:/opt/freedmr/rules.py'
|
|
- '/etc/freedmr/json/:/opt/freedmr/json/'
|
|
#Write JSON files outside of container
|
|
|
|
- '/etc/freedmr/json/:/opt/freedmr/json/'
|
|
ports:
|
|
|
|
- '62031:62031/udp'
|
|
ports:
|
|
#Change the below to inlude ports used for your OBP(s)
|
|
- '62031:62031/udp'
|
|
#- '62041:62041/udp'
|
|
#Change the below to inlude ports used for your OBP(s)
|
|
image: 'gitlab.hacknix.net:5050/hacknix/freedmr:development-latest'
|
|
#- '62041:62041/udp'
|
|
restart: "unless-stopped"
|
|
image: 'gitlab.hacknix.net:5050/hacknix/freedmr:development-latest'
|
|
networks:
|
|
restart: "unless-stopped"
|
|
app_net:
|
|
networks:
|
|
ipv4_address: 172.16.238.10
|
|
app_net:
|
|
#Control parameters inside container
|
|
ipv4_address: 172.16.238.10
|
|
environment:
|
|
#Control parameters inside container
|
|
#IPV6 support
|
|
environment:
|
|
- FDPROXY_IPV6=0
|
|
#IPV6 support
|
|
#Display connection stats in log
|
|
- FDPROXY_IPV6=0
|
|
- FDPROXY_STATS=1
|
|
#Display connection stats in log
|
|
#Display conneting client info in log
|
|
- FDPROXY_STATS=1
|
|
- FDPROXY_CLIENTINFO=1
|
|
#Display conneting client info in log
|
|
#Debug HBP session in log (lots of data!!)
|
|
- FDPROXY_CLIENTINFO=1
|
|
- FDPROXY_DEBUG=0
|
|
#Debug HBP session in log (lots of data!!)
|
|
#Override proxy external port
|
|
- FDPROXY_DEBUG=0
|
|
#- FDPROXY_LISTENPORT=62031
|
|
#Override proxy external port
|
|
read_only: "true"
|
|
#- FDPROXY_LISTENPORT=62031
|
|
networks:
|
|
read_only: "true"
|
|
app_net:
|
|
networks:
|
|
driver: bridge
|
|
app_net:
|
|
ipam:
|
|
driver: bridge
|
|
driver: default
|
|
ipam:
|
|
config:
|
|
driver: default
|
|
- subnet: 172.16.238.0/24
|
|
config:
|
|
gateway: 172.16.238.1
|
|
- subnet: 172.16.238.0/24
|
|
|
|
gateway: 172.16.238.1
|
|
#Add network tuning
|
|
```
|
|
|
|
|
|
|
|
\#Add network tuning
|
|
|
|
|
|
Add the following to the end if /etc/sysctl.conf:
|
|
Add the following to the end if /etc/sysctl.conf:
|
|
|
|
|
|
net.core.rmem_default=134217728
|
|
```
|
|
net.core.rmem_max=134217728
|
|
net.core.rmem_default=134217728
|
|
net.core.wmem_max=134217728
|
|
net.core.rmem_max=134217728
|
|
net.core.rmem_default=134217728
|
|
net.core.wmem_max=134217728
|
|
net.core.netdev_max_backlog=250000
|
|
net.core.rmem_default=134217728
|
|
net.netfilter.nf_conntrack_udp_timeout=15
|
|
net.core.netdev_max_backlog=250000
|
|
net.netfilter.nf_conntrack_udp_timeout_stream=35
|
|
net.netfilter.nf_conntrack_udp_timeout=15
|
|
|
|
net.netfilter.nf_conntrack_udp_timeout_stream=35
|
|
|
|
```
|
|
|
|
|
|
Run command:
|
|
Run command:
|
|
|
|
|
|
`sysctl -p`
|
|
`sysctl -p`
|
|
|
|
|
|
#Run Freedmr
|
|
\#Run Freedmr
|
|
|
|
|
|
`cd /etc/freedmr`
|
|
`cd /etc/freedmr`
|
|
|
|
|
... | @@ -249,7 +123,7 @@ Once you are sure it has run correctly, you can restart in the background |
... | @@ -249,7 +123,7 @@ Once you are sure it has run correctly, you can restart in the background |
|
|
|
|
|
`docker-compose up -d`
|
|
`docker-compose up -d`
|
|
|
|
|
|
## Stop docker container
|
|
## Stop docker container
|
|
|
|
|
|
`docker-compose down`
|
|
`docker-compose down`
|
|
|
|
|
... | @@ -263,7 +137,7 @@ Once you are sure it has run correctly, you can restart in the background |
... | @@ -263,7 +137,7 @@ Once you are sure it has run correctly, you can restart in the background |
|
|
|
|
|
`docker-compose up -d`
|
|
`docker-compose up -d`
|
|
|
|
|
|
## Restart the container (for example when config is changed)
|
|
## Restart the container (for example when config is changed)
|
|
|
|
|
|
`docker-compose restart`
|
|
`docker-compose restart`
|
|
|
|
|
... | @@ -271,7 +145,6 @@ Once you are sure it has run correctly, you can restart in the background |
... | @@ -271,7 +145,6 @@ Once you are sure it has run correctly, you can restart in the background |
|
|
|
|
|
`conntrack -F`
|
|
`conntrack -F`
|
|
|
|
|
|
This flushes the connection tracking table for NAT. Without this, you might not see traffic for a while.
|
|
This flushes the connection tracking table for NAT. Without this, you might not see traffic for a while.
|
|
|
|
|
|
|
|
|
|
For more docker commands go [here](Docker Commands Cheat Sheet) |
|
For more docker commands go [here](Docker%20Commands%20Cheat%20Sheet) |
|
\ No newline at end of file |
|
\ No newline at end of file |