Instalação FileRun · 9 min read · Dec 18, 2025
Como Instalar o FileRun no Ubuntu 22.04

FileRun é um aplicativo de compartilhamento de arquivos de código aberto e baseado na web para sistemas operacionais baseados em Linux. É muito semelhante ao Google Drive, iCloud e DropBox e permite que os usuários compartilhem e sincronizem arquivos pela internet. Pode ser acessado via aplicativo móvel, WebDAV e navegador da web. Permite que você hospede sua própria solução de compartilhamento de arquivos na nuvem e acesse todos os seus arquivos em qualquer lugar via armazenamento em nuvem seguro.
Este post mostrará como instalar o FileRun com Apache e SSL Let’s Encrypt no Ubuntu 22.04.
Pré-requisitos
- Um servidor rodando Ubuntu 22.04.
- Um nome de domínio válido apontado para o IP do seu servidor.
- Uma senha de root configurada no servidor.
Instalar Apache, MariaDB e PHP
FileRun é escrito em PHP e usa MariaDB como backend de banco de dados. Portanto, você precisará instalar o Apache, MariaDB, PHP e outros pacotes em seu servidor. Primeiro, instale o pacote Apache e MariaDB usando o seguinte comando:
apt-get install apache2 mariadb-server mariadb-clientApós instalar ambos os pacotes, você precisará instalar a versão do PHP php7.2-php7.4 em seu servidor. No entanto, o Ubuntu 22.04 vem com a versão PHP 8.1 no repositório padrão. Portanto, você precisará adicionar o repositório PHP Ondrej em seu servidor.
Primeiro, instale todas as dependências necessárias usando o seguinte comando:
apt install software-properties-common ca-certificates lsb-release apt-transport-https -yEm seguida, adicione o repositório PHP usando o seguinte comando:
add-apt-repository ppa:ondrej/phpEm seguida, atualize o cache do repositório e instale o PHP com outras extensões necessárias usando o seguinte comando:
apt update
apt install php7.4 libapache2-mod-php7.4 imagemagick ffmpeg php7.4-imagick php7.4-mysql php7.4-fpm php7.4-common php7.4-gd php7.4-json php7.4-curl php7.4-zip php7.4-xml php7.4-mbstring php7.4-bz2 php7.4-intl unzip -yUma vez que todos os pacotes estejam instalados, você também precisará instalar o IonCube loader em seu sistema.
Primeiro, baixe o IonCube loader com o seguinte comando:
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gzEm seguida, extraia o arquivo baixado com o seguinte comando:
tar -xzf ioncube_loaders_lin_x86-64.tar.gz -C /usr/lib/phpEm seguida, crie um arquivo de configuração ioncube e defina o caminho da fonte IonCube:
nano /etc/php/7.4/apache2/conf.d/00-ioncube.iniAdicione a seguinte linha:
zend_extension = /usr/lib/php/ioncube/ioncube_loader_lin_7.4.soSalve e feche o arquivo, então crie um arquivo de configuração PHP para o FileRun:
nano /etc/php/7.4/apache2/conf.d/filerun.iniAdicione as seguintes configurações:
expose_php = Off
error_reporting = E_ALL & ~E_NOTICE
display_errors = Off
display_startup_errors = Off
log_errors = On
ignore_repeated_errors = Off
allow_url_fopen = On
allow_url_include = Off
variables_order = "GPCS"
allow_webdav_methods = On
memory_limit = 128M
max_execution_time = 300
output_buffering = Off
output_handler = ""
zlib.output_compression = Off
zlib.output_handler = ""
safe_mode = Off
register_globals = Off
magic_quotes_gpc = Off
upload_max_filesize = 20M
post_max_size = 20M
enable_dl = Off
disable_functions = ""
disable_classes = ""
session.save_handler = files
session.use_cookies = 1
session.use_only_cookies = 1
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_httponly = 1
date.timezone = "UTC"Salve e feche o arquivo, então reinicie o serviço Apache para aplicar as mudanças:
systemctl reload apache2Criar um Banco de Dados para o FileRun
Primeiro, proteja a instalação do MariaDB e defina a senha de root usando o seguinte comando:
mysql_secure_installationResponda a todas as perguntas conforme mostrado abaixo:
Enter current password for root (enter for none): PRESS ENTER
Set root password? [Y/n] Y
New password:
Re-enter new password:
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y Em seguida, faça login no shell do MariaDB com o seguinte comando:
mysql -u root -pUma vez logado, crie um banco de dados e um usuário com o seguinte comando:
MariaDB [(none)]> CREATE DATABASE filerun;
MariaDB [(none)]> CREATE USER 'filerun'@'localhost' IDENTIFIED BY 'password';Em seguida, conceda todos os privilégios ao banco de dados FileRun com o seguinte comando:
MariaDB [(none)]> GRANT ALL PRIVILEGES ON filerun.* TO 'filerun'@'localhost';Em seguida, limpe os privilégios e saia do MariaDB com o seguinte comando:
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;Uma vez que você tenha terminado, pode prosseguir para o próximo passo.
Baixar o FileRun
Primeiro, baixe a versão mais recente do FileRun do site oficial usando o seguinte comando:
wget -O FileRun.zip https://filerun.com/download-latestUma vez que o FileRun tenha sido baixado, descompacte o arquivo baixado usando o seguinte comando:
unzip FileRun.zip -d /var/www/html/filerun/Em seguida, defina as permissões e a propriedade adequadas com o seguinte comando:
chown -R www-data:www-data /var/www/html/filerun
chmod -R 755 /var/www/html/filerunUma vez que você tenha terminado, pode prosseguir para o próximo passo.
Criar um Host Virtual Apache para o FileRun
Em seguida, você precisará criar um arquivo de configuração de host virtual Apache para o FileRun. Você pode criá-lo com o seguinte comando:
nano /etc/apache2/sites-available/filerun.confAdicione as seguintes linhas:
ServerName filerun.example.com
DocumentRoot /var/www/html/filerun
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
ErrorLog ${APACHE_LOG_DIR}/filerun.error.log
CustomLog ${APACHE_LOG_DIR}/filerun.access.log combined
Salve e feche o arquivo, então ative o host virtual Apache e habilite o módulo de reescrita do Apache com o seguinte comando:
a2ensite filerun.conf
a2enmod rewriteEm seguida, reinicie o serviço Apache para aplicar as mudanças:
systemctl restart apache2Você também pode verificar o status do Apache com o seguinte comando:
systemctl status apache2Você deve ver a seguinte saída:
? apache2.service - O Servidor HTTP Apache
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2022-08-06 09:26:00 UTC; 7s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 21189 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 21193 (apache2)
Tasks: 6 (limit: 2242)
Memory: 14.6M
CPU: 112ms
CGroup: /system.slice/apache2.service
??21193 /usr/sbin/apache2 -k start
??21194 /usr/sbin/apache2 -k start
??21195 /usr/sbin/apache2 -k start
??21196 /usr/sbin/apache2 -k start
??21197 /usr/sbin/apache2 -k start
??21198 /usr/sbin/apache2 -k start
Aug 06 09:26:00 ubuntu2204 systemd[1]: Starting The Apache HTTP Server...Uma vez que você tenha terminado, pode prosseguir para o próximo passo.
Acessar a Interface Web do FileRun
Agora, abra seu navegador da web e acesse a interface web do FileRun usando a URL http://filerun.example.com. Você será redirecionado para a seguinte página:

Clique no botão Próximo. você deve ver a página de verificação dos requisitos do servidor:

Clique no botão Próximo. Você deve ver a página de configuração do banco de dados:

Clique no botão Próximo. Uma vez que a instalação tenha sido concluída, você deve ver a seguinte página:

Clique no botão Próximo. Você deve ver a página de login do FileRun:

Forneça seu nome de usuário de administrador, senha e clique no botão Entrar. Você deve ver o painel do FileRun na seguinte página:

Proteger o FileRun com SSL Let’s Encrypt
Também é recomendado proteger seu site com SSL Let’s Encrypt. Primeiro, você precisará instalar o cliente Certbot em seu servidor. Você pode instalá-lo com o seguinte comando:
apt-get install python3-certbot-apache -yUma vez que o Certbot esteja instalado, execute o seguinte comando para proteger seu site com SSL Let’s Encrypt:
certbot --apache -d filerun.example.comVocê será solicitado a fornecer seu e-mail e aceitar os termos de serviço, conforme mostrado abaixo:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for filerun.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/filerun-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/filerun-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/filerun-le-ssl.conf
Next, select whether or not to redirect HTTP traffic to HTTPS as shown below:Por favor, escolha se deseja ou não redirecionar o tráfego HTTP para HTTPS, removendo o acesso HTTP.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2Digite 2 e pressione Enter para instalar o SSL Let’s Encrypt para seu site:
Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/filerun.conf to ssl vhost in /etc/apache2/sites-available/filerun-le-ssl.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://filerun.example.com
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=filerun.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/filerun.example.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/filerun.example.com/privkey.pem
Your cert will expire on 2022-4-29. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-leConclusão
Parabéns! você instalou com sucesso o FileRun com Apache e SSL Let’s Encrypt no Ubuntu 22.04. Agora você pode hospedar seu próprio servidor FileRun na nuvem e começar a compartilhar e sincronizar seus arquivos, músicas e fotos com seus amigos e familiares.
Receba novas postagens na sua caixa de entrada
Sem spam. Cancele a assinatura a qualquer momento.