Installing a snap on Ubuntu is as easy as
sudo snap install rocketchat-server
Snaps are secure. Rocket.Chat and all of its dependencies are isolated from the rest of your system. Snaps also auto update when we release a new version. So no need more hassle updating.
On Ubuntu 14.04LTS, install
sudo apt-get install snapd
If you have questions about snaps best place to ask them is in: #ubuntu-snap
Check out our guide for enabling caddy: here
Make sure you’re using x64 or amd64 (or armhf) images, especially on VPS or VMs. x86 is 32 bit and not supported.
Updates happen automatically usually in a 6 hour window from time of release. If you want it quicker you can do:
sudo snap refresh rocketchat-server
You can check on the status of Rocket.Chat with:
sudo systemctl status snap.rocketchat-server.rocketchat-server.service
You can also check on the status of Mongo running in the snap with:
sudo systemctl status snap.rocketchat-server.rocketchat-mongo.service
To see the logs from rocket.chat
sudo journalctl -u snap.rocketchat-server.rocketchat-server
To see the logs from mongo
sudo journalctl -u snap.rocketchat-server.rocketchat-mongo
sudo systemctl restart snap.rocketchat-server.rocketchat-server
Also can restart Mongo via:
sudo systemctl restart snap.rocketchat-server.rocketchat-mongo
The snaps policy is to restart on failure.
sudo snap run rocketchat-server.backupdb
A backup of your data can be found at /var/snap/rocketchat-server/<version>/backup.tgz
1. Assuming you have your
backup.tgz file (see above), simply extract it to a desired location (e.g., ~/backup_data)
cd ~ mkdir backup_data cd backup_data tar zxvf /path/to/your/backup.tgz
This will create the following directory tree where you can find the extracted backup data:
The snap database name should be
parties, but just to be safe:
sudo /snap/rocketchat-server/current/bin/mongo (...) > show dbs local 0.000GB parties 0.004GB > exit
Important: before proceeding, consult https://docs.mongodb.com/manual/reference/program/mongorestore/ to learn about additional options and the non-overwriting behavior of
mongorestore when the target database already exists.
Please note: at the time of writing, mongorestore required openssl version 1.0.2 specifically. If you see an error like this -
(...) version 'OPENSSL_1.0.2' not found (required by /snap/rocketchat-server/current/bin/mongorestore) - simply install the required openssl version to continue.
When you are ready, run the following command (replacing
<version> with the appropriate directory name):
sudo /snap/rocketchat-server/current/bin/mongorestore --db parties \ ~/backup_data/var/snap/rocketchat-server/<version>/dump/parties/
sudo service snap.rocketchat-server.rocketchat-mongo restart sudo service snap.rocketchat-server.rocketchat-server restart sudo service snap.rocketchat-server.rocketchat-caddy restart
- Your actual snap files for each version of Rocket.Chat are copied to:
/var/lib/snapd/snapsand they are mounted read only
- Your snap common directory is:
/var/snap/rocketchat-server/common/file upload to disk, and database is stored here.
- Your snap data directory is
/var/snap/rocketchat-server/<version>this is a versioned folder.
You can do this via:
snap remove --revision=35 rocketchat-server
snapcraft prime snap try prime --devmode cp /usr/bin/strace prime snap run <snap.app> --shell sudo ./strace