From SME Server
Jump to navigationJump to search

Warning.png Warning:
Openupload has not been maintained by their developers since 2010.

This is deprecated and should not be use anymore.


Daniel B.
Firewall Services


The latest version of smeserver-openupload is available in the SME repository, click on the version number(s) for more information.



Open Upload is a PHP application to create a private / public file download server similar to MegaUpload or RapidShare.


This contrib has been developped and tested on SME Server 8b5 and later. It probably won't work on SME 7.

Installation 8.x and 9.x

Configure Firewall-Services's repository:

db yum_repositories set fws repository \
BaseURL\$releasever \
EnableGroups no GPGCheck yes \
Name "Firewall Services" \
GPGKey \
Visible yes status disabled
signal-event yum-modify
  • install the rpms

Important.png Note:
OpenUpload requires e-smith-base 5.2.0-56 or later. For now, this release is only available in smeupdates-testing repository. To get it, you need to run
yum --enablerepo smeupdates-testing update e-smith-base e-smith-ldap
signal-event post-upgrade signal-event reboot

Note that those packages are not well tested yet, and you might find bugs. You are warned

yum --enablerepo=fws install smeserver-openupload
  • Appply the needed configuration:
db configuration setprop openupload Authentication ldap
signal-event webapps-update
db configuration set UnsavedChanges no
  • Create a group (using the server-manager) called 'admins'. All the members of this group will have admin privileges in OpenUpload. Once you're logged in, you can change ACL if you want to use another group name for administrative tasks.

You can now access the application using this URL: https://your-server.domain.tld/openupload

Additional options

Some settings are available from the DB

  • Authentication: Control the way users are authenticated. Correct values are ldap (uses the local LDAP server as backend for users and groups), imap (uses your local IMAP server to validate credentials, and the internal database to store user and groups informations, users are created automatically on first login), internal (uses the internal database to manage users and groups. An admin have to create user account befor they can login). If you use the internal authentication mechanisme, you need to login using admin/admin. a last value is available for this prop: LemonLDAP which uses LemonLDAP-NG to validate credentials, and the internal ldap server do get user/group information. You can have more information on this later on this page.
  • RequireSSL: Should users accessing Open Upload should be redirected to a secured address ? Correct values are yes (always redirect to https://), no: allow unsecured connections, or login: only redirect to https when user try to login. This allow to protect passwords when users log into the application, but let downloads run over un-protected connections (might be usefull if you use a self-signed certificate)
  • MaxUpload: the maximum number of files sent in one run
  • MaxUploadSize: the maximum size allowed per file (in MegaBytes)
  • AliasOnPrimary: can be enabled or disabled (default is enabled). This prop lets you disable the access to Open Upload on your primary domain (the alias /openupload won't be added in apache configuration). This is usefull if you want the application to be available only with a virtualhost.


db configuration setprop openupload RequireSSL login MaxUpload 10 MaxUploadSize 750
signal-event webapps-update

Intergration with LemonLDAP::NG

OpenUpload can be protected by LemonLDAP::NG. Here're the steps to protect it

Disable the access on the primary domain

You should disable the access to Open Upload on your primary domain:

db configuration setprop openupload AliasOnPrimary disabled
signal-event webapps-update

Enable LemonLDAP::NG integration

This contrib support LemonLDAP NG auth quite easily:

db configuration setprop openupload Authentication LemonLDAP
signal-event webapps-update

Create a new virtualhost for Open Upload

Lets create a new virtualhost for Open Upload. You can choose the name you want, for example, lets create upload.domain.tld:

db domains set upload.$(db configuration get DomainName) domain Content Primary Description 'Open Upload' \
DocumentRoot /usr/share/openupload/www/ Nameservers internet TemplatePath WebAppVirtualHost \
LemonLDAP enabled
signal-event domain-create upload.$(db configuration get DomainName)
mkdir -p /etc/e-smith/templates-custom/usr/share/openupload/www/
cat <<'EOF' > /etc/e-smith/templates-custom/usr/share/openupload/www/

$CONFIG['WWW_SERVER'] = 'http://upload.{"$DomainName";}';

$CONFIG['WWW_ROOT'] = '/';

$CONFIG['INSTALL_ROOT'] = '/usr/share/openupload/';

$CONFIG['DATA_PATH'] = '/var/lib/openupload';
signal-event webapps-update

Declare this virtualhost in LemonLDAP

You can now create the virtualhost in LemonLDAP management interface. You can create the rules you want. For example, here're the rules you can use to let everyone (unauthenticated users) download files, and let LemonLDAP::NG validate credentials of users trying to login:

  • Comment: 01deny_double_action
  • Expression: (a|action)=.*(a|action)=.*
  • Rule: deny

  • 10unprotect_dl
  • Expression: (a|action)=[dgr]
  • Rule: unprotect

  • 12unprotect_templates
  • Expression: ^/templates/
  • Rule: unprotect

  • 13unprotect_captcha
  • Expression: ^/plugins/captcha\.php
  • Rule: unprotect

  • 14unprotect_index
  • Expression: ^/index.php$
  • Rule: unprotect

  • 20logout
  • Expression: (a|action)=logout
  • Rule: logout_app

Backup and Restore

You should backup the directory /var/lib/openupload, which is used to store uploaded files.


If you want to remove the contrib, just run:

yum remove openupload

You can manually remove file in /var/lib/openupload and /usr/share/openupload if you want to remove all files used by Open Upload


The source for this contrib can be found in Firewall-Services's repository [1].