If you have questions about Snaps, ask them in the #ubuntu-snap channel.
When will my Snap installation get the latest Rocket.Chat release?
Snap packages are widely used and support automatic updates. Because of this, we take extra care with testing before releasing updates to the Snap channel. You can generally expect Snap updates to be released around the 15th of each month, or approximately two weeks after a new Rocket.Chat version is officially released. This time allows us to identify and address any early issues, ensuring greater stability for Snap users.
Note: If you require immediate access to the latest release, we recommend using an alternative installation method such as Docker, which receives updates sooner.
How do I change the port in my Snap installation?
By default, Rocket.Chat runs on port 3000. If you'd like to change it, for example, to port 8080, you can do so with the following command:
sudo snap set rocketchat-server port=8080
After changing the port, restart the rocketchat-service
to apply the update.
Note: There's no need to restart the database or Caddy, only the Rocket.Chat application itself.
How do I enable TLS/SSL with Snap?
Snaps include Caddy, a web server that integrates with Let's Encrypt for automatic SSL/TLS encryption.
See the Enable HTTPS section to learn how to set up SSL with Snaps (4.x Latest for AMD64 or 3.x Latest for ARM64).
Ubuntu 18.04 LTS gives the message "snap not found" - what's wrong?
This usually happens when your system is using a 32-bit (x86) version of Ubuntu, which does not support Snap. Snap requires a 64-bit architecture.
To resolve this:
Make sure your system is running a 64-bit image, such as amd64, x64, or armhf (for ARM-based systems).
If you're using a VPS or VM, double-check the OS image provided by your hosting provider, some still offer 32-bit Ubuntu by default.
How do I manually update Rocket.Chat to a new release?
Snap packages are updated automatically, typically within 6 hours of a new Rocket.Chat release. However, if you want to update immediately, you can do so manually.
To trigger the update:
sudo snap refresh rocketchat-server
How do I revert to the previous version of Rocket.Chat?
If you’ve recently updated and want to roll back to the previous version, you can use the following command:
sudo snap revert rocketchat-server
How do I list the services included in Rocket.Chat Snap package?
The Rocket.Chat Snap includes three core services. When managed by systemd (outside the Snap environment), these services follow the naming pattern:
snap.<SnapName>.<SnapServiceName>
To view the services provided by the Snap, run:
snap info rocketchat-server
Look for the services
section in the output.
Here is the breakdown of the included services:
Service | Snap Service Name | Systemd Service Name |
---|---|---|
MongoDB |
|
|
Caddy |
|
|
Rocket.Chat |
|
|
How do I tell if Rocket.Chat is actually running?
To check whether Rocket.Chat and its related services (MongoDB and Caddy) are running, you can use the following command:
snap services rocketchat-server
Check the Current
column in the output to see the running state of each services.
Another option is to use the systemctl
command. For a quick check of whether a service is running, use the is-active
subcommand:
systemctl is-active snap.rocketchat-server.rocketchat-mongo
systemctl is-active snap.rocketchat-server.rocketchat-caddy
systemctl is-active snap.rocketchat-server.rocketchat-server
If you want more detailed output (like logs and uptime), use the status
subcommand instead.
systemctl status snap.rocketchat-server.rocketchat-mongo
systemctl status snap.rocketchat-server.rocketchat-caddy
systemctl status snap.rocketchat-server.rocketchat-server
How can I view Rocket.Chat logs?
There are two ways to view logs for Rocket.Chat services installed via Snap:
Option 1: Using snap logs
:
sudo snap logs -f rocketchat-server.rocketchat-server
sudo snap logs -f rocketchat-server.rocketchat-mongo
sudo snap logs -f rocketchat-server.rocketchat-caddy
Option 2: Using journalctl
:
sudo journalctl -fu snap.rocketchat-server.rocketchat-server
sudo journalctl -fu snap.rocketchat-server.rocketchat-mongo
sudo journalctl -fu snap.rocketchat-server.rocketchat-caddy
How do I schedule when Snap updates occur?
By default, Snap packages update automatically as soon as a new version is available. If you want to control when updates happen, you can set a specific refresh schedule.
For example, to allow updates only between 4:00–7:00 AM and 7:00–10:10 PM, run:
sudo snap set system refresh.timer=4:00-7:00,19:00-22:10
For more options and advanced scheduling formats, see the Snapcraft documentation.
I need to restart Rocket.Chat, how do I do that?
You can restart Rocket.Chat using either the snap
command or systemctl
, depending on your preference.
Option 1: Restart using snap
(recommended)
To restart all Rocket.Chat Snap services at once, run:
sudo snap restart rocketchat-server
To restart services individually, use:
sudo snap restart rocketchat-server.rocketchat-server
sudo snap restart rocketchat-server.rocketchat-mongo
sudo snap restart rocketchat-server.rocketchat-caddy
Option 2: Restart using systemctl
You can also restart services individually with systemctl
:
sudo systemctl restart snap.rocketchat-server.rocketchat-server
sudo systemctl restart snap.rocketchat-server.rocketchat-mongo
sudo systemctl restart snap.rocketchat-server.rocketchat-cadd
Note: Use snap restart rocketchat-server
when you want to restart everything quickly. Use systemctl
when you need more granular control or are troubleshooting a specific component.
What is Snap’s restart policy for Rocket.Chat?
By default, Snap-managed services, including Rocket.Chat, use a "restart on failure" policy. This means the service will automatically restart if it crashes or exits unexpectedly.
Note that Snap does not allow customization of restart policies like traditional systemd services. If more advanced control is required, you may want to consider a different deployment method.
How do I backup and restore Rocket.Chat data with my Snap?
Rocket.Chat’s Snap package includes built-in tools to back up and restore your database and application data. You can perform backups manually, enable automatic backups during updates, and restore from saved backup files when needed.
For full step-by-step instructions, see: Snap backup and restore
How do I access the MongoDB shell in the Rocket.Chat Snap package?
The Rocket.Chat Snap includes a bundled MongoDB shell you can access directly from the command line.
To open the Mongo shell, run:
rocketchat-server.mongo
How do I edit the MongoDB configuration in the Snap package?
The MongoDB configuration file for the Rocket.Chat Snap is located at:
/var/snap/rocketchat-server/current/mongod.conf
See the MongoDB’s self-managed configuration file options document for details on the available configuration options.
How do I enable access to removable media in Snap?
By default, Snap applications are sandboxed and do not have access to external drives or directories under /media
.
To enable Rocket.Chat to access removable media, you need to manually connect the Snap's removable-media
interface:
sudo snap connect rocketchat-server:removable-media
For more details, see Snap interface documentation.
What folders are used by the Rocket.Chat Snap installation?
Rocket.Chat Snap uses several key directories:
Package files:
/var/lib/snapd/snaps
—> Stores the read-only Snap packages for each version.Persistent data:
/var/snap/rocketchat-server/common/
—> Stores the database, file uploads, and backups.Versioned data:
/var/snap/rocketchat-server/<version>/
—> Contains runtime data for each specific version.Active version shortcut:
/var/snap/rocketchat-server/current/
—> Symlink to the currently active version directory.
How do I remove a specific previous version of Rocket.Chat?
If you want to remove a specific version of Rocket.Chat, you can do so with:
snap remove --revision=N rocketchat-server
Replace N
with the revision number you want to delete.
How do I add a tool like strace to debug what's happening inside my Snap?
Snaps are sandboxed, so you can’t access system-wide tools like strace
by default. However, if you're developing or modifying a Snap locally, you can temporarily include tools like strace
by adding them into your Snap's prime
directory and running the Snap in devmode
.
Follow these steps:
snapcraft prime
snap try prime --devmode
cp /usr/bin/strace prime
snap run <snap.app> --shell
sudo ./strace
For more advanced debugging techniques, see the official Snapcraft documentation.
How do I change Rocket.Chat PORT, MONGO_URL, and MONGO_OPLOG_URL in my Snap?
Starting from release 0.73, you can set Rocket.Chat environment variables using Snap configuration hooks. This allows you to change things like the app port or database connection without modifying files.
To set a custom port, database URL, or oplog URL, use:
sudo snap set rocketchat-server port=<another-port>
sudo snap set rocketchat-server mongo-url=mongodb://<your-url>:<your-port>/<your-db-name>
sudo snap set rocketchat-server mongo-oplog-url=mongodb://<your-url>:<your-port>/local
You must restart the Rocket.Chat service after applying changes:
sudo systemctl restart snap.rocketchat-server.rocketchat-server.service
Example: changing port and database
This example runs Rocket.Chat on port 4000 and uses a database named rocketchat
:
sudo snap set rocketchat-server port=4000
sudo snap set rocketchat-server mongo-url=mongodb://localhost:27017/rocketchat
sudo systemctl restart snap.rocketchat-server.rocketchat-server.service
How do I change other environment variables in my Snap?
Starting from release 0.73, you can override any Rocket.Chat environment variables by placing .env
files in the Snap's shared data directory ($SNAP_COMMON
→ /var/snap/rocketchat-server/common/
).
For example, to override the SMTP host setting, create a .env
file like this:
cat /var/snap/rocketchat-server/common/overwrite-smtp.env
OVERWRITE_SETTING_SMTP_Host=my.smtp.server.com
After creating the file, restart Rocket.Chat to apply the changes:
sudo systemctl restart snap.rocketchat-server.rocketchat-server.service
Notes:
You can create multiple
.env
files.Each
.env
file can define multiple environment variables.
How do I set Rocket.Chat registration token in Snap?
To set a registration token for your server, create any file ending with .env
under the following directory:
/var/snap/rocketchat-server/current/
Add the following content to the file:
REG_TOKEN=<your token>
Then restart your server to apply the change:
sudo systemctl restart snap.rocketchat-server.rocketchat-server