インストールガイド · 5 min read · Dec 20, 2025
Ubuntu 22.04にApacheとLet's Encrypt SSLを使用してAkauntingをインストールする方法

Akauntingは、小規模企業やフリーランサー向けのオープンソースで自己ホスト型の会計ソフトウェアアプリケーションです。Laravel、Bootstrap、jQuery、RESTful APIを使用して構築されています。ウェブブラウザを介して請求書、見積もり、財務を作成および管理するために使用されます。Akauntingの機能を拡張するための素晴らしいアプリストアをユーザーと開発者に提供します。
このチュートリアルでは、Ubuntu 22.04にApacheとLet’s Encrypt SSLを使用してAkaunting会計ソフトウェアをインストールする方法を示します。
前提条件
- Ubuntu 22.04を実行しているサーバー。
- サーバーIPにポイントされた有効なドメイン名。
- サーバーに設定されたルートパスワード。
Apache、MariaDB、およびPHPのインストール
まず、サーバーにApache、MariaDB、PHP、およびその他のPHP拡張機能をインストールする必要があります。次のコマンドを実行してすべてをインストールできます。
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 -yすべてのパッケージをインストールした後、PHP設定ファイルを編集し、デフォルト設定を変更します。
nano /etc/php/8.1/apache2/php.ini次の行を変更します:memory_limit = 256M
upload_max_filesize = 16M
post_max_size = 16M
max_execution_time = 300
date.timezone = UTCファイルを保存して閉じたら、Apacheサービスを再起動して設定変更を適用します。
systemctl restart apache2MariaDBデータベースの設定
Akauntingは、データベースバックエンドとしてMariaDB/MySQLを使用します。したがって、Akaunting用のデータベースとユーザーを作成する必要があります。
まず、次のコマンドでMariaDBにログインします。
mysqlログインしたら、次のコマンドでAkaunting用のデータベースとユーザーを作成します。
MariaDB [(none)]> CREATE DATABASE akaunting_db;
MariaDB [(none)]> CREATE USER 'akaunting_user'@'localhost' IDENTIFIED BY 'password';次に、次のコマンドでAkauntingデータベースにすべての権限を付与します。
MariaDB [(none)]> GRANT ALL ON akaunting_db.* TO 'akaunting_user'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;次に、権限をフラッシュし、次のコマンドでMariaDBから退出します。
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;Akauntingのインストール
まず、Akauntingの公式ダウンロードページに移動し、次のコマンドを使用して最新バージョンをダウンロードします。
wget -O Akaunting.zip https://akaunting.com/download.php?version=latestダウンロードが完了したら、ダウンロードしたファイルをApacheのウェブルートディレクトリに解凍します。
mkdir -p /var/www/html/akaunting
unzip Akaunting.zip -d /var/www/html/akaunting次に、Akauntingディレクトリの所有権と権限を変更します。
chown -R www-data:www-data /var/www/html/akaunting/
chmod -R 755 /var/www/html/akaunting/完了したら、次のステップに進むことができます。
Akaunting用のApacheの設定
次に、Akaunting用のApache仮想ホスト設定ファイルを作成する必要があります。次のコマンドで作成できます。
nano /etc/apache2/sites-available/akaunting.conf次の行を追加します。
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
ファイルを保存して閉じたら、次のコマンドでApache仮想ホストとリライトモジュールを有効にします。
a2ensite akaunting
a2enmod rewrite次に、変更を適用するためにApacheサービスを再起動します。
systemctl restart apache2次のコマンドでApacheのステータスを確認できます。
systemctl status apache2次の出力が得られます。
? 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...Let’s Encrypt SSLでAkauntingを保護する
次に、Let’s Encrypt SSLでウェブサイトを保護することをお勧めします。まず、次のコマンドを使用してCertbotクライアントをインストールします。
apt-get install certbot python3-certbot-apache -yインストールが完了したら、次のコマンドを実行してLet’s Encrypt SSLでウェブサイトを保護します。
certbot --apache -d akaunting.example.com次のように、メールアドレスを提供し、サービス利用規約に同意するよう求められます。
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.conf次に、HTTPトラフィックをHTTPSにリダイレクトするかどうかを選択します。
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): 22を入力してEnterを押すと、ウェブサイトにLet’s Encrypt SSLがインストールされます。
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-leAkauntingウェブインターフェースにアクセス
今、ウェブブラウザを開いて、URL http://akaunting.example.comを使用してAkauntingウェブインターフェースにアクセスします。次の画面が表示されます。

言語を選択し、次へボタンをクリックします。データベース設定画面が表示されます。

データベースの詳細を提供し、次へボタンをクリックします。管理者ユーザーアカウント作成画面が表示されます。

会社名、メールアドレス、パスワードを提供し、次へボタンをクリックします。Akauntingのログイン画面が表示されます。

管理者ユーザー名、パスワードを提供し、ログインボタンをクリックします。次の画面が表示されます。

スキップボタンをクリックします。通貨画面が表示されます。

通貨を有効にし、次へボタンをクリックします。プラグイン画面が表示されます。

必要なモジュールをインストールし、次へボタンをクリックします。次の画面が表示されます。

上記の画面から最初の請求書を作成できます。
結論
おめでとうございます!Ubuntu 22.04サーバーにApacheとLet’s Encrypt SSLを使用してAkauntingを正常にインストールしました。これで、組織内でAkauntingソフトウェアをホストして、どこからでも請求書、見積もり、財務を管理できます。質問があればお気軽にお尋ねください。
新しい投稿を受信箱で受け取る
スパムはありません。いつでも購読を解除できます。