Cart

    Sorry, we could not find any results for your search querry.

    Using Big Storage with Plesk Co-op

    On your VPS you can make use of Plesk Co-op, which is provided with Mattermost (chat) and Seafile (cloud storage).

    When you make intense usage of your VPS, it may happen that you run out of disk space on your VPS, especially if you store a lot of files in Seafile. In this tutorial we show you how you can then use Big Storage as storage for mail, Mattermost and/or Seafile.

    • Use a root user or sudo when following the steps in this tutorial. 
       
    • Attach a Big Storage to your VPS before following this tutorial. In this guide we explain how to do this.

    E-mail

    Email addresses can make intensive use of the hard drive of your VPS. For this reason, we recommend to use the SSD of your VPS instead of your Big Storage (HDD) for email. If maximum performance of your email is not a priority, you can adjust your mail location with the steps below:

     

    Step 1

    Connect to your VPS via SSH or use the VPS-console.


     

    Step 2

    Stop the Postfix (outgoing mail) service:

    systemctl stop postfix 

     

    Step 3

    Create a directory in which you store your Mattermost files, for example:

    mkdir -p /mnt/bigstorage/mail/

    The addition of -p stands for 'parent' and ensures underlying folders are created if they don't yet exist.


     

    Step 4

    Open the Plesk configuration using the command:

    nano /etc/psa/psa.conf

     

    Step 4

    In the opened file, change the value of PLESK_MAILNAMES_D to the folder which you've created in step 2:

    # Location of qmail maildirs
        PLESK_MAILNAMES_D /mnt/bigstorage/mail/

    Save the changes and close your file (ctrl + x > y > enter).


     

    Step 5

    Move all existing mail addresses to this new location using the command:

    mnt/bigstorage/mail/

     

    Step 6

    Now create a custom configuration file for Dovecot (incoming mail) and add the configuration for the new mail location:

    mnt/bigstorage/mail/
    /mnt/bigstorage/mail/

     

    Step 7

    Finally, restart Postfix, Dovecot, the pc-remote service and reconfigure the mail settings:

    systemctl start postfix
        systemctl restart dovecot
        systemctl restart pc-remote
        plesk repair mail -y
        

     

    Step 8

    For email Plesk uses an account called 'popuser'. The mail directory is also the home directory of this user. Open /etc/passwd oto change this directory:

    nano /etc/passwd

     

    Step 9

    Change the directory of /var/qmail/ to the new directory, for example:

    popuser:x:30:30:POP3 service user:/mnt/bigstorage/mail/popuser:/sbin/nologin
        

    Save your changes and close the file (ctrl + x > y > enter).


    Mattermost

    • The location where files are stored in Mattermost can only be adjusted per domain. In the example below, change example.com to the name of your domain.
    • Do you host multiple domains? Then repeat the steps below for each domain.

    Step 1

    Connect to your VPS via SSH or use the VPS-console.


     

    Step 2

    Create a directory where you'd like to store your Mattermost files, e.g. :

    mkdir -p /mnt/bigstorage/example.com/Mattermost/

    The addition of -p stands for 'parent' and ensures underlying folders are created if they don't yet exist.


     

    Step 3 - optional

    Have you used Mattermost and stored files for it in the past (e.g. when transferring files to colleagues)? Then move all existing data to the folder you've created in step 2 using the syntax:

    mv /nano /var/www/vhosts/example.com/mattermost/data/* /mnt/bigstorage/example.com/Mattermost/

     

    Step 4

    Open the Mattermost configuration of your domain:

    nano /var/www/vhosts/example.com/mattermost/config/config.json
        

     

    Step 5

    Scroll down or search for the term 'FileSettings'. In the overview, change the value of 'Directory' from ./data to the directory which you've created in step 2. The result will look similar to this:

    "FileSettings": {
            "EnableFileAttachments": true,
            "EnableMobileUpload": true,
            "EnableMobileDownload": true,
            "MaxFileSize": 52428800,
            "DriverName": "local",
            "Directory": "/mnt/bigstorage/example.com/Mattermost/",
        

    Save your changes and close the file (ctrl + x > y > enter).


     

    Step 6

    Restart Mattermost to process the changes:

    systemctl restart mattermost@18000.service

    Can't find the name mattermost@18000.service? Check the correct name using the command:

    systemctl list-units --type=service | grep mattermost

    Seafile

    • The location where files are stored in Seafile can only be adjusted per domain. In the example below, change example.com to the name of your domain.
    • Do you host multiple domains? Then repeat the steps below for each domain.

    Step 1

    Connect to your VPS via SSH or use the VPS-console.


     

    Step 2

     

    Create a directory in which to store your Seafile files, for example:

    mkdir -p /mnt/bigstorage/example.com/seafile/

    The addition of -p stands for 'parent' and ensures underlying folders are created if they don't yet exist.


     

    Step 3

    In Plesk navigate to 'Tools & Settings' > 'Services Management' and stop the Seafile and Seahub services.

     


     

    Step 4

    Copy the Seafile data to the directory and then move the old directory (temporarily) to a back up location. Later you'll remove this back up location.

    cp -r /var/www/vhosts/example.com/seafile/seafile-data/* /mnt/bigstorage/example.com/seafile/
        mv /var/www/vhosts/example.com/seafile/seafile-data/ /var/www/vhosts/example.com/seafile/seafile-data-backup

     

    Step 5

    In order to use your new Big Storage directory, create a symbolic link from the old to the new directory (a symbolic link is like a shortcut).

    ln -s /mnt/bigstorage/example.com/seafile/ /var/www/vhosts/example.com/seafile/seafile-data/

     

    Step 6

    By default, the user with whom your going over the steps in this tutorial, will have rights to use the symbolic link, the files on your Big Storage. Seafile itself however will not have those permissions so we'll correct this first. Retrieve the correct user and group name using the command:

    ls -lah /var/www/vhosts/example.com/ 

    The output will be similar to the example below. Note the user (here transip) and group name (here psaserv) before 'Seafile'.

    drwx--x---.  7 transip psaserv  105 Sep 13 00:00 .
        drwxr-xr-x.  7 root    root      94 Sep 10 11:27 ..
        -rw-------.  1 transip psacln     8 Sep 10 12:35 .bash_history
        drwxr-xr-x.  3 transip psacln    36 Sep 13 00:00 .composer
        drwxr-x---.  2 transip psaserv   24 Sep 10 11:27 httpdocs
        drwx------.  2 transip root    4.0K Sep 24 11:12 logs
        drwxr-xr-x. 11 transip psaserv  211 Sep 10 11:27 mattermost
        drwxr-x---.  8 transip psaserv  175 Sep 24 11:39 seafile
        

    Give this user and group access to the symbolic link using the commands:

    chown -R transip:psaserv /mnt/bigstorage/example.com/
        chmod -R 750 /mnt/bigstorage/example.com/
        chmod -R 755 /mnt/bigstorage/example.com/seafile/*
        chown -h transip:psaserv /var/www/vhosts/example.com/seafile/seafile-data/

    Here, replace 'transip' and 'psaserv' with the user name and group name which you noted from the output of the ls-command.


     

    This concludes our tutorial on using Big Storage with Plesk Co-op.

    Should you have any questions left regarding this article, do not hesitate to contact our support department. You can reach them via the ‘Contact Us’ button at the bottom of this page.

     

    Need help?

    Receive personal support from our supporters

    Contact us