How to make HipChat Server 'read only'

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Purpose

As HipChat Server nears closer to end-of-life and licenses begin to expire, you may want to keep the HipChat Server up to review past message history after migrating to another chat solution. HipChat doesn't have a 'built-in' read-only feature, however you can run the following script which will 'lock' rooms from receiving new messages while allowing users to still log in using the HipChat client and view existing messages.

Getting Started

The below 'read-only' script will do the following things:

  • Lock all rooms (public and private) that are not deleted from saving new messages.
  • It will restart Tetra-app and Tetra-proxy services and will disconnect all user sessions (including mobile and desktop apps) at the time the script is ran. 
  • As users connections are severed, user will need to log back into the client. At this point, the rooms will be locked (but still searchable, joinable, from the clients).

Additional information

  • It's only advised to run this script if the HipChat Server is no longer used for production communications.
  • The script only needs to be ran once.
  • The script will restart Tetra and this will cause all the connected clients to auto-reconnect, which will trigger a reconnection 'storm'. This is normal and expected. 
  • All services (integration, API script, bot or otherwise) that rely on posting messages into any room will no longer be able to do so.
  • If you send a message to any room after it's been locked, the client will show that the message has been posted. However, after a few moments, the request will fail in the client. This is normal and expected.
  • There isn't an 'undo' script that will revert the changes, however, if you need to do this, please let us know and we can walk you through it.
  • 1-1 private chats can still be posted to other users. There is a simple way to disable this (outlined below).
  • Script should be ran as root.

Read-only BASH script

You can download/view the script here: read-onlyv05.sh

Installation and Usage

  1. Log into the HipChat Server CLI (command line interface).

  2. Gain root:

    sudo dont-blame-hipchat
  3. Either download the script onto a local machine or directly onto the HipChat Server or create a new script (used read-only.sh but you can name it anything) and copy the script code into it. If you are going to copy the code, then you'll need to create a new script (skip these steps and step 4 if you're downloading the script directly to the server).

    touch read-onlyv05.sh
    nano read-onlyv05.sh

    (info) You can use the editor of your choice e.g. vi / vim instead of nano

  4. Copy code into the script and save changes (CTRL+X if using nano).

  5. Make executable:

    chmod +x read-onlyv05.sh
  6. Run the script and follow the prompts (warning) This will LOCK all rooms and put HipChat into a 'read-only' state! (warning)

    ./read-onlyv05.sh

Disabling 1-1 chats (aka 'private chats')

After you've locked the rooms, you can also lock users from sending messages via private chat. To do so, following the steps below:

  1. Log into the HipChat web interface as an admin
  2. Navigate to 'Group Admin' -> Preferences
  3. Look for the option '1-1 (private) chats' and click to disable.
  4. Click 'Save' to put the changes into effect.


Last modified on Jul 31, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.