---
title: "Deploy Akaunting"
description: "Open-source accounting with MariaDB and persistent business data."
category: "Other"
url: https://railway.com/deploy/akaunting
---

# Deploy Akaunting

Open-source accounting with MariaDB and persistent business data.

**[Deploy Akaunting on Railway](https://railway.com/template/akaunting)**

- **Creator:** Heron Technology
- **Category:** Other

## Template content

### Scheduler https://raw.githubusercontent.com/akaunting/akaunting/ecb295d01a7d0cf0f718957530bbbae33435c9f5/public/img/pwa/icon-512x512.png

- **Image:** akaunting/akaunting:3.1.21-v@sha256:0289239e38f5b21efafb152ae8d828735d38fed8477d4fb277d472f8ea3fde09
- **Start command:** `/bin/bash -lc 'set -e
if [ ! -f /var/www/html/index.php ]; then
  unzip -q /tmp/akaunting.zip -d /var/www/html
fi
php artisan schedule:run --no-interaction'`

### Akaunting https://raw.githubusercontent.com/akaunting/akaunting/ecb295d01a7d0cf0f718957530bbbae33435c9f5/public/img/pwa/icon-512x512.png

- **Image:** akaunting/akaunting:3.1.21-v@sha256:0289239e38f5b21efafb152ae8d828735d38fed8477d4fb277d472f8ea3fde09
- **Start command:** `/bin/bash -lc 'set -e
if [ ! -f /var/www/html/index.php ]; then
  unzip -q /tmp/akaunting.zip -d /var/www/html
fi
a2dismod mpm_event mpm_worker >/dev/null 2>&1 || true
a2enmod mpm_prefork rewrite >/dev/null
mkdir -p /var/www/html/storage/framework/sessions /var/www/html/storage/framework/views /var/www/html/storage/framework/cache /var/www/html/storage/app/uploads
printf "ok\n" > /var/www/html/healthz.html
if [ ! -f /var/www/html/storage/.railway-setup-complete ]; then
  attempt=0
  until php artisan install --db-host="$DB_HOST" --db-port="$DB_PORT" --db-name="$DB_NAME" --db-username="$DB_USERNAME" --db-password="$DB_PASSWORD" --db-prefix="$DB_PREFIX" --company-name="$COMPANY_NAME" --company-email="$COMPANY_EMAIL" --admin-email="$ADMIN_EMAIL" --admin-password="$ADMIN_PASSWORD" --locale="$APP_LOCALE" --no-interaction; do
    attempt=$((attempt + 1))
    if [ "$attempt" -ge 12 ]; then
      exit 1
    fi
    sleep 5
  done
  touch /var/www/html/storage/.railway-setup-complete
fi
chmod -R u=rwX,g=rX,o=rX /var/www/html
chown -R www-data:root /var/www/html
exec docker-php-entrypoint apache2-foreground'`
- **Health check:** /healthz.html
- **Public domain:** Yes

### MariaDB https://mariadb.org/wp-content/themes/twentynineteen-child/icons/logo_seal.svg

- **Image:** mariadb:11.8.2@sha256:2bcbaec92bd9d4f6591bc8103d3a8e6d0512ee2235506e47a2e129d190444405

## Documentation

# Deploy and Host Akaunting on Railway

## What is Akaunting?

Akaunting is open-source accounting software for small businesses and
freelancers. It provides invoicing, expense tracking, banking, reporting, and
multi-company bookkeeping through a browser-based interface.

## About Hosting Akaunting

This template runs Akaunting 3.1.21 with MariaDB 11.8.2 and a Railway cron
service for scheduled accounting tasks. Railway provides the public HTTPS
endpoint for Akaunting while MariaDB remains on private networking. Akaunting
and MariaDB each use a persistent volume, preserving the installed application,
uploads, modules, configuration, and database. Shared credentials are generated
once and passed through Railway service references. The deployer supplies only
the initial administrator email and password.

## Common Use Cases

* Send invoices and track customer payments.
* Record expenses, bills, banking activity, and transfers.
* Run reports and maintain books for one or more small businesses.

## Dependencies for Akaunting Hosting

* Akaunting 3.1.21, pinned to the official image digest.
* MariaDB 11.8.2 on Railway private networking.
* A Railway cron service for Akaunting's scheduled commands.
* Persistent volumes for the complete Akaunting installation and MariaDB data.

### Deployment Dependencies

* [Akaunting source](https://github.com/akaunting/akaunting)
* [Official Akaunting Docker packaging](https://github.com/akaunting/docker)
* [Akaunting installation documentation](https://akaunting.com/hc/docs/on-premise-app/install-update/)
* [Umbrel Akaunting package](https://github.com/getumbrel/umbrel-apps/tree/master/akaunting)

### Implementation Details

The Akaunting service listens on port `80`. Railway checks the static
`/healthz.html` readiness file and routes public HTTPS to the application. The
root page redirects to `/auth/login`, which is the primary application check.

The official `-v` image retains the Akaunting release archive so a newly
attached Railway volume can be populated at `/var/www/html`. On the first start,
the wrapper waits for MariaDB, runs Akaunting's supported `artisan install`
command, and writes a marker into the persistent application volume. Later
starts reuse the installed files and database instead of replaying setup.

The Akaunting service reaches MariaDB through
`${{MariaDB.RAILWAY_PRIVATE_DOMAIN}}`. MariaDB owns the authoritative generated
database password; Akaunting and the scheduler reference it without copying a
literal value. The application signing key is generated once on Akaunting and
referenced by the scheduler.

The scheduler runs `php artisan schedule:run --no-interaction` every five
minutes. Akaunting's default queue driver is synchronous, so a separate queue
worker or Redis service is not required for this supported baseline.

Before updating, back up both persistent volumes, review Akaunting and MariaDB
release notes, and validate the replacement immutable image digests in
isolation. If a migration is incompatible, restore matching application and
database backups rather than rolling back only the application image.

This community template is maintained independently and does not imply
affiliation with or endorsement by Akaunting.

## Why Deploy Akaunting on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Akaunting on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — [Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/akaunting
