Skip to content
AcuGIS Connect Documentation

Install AcuGIS Backup

Install AcuGIS Backup on the Ubuntu server that will be backed up. The service runs as the unprivileged user acugis-backup, listens on 127.0.0.1:8090, and is opened later through AcuGIS Connect.

The supported installation method is the procedure in the AcuGIS Backup source tree, under deploy/. The repository does not publish a Debian package, a container image, or a binary download URL. Build the binary from that source tree, then install the account, configuration, and systemd service below.

Run the installation commands as root. The Backup process itself refuses to start as root. systemd starts it as acugis-backup.

System requirements

Requirement Value
Operating system Ubuntu 24.04 or Ubuntu 26.04
CPU architecture 64-bit x86 (linux/amd64), which is the architecture in the documented build command
Service manager systemd
Administrator access SSH to the server. The account can be root when the server allows it.
Build tools A Go toolchain that can compile the module. go.mod declares Go 1.26.3. Required on the build machine only.
PostgreSQL jobs pg_dump and psql installed on the server, with their paths set in the configuration

The repository states that this version was live-tested on Ubuntu 24.04. It does not publish a minimum RAM size. Before a job starts, free space on the state volume must be at least min_free_bytes. The example configuration sets that to 1073741824 (1 GiB). The volume also needs room for the archive being written.

The server needs inbound SSH for administration. The management interface stays on loopback. When a job uses S3-compatible storage, Google Cloud Storage, or SFTP, the server also needs outbound access to that destination. Backup data is sent from this server to the destination. It is not sent through AcuGIS Connect.

Installation layout

Item Path
Binary /usr/local/bin/acugis-backup
Configuration /etc/acugis-backup/config.yaml
Credential key /var/lib/acugis-backup/credential.key
State directory /var/lib/acugis-backup
SQLite database /var/lib/acugis-backup/state.db
systemd unit /etc/systemd/system/acugis-backup.service
Service name acugis-backup.service
Listener 127.0.0.1:8090

Logs go to the journal for acugis-backup.service. The program does not write a separate log file.

No environment variables are required for the service to start. Google Cloud Storage can use GOOGLE_APPLICATION_CREDENTIALS when you choose Application Default Credentials on a machine that is not using an attached service account. That case is described in Configure Backup Destinations.

1. Build the binary

On the build machine, open the AcuGIS Backup source tree. The directory must contain cmd/acugis-backup and deploy/.

GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o acugis-backup ./cmd/acugis-backup

CGO_ENABLED=0 produces a static binary. You can build on the Ubuntu server, or on another machine, and copy acugis-backup to the server.

Place the binary and mark it executable:

install -m 0755 acugis-backup /usr/local/bin/acugis-backup

2. Create the account, directories, and key

useradd --system --home-dir /var/lib/acugis-backup --create-home --shell /usr/sbin/nologin acugis-backup
install -d -o root -g acugis-backup -m 0750 /etc/acugis-backup
install -d -o acugis-backup -g acugis-backup -m 0700 /var/lib/acugis-backup
dd if=/dev/urandom of=/var/lib/acugis-backup/credential.key bs=32 count=1 status=none
chown acugis-backup:acugis-backup /var/lib/acugis-backup/credential.key
chmod 0600 /var/lib/acugis-backup/credential.key

The key file must be exactly 32 bytes and mode 0600. AcuGIS Backup uses it to encrypt destination credentials and PostgreSQL passwords. Keep a protected copy of this file with the same care as those secrets. A replacement key cannot read secrets already stored. Do not copy the key, state.db, or generated archives back into the source tree.

3. Write the configuration

Copy the example file from the source tree:

install -m 0640 -o root -g acugis-backup deploy/config.example.yaml /etc/acugis-backup/config.yaml

The example is:

listen: 127.0.0.1:8090
cookie_secure: false

state_dir: /var/lib/acugis-backup
credential_key_file: /var/lib/acugis-backup/credential.key
admin_password_hash: "$2a$12$replace-with-acugis-backup-hash-password"

pg_dump_path: /usr/bin/pg_dump
psql_path: /usr/bin/psql

allow_roots:
  - /var/lib/acugis
  - /etc/acugis
  - /etc/geoserver
  - /etc/lizmap

min_free_bytes: 1073741824
Setting Purpose
listen Address and port of the management interface. Leave 127.0.0.1:8090 when you will use an SSH tunnel.
cookie_secure Leave false for the HTTP tunnel to 127.0.0.1. Set true only when a browser reaches Backup over HTTPS.
state_dir SQLite database, staging files, and browser-download archives.
credential_key_file 32-byte key created above.
admin_password_hash bcrypt hash of the single administrator password.
pg_dump_path and psql_path Absolute paths to the PostgreSQL client tools. Leave them empty only when this server will not run PostgreSQL jobs.
allow_roots Directories a file-system job is allowed to read. Every selected path must sit under one of these directories.
min_free_bytes Free space required on the state volume before a job starts.

/etc itself, /root, /proc, /sys, /dev, /boot, and credential paths such as /etc/shadow and /etc/ssh are rejected even if they are listed. A specific application directory such as /etc/acugis is allowed when it is listed here.

Replace the example allow_roots entries with the directories this server should be able to archive. A directory under /home also has to be named in the systemd unit. See Let the service read the files.

Find the PostgreSQL client tools when this server will back up databases:

command -v pg_dump
command -v psql

Set pg_dump_path and psql_path to those absolute paths. The acugis-backup user must be allowed to execute them. Install the PostgreSQL client that matches the cluster you are backing up before you create a PostgreSQL job.

4. Set the administrator password

hash-password reads the password from the terminal and prints only the bcrypt hash. It does not store the password.

/usr/local/bin/acugis-backup hash-password

The prompt is Password:. Copy the printed hash into admin_password_hash in /etc/acugis-backup/config.yaml. The hash starts with $2. Keep the value quoted so YAML does not treat $ specially.

There is one administrator password. The login page asks for that password and does not ask for a username.

5. Install and start the service

Copy the unit from the source tree:

install -m 0644 deploy/acugis-backup.service /etc/systemd/system/acugis-backup.service
systemctl daemon-reload
systemctl enable --now acugis-backup.service

The unit starts:

/usr/local/bin/acugis-backup -config /etc/acugis-backup/config.yaml

It sets User=acugis-backup, Group=acugis-backup, Restart=on-failure, and allows writes only under /var/lib/acugis-backup.

Confirm the service:

systemctl is-active acugis-backup.service
systemctl status acugis-backup.service --no-pager

is-active prints active when the service is running.

6. Confirm the listener

ss -lnt | awk '$4 ~ /:8090$/'

The address should be 127.0.0.1:8090.

The login page is served on that listener:

curl -fsS -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8090/login

The command prints 200. The page title is Log in — AcuGIS Backup. A browser on the server can open http://127.0.0.1:8090/login for the same check. Leave the port unpublished on the firewall. You will open it from your desktop in Connect Using AcuGIS Connect.

Network

Use this arrangement:

  1. Administrators reach the server with SSH.
  2. AcuGIS Backup listens on 127.0.0.1:8090 on that server.
  3. AcuGIS Connect, or an equivalent SSH local forward, connects to that loopback address.
  4. The management interface is not published to the internet.

The SSH port and the Backup port are different. SSH is usually port 22. Backup is port 8090 on the server's loopback interface. AcuGIS Connect's local port, usually 18090, is the port on your computer.

A non-loopback listen address is rejected unless tls_cert_file and tls_key_file are both set. The SSH tunnel remains the access method this guide uses. An optional HTTPS reverse proxy is described in Security.

Let the service read the files

The unit hides /root and mounts an empty private /home. It bind-mounts /home/tomcat read-only, which is the GeoServer tree on AcuGIS hosts:

BindReadOnlyPaths=-/home/tomcat

The leading - lets the service start when that path is absent. For each additional directory under /home that allow_roots permits, add another BindReadOnlyPaths= line for that directory. Bind the directory, not /home, /root, or /run/user. Then reload and restart:

systemctl daemon-reload
systemctl restart acugis-backup.service

The bind mount does not change file ownership. The acugis-backup user still needs permission to read each path. Grant that with a supplementary group or an ACL. Do not give the account sudo.

Group membership, in a drop-in so a missing group does not affect other hosts:

# /etc/systemd/system/acugis-backup.service.d/groups.conf
[Service]
SupplementaryGroups=tomcat

Or an ACL on the directory you intend to archive:

setfacl -R -m u:acugis-backup:rX /home/tomcat/apache-tomcat-10.1.62/webapps/geoserver/data
setfacl -R -d -m u:acugis-backup:rX /home/tomcat/apache-tomcat-10.1.62/webapps/geoserver/data

Use the directory that exists on this host. After a drop-in change, run systemctl daemon-reload and systemctl restart acugis-backup.service.

Installation verification

Confirm each item before you open AcuGIS Connect:

  • /usr/local/bin/acugis-backup exists and is executable.
  • /etc/acugis-backup/config.yaml is owned by root:acugis-backup and mode 0640.
  • /var/lib/acugis-backup/credential.key is owned by acugis-backup and mode 0600.
  • systemctl is-active acugis-backup.service prints active.
  • ss shows 127.0.0.1:8090.
  • http://127.0.0.1:8090/login on the server returns the login page.
  • The server accepts SSH, so AcuGIS Connect can open the tunnel.

Continue with Connect Using AcuGIS Connect. If a check fails, use Troubleshooting.