Self Hosting
Self-hosting Voyzu is currently untested. Treat this guide and the deployment command as a best-effort starting point, validate the installation in a non-production environment, and raise a GitHub issue if you encounter problems.
This guide deploys Voyzu from scratch to a single Linux server. It uses:
PostgreSQL for the database
systemd to run Voyzu
Nginx as the public reverse proxy
Certbot for HTTPS certificates
The commands below target a current Ubuntu or Debian server. The same layout works on other systemd-based distributions, but package installation commands will differ.
1. Prepare a server and domain
Create a server with a stable public IP address and enough memory and disk for Node.js, a production build, PostgreSQL, and database backups.
At the network firewall, allow inbound traffic on:
22/tcpfor SSH, or your chosen SSH port80/tcpfor HTTP and the initial certificate challenge443/tcpfor HTTPS
Do not expose the Voyzu application port (3000) or PostgreSQL (5432) to the internet.
Create an A record for the Voyzu hostname that points to the server. Add an AAAA record only when the server has working public IPv6. The examples below use voyzu.example.com; replace it with your hostname.
Confirm DNS before requesting a certificate:
2. Create the deployment user
Connect using the initial account supplied with the server. Create a dedicated account and copy the current account's authorized SSH keys:
The deployment script installs the environment file and systemd service, so this account requires non-interactive sudo:
Protect this account's SSH key as a privileged deployment credential. Test a new connection before closing the original session:
3. Install server software
On the server, install the base packages, PostgreSQL, Nginx, and Snap support for Certbot:
Voyzu requires Node.js 20.9 or newer and is currently developed against Node.js 24. Install Node.js system-wide so it is available to non-interactive SSH and systemd sessions. For example, using the NodeSource Debian/Ubuntu packages:
Verify the installed tools:
If the server uses UFW, allow SSH before enabling it:
For a non-standard SSH port, allow that port explicitly instead of relying on the OpenSSH profile.
4. Create the PostgreSQL database
Keep PostgreSQL bound to the local server. Generate a strong password; hexadecimal output is convenient because it does not need URL encoding in the connection string:
In psql, create the application role and database, replacing the example password:
Test password authentication locally:
5. Create the production environment file
On the computer from which deployments will run, create a file outside the repository, for example voyzu.production.env:
When this environment is not based on a create-voyzu installation, generate the authentication secret with:
Voyzu has no default authentication secret and rejects missing values or values that decode to fewer than 32 bytes. The file must use shell-compatible KEY=VALUE syntax. Keep it out of Git and restrict local access to it. Add optional capability configuration to the same file when required.
6. Deploy Voyzu
Run deployments from a local Voyzu repository. If you do not already have one:
The deployment script creates a production Voyzu installation using create-voyzu. The platform is downloaded from the main branch of https://github.com/chrisjameslennon/voyzu.git.
First inspect the plan without connecting:
Then deploy:
On Windows PowerShell, enter the command on one line or use PowerShell backticks instead of backslashes.
The script:
Uploads the environment to
/etc/voyzu/voyzu.envwith restricted permissions.Stops an existing Voyzu service before changing its runtime.
Creates
/home/voyzu/voyzuas a production installation on the first run, or fast-forwards its platform checkout on later runs.Checks the configured database and applies the preinstalled platform installation when it has not yet been initialized.
Installs or updates
@voyzu/core, including its database installation and composed application registrations.Builds the composed web application and prunes development dependencies.
Installs and enables
voyzu.serviceunder systemd.Starts Voyzu on
127.0.0.1:3000and performs a local health check.
The deployed directory is an installation root. Its platform checkout is at /home/voyzu/voyzu/.run/voyzu, and installed packages are beneath /home/voyzu/voyzu/.run/packages.
The platform checkout must be clean apart from composition output managed by Voyzu. Use --help to see options for an SSH key, SSH port, service name, deployment directory, or application port:
Voyzu uses Puppeteer for PDF generation. Dependency installation downloads the browser as the deployment user. On a new Debian or Ubuntu server, also install the browser's operating-system dependencies. Keep Puppeteer's cache under the service user's home directory:
This is a host setup step and does not need to run with every deployment.
7. Verify initialization
The deployment command initializes the preinstalled platform packages and installs Core before starting the service. For a new empty database it also creates the bootstrap administrator:
Confirm the generated installation, Core package, database connection, and service:
Sign in through the HTTPS endpoint after completing the proxy configuration. Create a named administrator with a strong unique password, verify that account can sign in, and delete the bootstrap ADMIN user before allowing normal access.
8. Configure Nginx
The repository includes an example site at infra/deploy/nginx.conf.example. Copy it to the server:
Replace voyzu.example.com if necessary. If the deployment used a different application port, update the proxy_pass port as well.
Enable the site and remove the default site:
Nginx is the only public application endpoint. It forwards the original host, scheme, and client address to Voyzu and disables response buffering so Next.js streaming responses are not held by the proxy.
9. Enable HTTPS with Certbot
The hostname must resolve publicly to this server and port 80 must be reachable before this step. Install Certbot using its recommended Snap package:
Request the certificate and allow Certbot to update the Nginx site:
Choose the HTTP-to-HTTPS redirect when prompted. Confirm renewal works:
Finally, browse to https://voyzu.example.com, sign in, and replace or disable all seeded credentials.
10. Operate and update Voyzu
Inspect the application and proxy:
For later releases, rerun the deployment command. It fast-forwards the platform, updates Core from the Voyzu Packages repository, rebuilds the composed application, and restarts the service. Omit --env-file to retain the existing remote environment file:
Back up PostgreSQL before deploying changes that affect the database:
Store backups outside the server and test the restore process. Also keep the operating system, Node.js, PostgreSQL, Nginx, and Certbot patched.
References
Last updated