User Tools

Site Tools


howto:aredn:meshchat:home

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
howto:aredn:meshchat:home [2021/11/09 16:05] – [Mesh Chat on a Linux Server] va7fihowto:aredn:meshchat:home [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-====== Mesh Chat ====== 
- 
-Using Mesh Chat is easy: simply click on a Mesh Chat service and enter your callsign. 
- 
-{{  meshchat01.png  }} 
- 
-{{  meshchat02.png?800  }} 
- 
- 
-At the moment, we have five Mesh Chat instances that sync to each other: 
-  * [[http://pi4linux9.local.mesh/meshchat/ |pi4linux9]] 
-  * [[http://va7fi-linux.local.mesh/meshchat/ |VA7FI-Linux]] 
-  * [[http://ve7ax-2.local.mesh:8080/meshchat |VE7AX-2]] 
-  * [[http://ve7tom-hap.local.mesh:8080/meshchat |VE7TOM-HAP]] 
-  * [[http://ve7tom-hap-1.local.mesh:8080/meshchat |VE7TOM-HAP-1]] 
- 
-===== Hosting a Mesh Chat Instance ===== 
- 
-If you want to host a Mesh Chat instance, you install it directly on the hAP, but it's not recommended because it uses resources and it offers very little storage for files: 
- 
-|<100% - ->| 
-^  Mesh Chat on a hAP  ^  Mesh Chat on a Linux Laptop  | 
-|  {{ storage01.png?300 }} |  {{ storage02.png?300 }}  | 
- 
- 
-===== Mesh Chat on a Linux Server ===== 
- 
-Before we get started with the details, let's have a look at the big picture.  There are 3 different "names" that we'll have to keep track of: 
-  * The AREDN Node name configured in the ''Basic Setup'' page.  Mine in is ''VA7FI-HAP-1'' Yours will be different. 
-  * The Hostname of the linux computer running the service.  Mine is ''VA7FI-Linux'' Yours will be different. 
-  * The Service name.  Here we use ''MIMeshChat'' Use the same if you want your instance to sync with that one.  This is also called the Mesh Chat "Zone". 
- 
-Here's where that information shows up on the ''Node Status'' page once it's all done and ready: 
-{{ statuspage.png |}} 
- 
-And in the Mesh Chat app: 
-{{ meshchat00.png |}} 
- 
-In what follows, it'll be important to keep track of where to enter this information so it's configured properly. 
- 
- 
-==== Server Install ==== 
- 
-  * Follow the steps in the Prerequisites section of the [[../linuxserver/home#prerequisites |Linux Server page]]. 
- 
- 
-==== Mesh Chat Install ==== 
-Following the instructions on [[http://www.trevorsbench.com/meshchat-messaging-for-mesh-networks |Trevorsbench]]: 
- 
-  * Download and install Mesh Chat:<code bash> 
-wget https://s3.amazonaws.com/aredn/meshchat_1.02_all.deb 
-sudo dpkg -i meshchat_1.02_all.deb 
-</code> 
- 
-  * Edit the configuration file:<code bash> 
-sudo pico /usr/lib/cgi-bin/meshchatconfig.pm 
-</code> and edit the last two lines so that the zone matches the other Mesh Chat instances, and the node is the name of your AREDN node.  In my case:<code bash> 
-our $pi_zone                    = 'MIMeshChat'; 
-our $local_meshchat_node        = 'VA7FI-HAP-1'; 
-</code> 
- 
-On LinuxMint there's an issue that needs to be fixed before continuing.  Essentially, the current setup uses files in the ''/tmp'' folder, which the Apache server is not allowed to edit.  So the solution was to create that folder somewhere else and set the permissions properly.((The ''/tmp'' issue is discussed here: [[https://www.arednmesh.org/content/pi-meshchat-error-sending-message]])) 
- 
-  * Create these folders:<code bash> 
-sudo mkdir /var/www/html/meshchat/tmp/ 
-sudo mkdir /var/www/html/meshchat/tmp/meshchat/ 
-</code> 
- 
-  * And change the ownership and permissions:<code bash> 
-sudo chown www-data:www-data -R /var/www/html/meshchat/tmp/ 
-sudo chmod 770 -R /var/www/html/meshchat/tmp/ 
-</code> 
- 
-  * Edit the config file:<code bash> 
-sudo pico /usr/lib/cgi-bin/meshchatconfig.pm 
-</code> 
- 
-  * And replace every instance of ''/tmp/'' by ''/var/www/html/meshchat/tmp/'' (line 2, and 18)  
- 
-  * Restart the services:<code bash> 
-sudo systemctl daemon-reload 
-sudo /etc/init.d/apache2 restart 
-sudo /etc/init.d/meshchatsync restart 
-</code> 
- 
-At this point, you should be able to run Mesh Chat from the computer where it's installed using this address: 
-<wrap indent>[[http://localhost/meshchat/]]</wrap> \\ 
-But it won't be able to talk to your AREDN node yet.   
- 
- 
-==== AREDN Configuration ==== 
-Install the ''meshchat-api'' package: 
-  * Download it from [[https://s3.amazonaws.com/aredn/meshchat-api_1.02_all.ipk |here]] 
-  * From the ''Administration'' page, click on ''Upload Package'' <key>Browse...</key> to install it. 
- 
-From the ''Port Forwarding, DHCP, ans Services'' page: 
-  - Setup a DHCP Address Reservation for the Linux computer 
-  - Advertise the service 
-  - Forward WAN port 8080 to LAN port 80 
-  - Don't for get to <key>Save Changes</key> 
- 
-{{ meshchatportforwarding.png }}