Author: Christian Kintu
Last Updated: Wed, Jun 8, 2022NirvaShare is a file-sharing solution that lets you create and share files for collaboration with other users, employees, or customers. It integrates with Vultr Object Storage for easy file usage and sharing. The following steps explain installing NirvaShare on a Ubuntu 20.04 server.
Before you start, you should:
NirvaShare works well with Vultr Object Storage. To create an Object Storage bucket for NirvaShare, follow the steps below.
Create the NirvaShare data directory and switch to it.
$ sudo mkdir /opt/nirvashare
$ cd /opt/nirvashare
Using a text editor, create a new docker-compose file.
$ sudo nano nirvashare.yml
Add the following configuration to the file.
version: "3"
services:
admin:
image: 'nirvato/nirvashare-admin:latest'
container_name: 'nirvashare_admin'
restart: always
ports:
- '8080:8080'
environment:
ns_db_jdbc_url: "jdbc:postgresql://nirvashare_database:5432/postgres"
ns_db_username: "nirvashare"
ns_db_password: "__DB_PASS__"
volumes:
- /var/nirvashare:/var/nirvashare
depends_on:
- db
userapp:
image: 'nirvato/nirvashare-userapp:latest'
container_name: 'nirvashare_userapp'
restart: always
ports:
- '8081:8080'
environment:
ns_db_jdbc_url: "jdbc:postgresql://nirvashare_database:5432/postgres"
ns_db_username: "nirvashare"
ns_db_password: "__DB_PASS__"
volumes:
- /opt/nirvashare:/var/nirvashare
depends_on:
- admin
db:
image: 'postgres:13.2'
container_name: 'nirvashare_database'
restart: always
ports:
- '5432:5432'
environment:
POSTGRES_PASSWORD: '__DB_PASS__'
POSTGRES_USER: 'nirvashare'
volumes:
- db_data:/var/lib/postgresql/data
volumes:
db_data:
Save the file.
Install NirvaShare.
$ sudo docker-compose -f nirvashare.yml up -d
Start NirvaShare.
$ docker start nirvashare_admin
$ docker start nirvashare_userapp
Verify that NirvaShare is up and running.
$ docker ps
Create a new Nginx configuration file.
$ sudo nano /etc/nginx/conf.d/nirvashare.example.conf
Add the following configuration lines to the file.
server {
listen 80;
listen [::]:80;
server_name nirvashare.example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Save the file.
Test the Nginx configuration for errors.
$ sudo nginx -t
Restart Nginx.
$ sudo systemctl restart nginx
By default, Uncomplicated firewall (UFW) is active on Ubuntu. Configure it to allow HTTP and HTTPS access on the server.
Allow HTTP.
$ sudo ufw allow http
Allow HTTPS.
$ sudo ufw allow https
Reload the firewall rules.
$ sudo ufw reload
Install Certbot for Nginx.
$ sudo apt install certbot python3-certbot-nginx
Request a free SSL certificate.
$ sudo certbot --nginx -d nirvashare.example.com
Restart Nginx to load changes.
$ sudo systemctl restart nginx
Using a web browser, visit your subdomain.
https://nirvashare.example.com
Log in to Nirvashare with the following credentials:
Username: admin
Password: admin
Navigate to Settings.
Toggle the Type of Storage drop-down and select Vultr Object Storage from the list.
Enter the Vultr Object Storage keys created earlier, and click the green checkmark to save changes.
You have successfully installed NirvaShare on a Ubuntu 20.04 server. For further configuration options, refer to the following articles.