Instalação de Software · 8 min read · Dec 20, 2025
Como Instalar Akaunting com Apache e Let's Encrypt SSL no Ubuntu 22.04

Akaunting é um aplicativo de software de contabilidade de código aberto e auto-hospedado para pequenas empresas e freelancers. É construído usando Laravel, Bootstrap, jQuery e RESTful API. É usado para criar e gerenciar faturas, orçamentos e finanças via um navegador da web. Ele fornece uma incrível App Store para usuários e desenvolvedores expandirem a funcionalidade do Akaunting.
Neste tutorial, vou mostrar como instalar o software de contabilidade Akaunting com Apache e Let’s Encrypt SSL no Ubuntu 22.04.
Pré-requisitos
- Um servidor rodando Ubuntu 22.04.
- 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
Primeiro, você precisará instalar o Apache, MariaDB, PHP e outras extensões PHP no seu servidor. Você pode instalar todos eles executando o seguinte comando:
apt-get install apache2 mariadb-server php libapache2-mod-php php-common php-imap php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mysql php-cli php-bcmath php-ldap php-zip php-curl unzip curl -yApós instalar todos os pacotes, edite o arquivo de configuração do PHP e altere as configurações padrão:
nano /etc/php/8.1/apache2/php.iniAltere as seguintes linhas:memory_limit = 256M
upload_max_filesize = 16M
post_max_size = 16M
max_execution_time = 300
date.timezone = UTCSalve e feche o arquivo e reinicie o serviço Apache para aplicar as alterações de configuração:
systemctl restart apache2Configurar Banco de Dados MariaDB
Akaunting usa um MariaDB/MySQL como backend de banco de dados. Portanto, você precisará criar um banco de dados e um usuário para o Akaunting.
Primeiro, faça login no MariaDB com o seguinte comando:
mysqlUma vez logado, crie um banco de dados e um usuário para o Akaunting com o seguinte comando:
MariaDB [(none)]> CREATE DATABASE akaunting_db;
MariaDB [(none)]> CREATE USER 'akaunting_user'@'localhost' IDENTIFIED BY 'password';Em seguida, conceda todas as permissões ao banco de dados Akaunting com o seguinte comando:
MariaDB [(none)]> GRANT ALL ON akaunting_db.* TO 'akaunting_user'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;Em seguida, limpe as permissões e saia do MariaDB com o seguinte comando:
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;Instalar Akaunting
Primeiro, vá para a página oficial de download do Akaunting e baixe a versão mais recente usando o seguinte comando:
wget -O Akaunting.zip https://akaunting.com/download.php?version=latestUma vez que o download esteja completo, descompacte o arquivo baixado no diretório raiz da web do Apache:
mkdir -p /var/www/html/akaunting
unzip Akaunting.zip -d /var/www/html/akauntingEm seguida, altere a propriedade e as permissões do diretório Akaunting:
chown -R www-data:www-data /var/www/html/akaunting/
chmod -R 755 /var/www/html/akaunting/Uma vez que você tenha terminado, pode prosseguir para a próxima etapa.
Configurar Apache para Akaunting
Em seguida, você precisará criar um arquivo de configuração de host virtual do Apache para o Akaunting. Você pode criá-lo com o seguinte comando:
nano /etc/apache2/sites-available/akaunting.confAdicione as seguintes linhas:
ServerAdmin [email protected]
DocumentRoot /var/www/html/akaunting
ServerName akaunting.example.com
DirectoryIndex index.html index.php
Options +FollowSymlinks
AllowOverride All
Require all granted
ErrorLog ${APACHE_LOG_DIR}/akaunting_error.log
CustomLog ${APACHE_LOG_DIR}/akaunting_access.log combined
Salve e feche o arquivo e ative o host virtual do Apache e o módulo de reescrita com o seguinte comando:
a2ensite akaunting
a2enmod rewriteEm seguida, reinicie o serviço Apache para aplicar as alterações:
systemctl restart apache2Agora você pode verificar o status do Apache com o seguinte comando:
systemctl status apache2Você receberá a seguinte saída:
? apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2022-11-12 13:45:47 UTC; 10s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 16032 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 16036 (apache2)
Tasks: 6 (limit: 464122)
Memory: 14.2M
CGroup: /system.slice/apache2.service
??16036 /usr/sbin/apache2 -k start
??16037 /usr/sbin/apache2 -k start
??16038 /usr/sbin/apache2 -k start
??16039 /usr/sbin/apache2 -k start
??16040 /usr/sbin/apache2 -k start
??16041 /usr/sbin/apache2 -k start
Nov 12 13:45:47 ubuntu22041 systemd[1]: Starting The Apache HTTP Server...Proteger Akaunting com Let’s Encrypt SSL
Em seguida, é uma boa ideia proteger seu site com Let’s Encrypt SSL. Primeiro, instale o cliente Certbot usando o seguinte comando:
apt-get install certbot python3-certbot-apache -yUma vez instalado, execute o seguinte comando para proteger seu site com Let’s Encrypt SSL:
certbot --apache -d akaunting.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 akaunting.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/akaunting-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/akaunting-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/akaunting-le-ssl.confEm seguida, selecione se deseja ou não redirecionar o tráfego HTTP para HTTPS, conforme mostrado abaixo:
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 Let’s Encrypt SSL para seu site:
Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/akaunting.conf to ssl vhost in /etc/apache2/sites-available/akaunting-le-ssl.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://akaunting.example.com
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=akaunting.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/akaunting.example.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/akaunting.example.com/privkey.pem
Your cert will expire on 2023-02-12. 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-leAcessar a Interface Web do Akaunting
Agora, abra seu navegador da web e acesse a interface web do Akaunting usando a URL http://akaunting.example.com. Você verá a seguinte tela:

Selecione seu idioma e clique no botão Próximo. Você verá a tela de configuração do banco de dados:

Forneça os detalhes do seu banco de dados e clique no botão Próximo. Você verá a tela de criação da conta de usuário Admin:

Forneça o nome da sua empresa, e-mail, senha e clique no botão Próximo. Você verá a tela de login do Akaunting:

Forneça seu nome de usuário admin, senha e clique no botão Login. Você verá a seguinte tela:

Clique no botão Pular. Você verá a tela de Moedas:

Ative suas moedas e clique no botão Próximo. Você verá a tela de plugins:

Instale seus módulos necessários e clique no botão Próximo. Você verá a seguinte tela:

Agora você pode criar sua primeira fatura a partir da tela acima.
Conclusão
Parabéns! você instalou com sucesso o Akaunting com Apache e Let’s Encrypt SSL no servidor Ubuntu 22.04. Agora você pode hospedar o software Akaunting em sua organização para gerenciar suas faturas, orçamentos e finanças de qualquer lugar. Sinta-se à vontade para me perguntar se você tiver alguma dúvida.
Receba novas postagens na sua caixa de entrada
Sem spam. Cancele a assinatura a qualquer momento.