Running OpenFire XMPP Server in Docker
i12bretro
#OpenFire #XMPP #Docker
Full steps can be found at https://i12bretro.github.io/tutorials/0481.html
What is OpenFire Openfire is a real time collaboration (RTC) server licensed under the Open Source Apache License. It uses the only widely adopted open protocol for instant messaging, XMPP Openfire is incredibly easy to setup and administer, but offers rock-solid security and performance. - https://igniterealtime.org/projects/openfire/ Installing Docker 01. Log into the Linux based device 02. Run the following commands in the terminal # install prerequisites sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y # add docker gpg key curl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add - # add docker software repository sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable" # install docker sudo apt install docker-ce docker-compose containerd.io -y # enable and start docker service sudo systemctl enable docker && sudo systemctl start docker # add the current user to the docker group sudo usermod -aG docker $USER # reauthenticate for the new group membership to take effect su - $USER Running OpenFire 01. Now that Docker is installed, run the following commands to setup the OpenFire Docker container and run it # create a working directory mkdir /home/$USER/docker/openfire/db -p # run the OpenFire docker container docker run --name openfire -d -p 9090:9090 -p 5222:5222 -p 5269:5269 -p 5223:5223 -p 7443:7443 -p 7777:7777 -p 7070:7070 -p 5229:5229 -p 5275:5275 -v /home/$USER/docker/openfire/db:/var/lib/openfire/embedded-db --restart=unless-stopped quantumobject/docker-openfire 02. Open a web browser and navigate to http://DNSorIP:9090 03. Select a language ≫ Click Continue 04. Set the XMPP Domain Name and Server Host Name (FQDN) to local ≫ Click Continue 05. Select Embedded Database ≫ Click Continue 06. Select Default on the Profile Settings page ≫ Click Continue 07. Input an admin email address and password ≫ Click Continue 08. Click the Login to the admin console button 09. Login with username admin and the password created previously 10. Click the Users/Groups tab 11. Click Create New User in the left navigation menu 12. Create a username and password for the new user 13. Follow the steps to create as many users as needed, at least 2 are needed for testing Making the Configuration Persistent 01. With OpenFire now configured, run the following commands to copy the configuration files to a persistent volume and re-run the docker container # create working directory for conf mkdir /home/$USER/docker/openfire/conf -p # copy the configuration from the running docker container sudo docker cp openfire:/usr/share/openfire/conf/ /home/$USER/docker/openfire # set owner of working directories sudo chown "$USER":"$USER" /home/"$USER"/docker -R # stop and remove the running OpenFire container docker rm openfire --force # re-run the OpenFire docker container with new conf volume docker run --name openfire -d -p 9090:9090 -p 5222:5222 -p 5269:5269 -p 5223:5223 -p 7443:7443 -p 7777:7777 -p 7070:7070 -p 5229:5229 -p 5275:5275 -v /home/$USER/docker/openfire/db:/var/lib/openfire/embedded-db -v /home/$USER/docker/openfire/conf:/usr/share/openfire/conf --restart=unless-stopped quantumobject/docker-openfire Setting Up A XMPP Client 01. Download Pidgin Portable https://portableapps.com/apps/internet/pidgin_portable 02. Run the Pidgin Portable installer 03. Launch Pidgin Portable 04. Click Add... 05. Select XMPP from the protocol dropdown 06. Input the first username created above along with the XMPP domain setup in OpenFire and the user's password 07. Click the Advanced tab ≫ Select Use encryption if available from the Connection security dropdown 08. Enter the OpenFire DNS name or IP in the server field 09. Click the Add button 10. Click Accept on the self-signed certificate popup 11. Copy the extracted Pidgin Portable folder to another device 12. Launch Pidgin Portable on the second device 13. Select Modify Account 14. Update the username and password to be a different account from the previous device 15. From one of the devices, select Buddies ≫ Add Buddy 16. Input the opposite devices's username
....Full steps can be found on GitHub [link at the top]
Connect with me and others
★ Discord: https://discord.com/invite/EzenvmSHW8 ★ Reddit: https://reddit.com/r/i12bretro ★ Twitter: https://twitter.com/i12bretro ... https://www.youtube.com/watch?v=T66RcFd8CMg
37537005 Bytes