To self-host Saltcorn on a managed VPS is to keep your no-code applications, and the data they hold, on a server of your own, which our teams keep up to date and monitor day and night. Saltcorn is a free, open source builder of database applications under the MIT license: tables, forms, lists, pages and user roles, without writing code. This guide installs version 1.6.4 on top of its official Docker image, and we ran every command on a Simafri VPS before writing it: installation with Docker Compose and PostgreSQL, HTTPS, the first administrator, backups, a restore and an update.
By Simon Vasconcelos Lee
Published on 3 December 202612 minute read
127.0.0.1 behind an HTTPS reverse proxy.1.6.4 and latest images on Docker Hub still contained Saltcorn 1.6.2: a two-line Dockerfile installs 1.6.4, with its security fixes, on top of the official image.add-schema, then the first account you create in the browser becomes the administrator.set-cfg, back up with pg_dump and an archive of the files volume, and update by changing the version and rebuilding.Saltcorn describes itself as an extensible open source no-code database application builder. You design your tables in the browser, then the screens that show and edit them, and your colleagues use the result as a web application, with their own accounts and permissions. Its developer, Tom Nielsen, and its contributors write it in Node.js, on top of PostgreSQL.
Saltcorn is published under the MIT license, one of the most permissive open source licenses. You can use it free of charge, for yourself, your company or your clients, copy it, modify it and redistribute it, including inside a commercial offer, provided you keep its copyright notice and license text. The software is provided without warranty.
The modules of the store have their own licenses, set by their authors. The free hosted instance at saltcorn.com is meant for trying Saltcorn out: its README states that it comes with no guarantee about the security or availability of your data, which is one reason to run your own.
The README of Saltcorn says that a virtual private server with 2 GB of memory is enough unless you expect heavy traffic, and that 1 GB can work but may cause trouble during upgrades. Here is what we measured on our test VPS, with 2 vCPU and 4 GB:
SALTCORN_NWORKERS=2, in the file below, keeps one worker per vCPU.Server size therefore depends on the number of users, the applications you build and the other services you run beside Saltcorn. On a managed VPS, tell us about your usage and we will recommend the right size.
You need Docker Engine and its Compose plugin. On Ubuntu, install them from Docker’s repository, as root:
apt-get update -qq && apt-get install -y -qq ca-certificates curl >/dev/null && install -m 0755 -d /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc && chmod a+r /etc/apt/keyrings/docker.asc && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo $VERSION_CODENAME) stable" > /etc/apt/sources.list.d/docker.list && apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin >/dev/null && docker --version && docker compose version
Saltcorn publishes the image saltcorn/saltcorn on Docker Hub, built from a Dockerfile.release that installs the command-line package @saltcorn/cli from npm. At tag v1.6.4, that file still installs version 1.6.2. On 20 November 2026, the 1.6.4 and latest tags, which share the same image, therefore answered @saltcorn/cli/1.6.2, without the security fixes of 1.6.3 and 1.6.4, among them an SQL injection and a flaw in the password reset route. You can check the image you are about to use:
docker run --rm saltcorn/saltcorn:latest --version
Until the image matches its tag again, these two lines install 1.6.4 on top of it, the way the official Dockerfile does. Create a folder such as /opt/saltcorn and put this Dockerfile in it:
FROM saltcorn/saltcorn:1.6.4
RUN npm install -g @saltcorn/cli@1.6.4 --omit=dev
Next to it, this compose.yaml, based on the example of the Saltcorn repository and on its wiki page about Docker:
services:
saltcorn-db:
image: postgres:17-alpine
restart: unless-stopped
environment:
- POSTGRES_DB=saltcorn
- POSTGRES_USER=saltcorn
- POSTGRES_PASSWORD=${PGPASSWORD:?set PGPASSWORD in .env}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U saltcorn -d saltcorn"]
interval: 5s
timeout: 5s
retries: 10
saltcorn:
build:
context: .
network: host
image: saltcorn-local:1.6.4
command: serve
restart: unless-stopped
ports:
- "127.0.0.1:8117:3000"
environment:
- PGHOST=saltcorn-db
- PGUSER=saltcorn
- PGDATABASE=saltcorn
- PGPASSWORD=${PGPASSWORD}
- SALTCORN_SESSION_SECRET=${SALTCORN_SESSION_SECRET:?set SALTCORN_SESSION_SECRET in .env}
- SALTCORN_FILE_STORE=/files
- SALTCORN_NWORKERS=2
volumes:
- saltcorn_files:/files
depends_on:
saltcorn-db:
condition: service_healthy
volumes:
postgres_data:
saltcorn_files:
The two secrets go in a .env file, which Docker Compose reads on its own. Create it readable by root only, build the image, create the Saltcorn tables in the empty database, then start the stack:
umask 077
printf 'PGPASSWORD=%s\nSALTCORN_SESSION_SECRET=%s\n' "$(openssl rand -hex 24)" "$(openssl rand -hex 32)" > .env
umask 022
docker compose build --pull
docker compose run --rm saltcorn add-schema -f
docker compose up -d
docker compose ps
127.0.0.1: the example of the repository publishes it on every address of the server. Here it is reachable only through the reverse proxy, on local port 8117, which you can change if it is taken..env file too; here a dedicated saltcorn user gets a random password, in hexadecimal so that nothing needs escaping.SALTCORN_SESSION_SECRET signs the session cookies. The wiki asks you to set it, since the default is not safe. Keep it secret and stable: a new one signs everyone out.SALTCORN_FILE_STORE is where uploaded files go, here the saltcorn_files volume. The database and this volume hold all your data.network: host for the build only: on our test VPS, without it, npm install hung, because the build container was given public IPv6 DNS servers it could not reach. On the host network, the build uses the server’s own resolver. The running containers keep their usual network.add-schema -f creates the Saltcorn tables in the new, empty database; run it once. The wiki uses reset-schema for this, which also erases an existing database: never run that one on an instance in use.postgres_data keeps the database across updates.On our test VPS, the build took about two minutes and the application answered a few seconds after up. To check that it responds:
curl -s -o /dev/null -w "%{http_code} %{redirect_url}\n" http://127.0.0.1:8117/
A new instance answers 302 with a redirect to /auth/create_first_user: Saltcorn is waiting for its first account.
The container serves Saltcorn over HTTP. HTTPS is handled by a reverse proxy in front of it. We tested Caddy, installed from its official repository for Debian and Ubuntu: it obtains the Let’s Encrypt certificate itself and renews it.
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq debian-keyring debian-archive-keyring apt-transport-https gnupg >/dev/null && curl -1sLf https://dl.cloudsmith.io/public/caddy/stable/gpg.key | gpg --dearmor --yes -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg && curl -1sLf https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt > /etc/apt/sources.list.d/caddy-stable.list && chmod o+r /usr/share/keyrings/caddy-stable-archive-keyring.gpg /etc/apt/sources.list.d/caddy-stable.list && apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq caddy >/dev/null && caddy version && systemctl is-active caddy
saltcorn.example.com {
reverse_proxy 127.0.0.1:8117
}
sudo systemctl reload caddy
curl -sI https://saltcorn.example.com/
Then tell Saltcorn its public address, which it uses in the links it generates and in its emails, and to mark its session cookie Secure. Behind a proxy, the container only sees HTTP, so this option is off by default:
docker compose exec saltcorn saltcorn set-cfg base_url https://saltcorn.example.com/
docker compose exec saltcorn saltcorn set-cfg force_secure_cookies true
docker compose restart saltcorn
curl -sI answered HTTP/2 302 toward the first account page.connect.sid cookie carried HttpOnly; Secure, where it had HttpOnly only before.Saltcorn has no default account. The first one you create gets the admin role:
The same page offers to restore a Saltcorn backup instead, to bring back an application exported from another instance.
To check the whole chain, we created a table from a CSV file with a header line and one row: under “Tables”, “Create from CSV upload”, a name and the file. Saltcorn answered “Created table plants. Imported 1 rows into table plants”, with a field for each column and their types guessed, and the row was then served, after sign-in, by its REST API at /api/plants/. A text file uploaded to the file manager landed in the saltcorn_files volume.
Your data lives in two places: the PostgreSQL database, in the postgres_data volume, and the uploaded files, in saltcorn_files. Keep your .env file too. The PostgreSQL image includes pg_dump. The backup holds every account and every row, so create it readable by root only, with umask 077 inside parentheses: the rest of your session keeps its usual mask. A file that already exists keeps its permissions when it is overwritten, so the find line first closes the backups already in the folder, before anything is written, and stops if it cannot:
(
umask 077
find . -maxdepth 1 \( -name 'saltcorn-*.dump' -o -name 'files-*.tar.gz' -o -name 'env-*.bak' \) -exec chmod 600 {} + || exit 1
docker compose exec -T saltcorn-db pg_dump -U saltcorn -Fc saltcorn > saltcorn-$(date +%F).dump
docker compose exec -T saltcorn tar -czf - -C /files . > files-$(date +%F).tar.gz
cp .env env-$(date +%F).bak
)
Schedule this copy and send it off the server. Stored on the disk, these files are also included in the server’s nightly backups.
On the same or a new installation, with the same .env: stop the application, replace the database with an empty one, load the dump into it, empty the files volume and unpack the archive into it, then start the application again:
BACKUP_DATE=2026-11-20
(
set -e
for f in saltcorn-$BACKUP_DATE.dump files-$BACKUP_DATE.tar.gz; do
test -s "$f" || { echo "Missing or empty: $f"; exit 1; }
done
docker compose stop saltcorn
docker compose exec -T saltcorn-db dropdb -U saltcorn saltcorn
docker compose exec -T saltcorn-db createdb -U saltcorn saltcorn
docker compose exec -T saltcorn-db pg_restore -U saltcorn -d saltcorn --exit-on-error --no-owner < saltcorn-$BACKUP_DATE.dump
docker compose run --rm -T --no-deps --entrypoint sh saltcorn -c 'find /files -mindepth 1 -delete && tar -xzf - -C /files' < files-$BACKUP_DATE.tar.gz
docker compose start saltcorn
)
Set BACKUP_DATE, on the first line, to the date in the names of the backup you restore, as listed by ls. The commands run in parentheses with set -e, which stops them at the first error. They first check that each file exists and is not empty, before anything is stopped, removed or overwritten: a wrong date stops there, with your data untouched, and a failed step stops every step after it, so the application is never started again on a partial restore.
dropdb and createdb, pg_restore failed on “relation _sc_api_tokens already exists” and Saltcorn stayed stopped.--exit-on-error stops the restore at the first error, instead of carrying on and reporting the errors at the end, and the && stop the sequence there. What was loaded before the error remains in the database, so start again from dropdb once the cause is fixed.We tested the whole cycle on our VPS with these exact commands: backup, then the row and the file deleted, then the database dropped and created again empty, the files volume emptied, and the restore. The administrator signed in again, the row came back through the API, and the file through the file manager.
Saltcorn releases a new minor version every few months, with fixes in between; the CHANGELOG lists what changes, security fixes included. The image sets SALTCORN_DISABLE_UPGRADE, which turns off upgrading from the administration: you update by changing the image. Take a backup, put the new version in the two lines of the Dockerfile and in the image line of compose.yaml, then rebuild and recreate the container. The database migrations run on their own at startup:
docker compose build --pull
docker compose up -d
docker compose exec saltcorn saltcorn --version
@saltcorn/cli/1.6.4 with its administrator, its table, its row and its file, and no new migration to apply between these two versions.docker run --rm saltcorn/saltcorn:latest --version tells you, you can drop the Dockerfile and the build block and write image: saltcorn/saltcorn: followed by the version, then run docker compose pull and docker compose up -d.next and dev tags follow the beta versions and the main branch: stay on stable releases on an instance in use.Self-hosting means running the server on top of the application. On a managed VPS, our teams take charge of the server and proactively monitor your instance; Saltcorn remains your software, with your applications and your data.
| Topic | Our teams | You |
|---|---|---|
| The server | System and security updates, server interventions included | The timing that suits you |
| Monitoring | Server monitored 24/7, with intervention without waiting for your call | Your tables, views, pages and triggers in Saltcorn |
| Saltcorn | Proactive monitoring: errors, slowdowns, database and disk space spotted, fix recommended | Its installation, updates, modules and settings, which you apply, yourself or through your AI assistant |
| Users | The server that carries them, monitored and backed up | Accounts, roles and the permissions of each table |
| Backups | Every night, encrypted and kept off the machine; restores included | Saltcorn’s own database dumps and file archives, and the restore request, when you need one |
| Migration | Your current server migrated, free of charge | The timing of the switch |
If you would rather have our teams work inside the application itself, that service is billed by the hour or at a fixed rate, with an estimate shared before the work starts.
With a Simafri Managed VPS, our teams keep your Saltcorn instance’s server up to date, monitor it day and night and step in without waiting for your call; they also proactively monitor your instance and recommend useful fixes, which you apply, yourself or through your AI assistant. Backups are encrypted every night and kept off the machine, restores are included, and migrating your current server is free.
Yes. Saltcorn is under the MIT license: you can run it for your company, your association or your clients with no license to buy. Modules from the store have their own licenses. What remains is the cost of the server that runs it.
Use PostgreSQL 17 and the Saltcorn image in a compose.yaml, put the database password and SALTCORN_SESSION_SECRET in a .env file, publish port 3000 on 127.0.0.1, run docker compose run --rm saltcorn add-schema -f once to create the tables, then docker compose up -d, and put an HTTPS reverse proxy in front.
Not on 20 November 2026: the 1.6.4 and latest tags contained @saltcorn/cli 1.6.2, because the Dockerfile used to build them still installs 1.6.2. Check with docker run --rm saltcorn/saltcorn:latest --version. This guide adds a two-line Dockerfile that installs 1.6.4 on top of the official image.
There is none. On a new instance, Saltcorn opens “Create first user”: the account you create there becomes the administrator. You then add the other users and their roles from the settings.
Its README recommends a server with 2 GB. On our test VPS, Saltcorn used about 420 MB with two workers and PostgreSQL 35 to 80 MB; set SALTCORN_NWORKERS to your number of vCPUs, since Saltcorn may detect more cores than your server has.
Dump the database with docker compose exec -T saltcorn-db pg_dump -U saltcorn -Fc saltcorn and archive the files volume with tar, under umask 077, and keep a copy of your .env file. To restore, stop the application, recreate the database empty with dropdb and createdb, load the dump with pg_restore --exit-on-error --no-owner, then unpack the files.
Take a backup, change the version in the Dockerfile and compose.yaml, then run docker compose build --pull and docker compose up -d. The database migrations run on their own at startup; saltcorn --version in the container confirms the version.
A managed VPS covers the server: system, security, monitoring and backups. Our teams also proactively monitor your instance and recommend useful fixes, which you apply. Work inside the application is billed by the hour or at a fixed rate.
Simafri
Let's talk about your project
Tell us what you need in a few words: we will get back to you quickly.
Thank you! Your request has been sent. We'll get back to you shortly.
Prefer email? Write to us at support@simafri.com.