Install OpenFire on Debian/Ubuntu -- Self-Hosted Instant Messaging Server

in hive-196037 •  3 years ago 


#InstantMessaging #OpenFire #Self-Hosted

Full steps can be found at https://i12bretro.github.io/tutorials/0209.html


XMPP Server Download and Installation

  1. Log into the Ubuntu/Debian device
  2. Run the following commands in terminal:
  # update software repositories
  sudo apt update
  # install available software updates
  sudo apt upgrade
  # download OpenFire installer
  wget https://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_4.5.2_all.deb -O openfire.deb
  # execute the installer
  sudo apt install ./openfire.deb
  # start the OpenFire service
  sudo systemctl enable --now openfire
  # install MySQL/MariaDB
  sudo apt install mariadb-server
  # configure the MySQL database
  sudo su
  mysql_secure_installation
  1. Press Enter to login as root
  2. Type Y and press Enter to set a root password, type the password twice to confirm
  3. Type Y and press Enter to remove anonymous users
  4. Type Y and press Enter to disallow root login remotely
  5. Type Y and press Enter to remove the test database
  6. Type Y and press Enter to reload privilege tables
  7. Run the following command to login into MySQL: mysql -u root
  8. Authenticate with the root password set earlier
  9. Run the following commands to create the OpenFire database and database user
    MariaDB [(none)]≫ CREATE DATABASE openfire;
    MariaDB [(none)]≫ GRANT ALL PRIVILEGES ON openfire.* TO openfire@localhost IDENTIFIED BY '0p3nF1re!!';
    MariaDB [(none)]≫ FLUSH PRIVILEGES;
    MariaDB [(none)]≫ USE openfire;
    MariaDB [(none)]≫ source /usr/share/openfire/resources/database/openfire_mysql.sql;
    MariaDB [(none)]≫ QUIT;
  10. Open a web browser and open to http://localhost:9090/setup/index.jsp
  11. Select a language ≫ Click Continue
  12. Set the XMPP domain name and input the server fully qualified domain name ≫ Click Continue
  13. Select Standard Database Connection ≫ Click Continue
  14. Enter the following database parameters:
    Database Driver Presets:MySQL
    JDBC Driver Class: com.mysql.jdbc.Driver
    Database URL: jdbc:mysql://127.0.0.1:3306/openfire?rewriteBatchedStatements=true&characterEncoding=UTF-8&characterSetResults=UTF-8&serverTimezone=UTC
    Username: openfire
    Password: 0p3nF1re!!
  15. Select Default on the Profile Settings page ≫ Click Continue
  16. Input an admin email address and password ≫ Click Continue
  17. Click the Login to the admin console button
  18. Login with username admin and the password created previously
  19. Click the Users/Groups tab
  20. Click Create New User in the left navigation menu
  21. Create a username and password for the new user
  22. Follow the steps to create as many users as needed, at least 2 are needed for testing

Setting Up A XMPP Client

  1. Run the following command in terminal:
    sudo apt install pidgin
  2. Launch Pidgin
  3. Click Add...
  4. Select XMPP from the protocol dropdown
  5. Input the first username created above along with the XMPP domain setup in OpenFire and the user's password
  6. Click the Advanced tab ≫ Select Use encryption if available from the Connection security dropdown
  7. Enter the OpenFire fully qualified server name in the server field
  8. Click the Add button
  9. Click Accept on the self-signed certificate popup
  10. Copy the extracted Pidgin Portable folder to another device
  11. Launch Pidgin Portable on the second device
  12. Select Modify Account
  13. Update the username and password to be a different account from the previous device
  14. From one of the devices, select Buddies ≫ Add Buddy
  15. Input the opposite devices's username
  16. On the second device accept the message request and the two devices should be able to send and receive instant messages using the OpenFire XMPP server

Connect with me and others

★ Discord: https://discord.com/invite/EzenvmSHW8
★ Reddit: https://reddit.com/r/i12bretro
★ Twitter: https://twitter.com/i12bretro


▶️ DTube
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!