This tutorial provides a step-by-step guide to deploying Docmost, a collaborative document editing service, on Rocky Linux 8 using Docker containers. Docmost allows multiple users to edit documents simultaneously in real-time.
rocky linuxDocmost
Large
VPS
3
vCPU
12 GB
Memory
120 GB
NVMe Disk
6144 GB
Traffic
29.90€
/month
* Up to 6 vCPU, 36GB RAM, 360GB NVMe Disk Space and 1Gbit/s Network Speed
### Prerequisites
Before you begin, ensure you have:
- A server running Rocky Linux 8 (This guide is tested with Rocky Linux 8)
- Docker and Docker Compose installed on your server
- A user account with sudo privileges
- Basic familiarity with the command line
### Step 1: Install Docker and Docker Compose
If Docker and Docker Compose are not already installed, follow these steps:
#### Install Docker
```bash
sudo dnf update
sudo dnf install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker
```
#### Install Docker Compose
```bash
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
```
Verify the installation:
```bash
docker-compose --version
```
### Step 2: Set Up Docmost with Docker Compose
Create a directory for Docmost and navigate into it:
```bash
mkdir docmost
cd docmost
```
Create a Docker Compose file `docker-compose.yml` for Docmost:
```yaml
version: '3'
services:
docmost:
image: docmost/docmost
container_name: docmost
ports:
- "8080:80"
restart: always
```
### Step 3: Start Docmost Container
Start the Docmost container using Docker Compose:
```bash
sudo docker-compose up -d
```
### Step 4: Access Docmost
Open your web browser and navigate to `http://your_server_ip:8080`. You should see the Docmost interface.
### Step 5: Optional - Configure Reverse Proxy (Nginx)
To access Docmost using a domain name and secure it with SSL, set up an Nginx reverse proxy. Create an Nginx server block configuration file:
```bash
sudo nano /etc/nginx/conf.d/docmost.conf
```
Add the following configuration (adjust domain and paths as necessary):
```nginx
server {
listen 80;
server_name docmost.example.com;
location / {
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_redirect off;
}
}
```
Save and close the file. Test Nginx configuration:
```bash
sudo nginx -t
sudo systemctl restart nginx
```
### Step 6: Secure Docmost (Optional)
Secure your Docmost instance by configuring firewalls (e.g., UFW) and implementing SSL/TLS certificates if needed.
### Conclusion
You have successfully deployed Docmost on Rocky Linux 8 using Docker containers. Start collaborating on documents in real-time with this self-hosted service.
**Additional Resources:**
- **Docmost GitHub Repository:** [https://github.com/docmost/docmost](https://github.com/docmost/docmost)
- **Docker Documentation:** [https://docs.docker.com/](https://docs.docker.com/)
- **Rocky Linux Documentation:** [https://docs.rockylinux.org/](https://docs.rockylinux.org/)