Project OWNOpen Web Node
GitHub

02Hosting

Sites

In Project OWN (Open Web Node), a site is a domain such as shop.example.com, with its own folder, its own Linux user and its own settings. This page covers PHP and static sites, forwards to your own programs, domains and certificates, PHP versions, databases, SFTP, logs and Optimize.

What each site gets

  • Its own Linux user and folder, /srv/own/sites/DOMAIN. The web serves what's in its public folder.
  • Its own PHP version, which runs as that user, can only reach the site's folder, and has its own temporary folder.
  • A database if you want one, with its own database user.
  • HTTPS from the start, with a temporary certificate, then a free one from Let's Encrypt that renews by itself.
  • Backups every day, keeping the last 14.

There are several kinds of site. You choose when you add one:

KindFor
PHP siteWordPress, Laravel, or any PHP app.
Static sitePlain HTML, or a built React, Vue or Astro site. No PHP.
Node.js app, Python app, Ruby app, Bun app, Deno app, Go app, Java app, Any commandYour own code, which Project OWN runs and keeps running. See Apps.
An app you run yourselfAnything that already listens on a port on this server. See Forward to your own program.
Load balancerShare visitors between several servers. See Load balancers.

Add a site

  1. Open Sites and click Add a site (the Dashboard has the same button).
  2. Which domain? Type the domain, such as shop.example.com. Tick Also answer on the www. version to answer on www.shop.example.com too. You can add the site now and point the domain at the server later. Click Continue.
  3. What kind of site? Pick one, such as PHP site.
  4. PHP and database. Choose the PHP version (the newest is usually best), and tick Create a database for this site if it needs one: WordPress and Laravel do. A version marked "(not installed)" needs installing from Packages first.
  5. Ready to add. Check the summary and click Add the site.
  6. The site is ready. If you asked for a database, its details are shown: the database, user, password and host. Save them now: the password isn't shown again. Then click Open the site.

Next, put your files in its public folder, over SFTP or from Git, or install an app such as WordPress into it. Then point the domain at the server.

Forward to your own program

Choose An app you run yourself when a program is already running on the server and you only want a site in front of it, with HTTPS.

  1. Run your program so it listens on 127.0.0.1 and a port between 1024 and 65535.
  2. Add a site, choose An app you run yourself, and enter that port under Which port?
  3. The site forwards visitors to it, with HTTPS in front and WebSockets passed through.

Ports 20000 to 39999 are kept for the app catalogue and for app sites, so pick one outside that range. If you'd rather Project OWN start your program and restart it when it stops, add an app site instead.

Point the domain at the server

Visitors find your site through DNS. At the company that runs your domain's DNS (often where you bought it), add an A record:

TypeNameValue
AThe domain, such as shop.example.comYour server's public IP address

If you ticked the www. version, add the same record for www.shop.example.com too. Changes can take a while to reach everyone.

Doctor keeps track. Until the domain points here, it says "DOMAIN doesn't point at this server yet". If it points somewhere else, it says so; that's fine when you use a proxy or a tunnel, or your router forwards to this server.

HTTPS certificates

A new site answers on HTTPS straight away, with a temporary certificate made on the server. Its page shows Temporary: browsers warn visitors until a free certificate replaces it.

  1. Point the domain at the server, as above. Let's Encrypt checks the domain over port 80, so it must point here first, and port 80 must be open (also in your cloud provider's firewall).
  2. Once it does, Doctor says "DOMAIN is ready for a free certificate".
  3. Open the site and click Get a free certificate.

The site's page then shows Valid, with the date, and "renews by itself". If it didn't work, the page shows Last try: with the reason. See The certificate wasn't issued.

Sites you serve through a Cloudflare Tunnel don't need one: Cloudflare gives visitors a certificate.

PHP versions

PHP 8.1, 8.2, 8.3, 8.4 and 8.5 can be installed side by side, and each site picks its own. The starting sets install PHP 8.4; add the others from Packages.

To change a site's version, open the site, choose the version in the PHP version card and click Switch. The site switches in place, from its next visit.

Each site's PHP starts when a visitor arrives (about 60 MB while busy) and stops when idle. Every PHP site also gets, without asking:

  • OPcache in every PHP version (compiled code kept in memory), tuned for sites: changed files are noticed within 2 seconds.
  • Uploads up to 64 MB. PHP's own limit is 2 MB, smaller than a phone photo. Apps can still change it.
  • Old sessions cleaned up, which PHP as packaged never does.
  • Browsers keep scripts and fonts for a week, as they already do images and stylesheets.

PHP's errors are in the site's logs.

The web server

OpenLiteSpeed serves your sites unless you choose Nginx or Apache. The owner chooses on the Packages page, under Web server, or when installing, with --web=nginx or --web=apache.

Web serverGood to know
OpenLiteSpeed (the default)Reads .htaccess files, and has LiteSpeed Cache, the page cache Optimize turns on for WordPress.
NginxFast and light. It doesn't read .htaccess: WordPress and Laravel links still work, but other rules people add there don't. No LiteSpeed Cache.
ApacheReads .htaccess like most shared hosting, so apps that come with one work as they are. Uses a little more memory. No LiteSpeed Cache.

Whichever you choose, each PHP site runs as its own user (with Nginx and Apache, through a PHP-FPM pool of its own, from Ondřej Surý's PHP packages), hidden files such as .env are never served, certificate checks work, and each site keeps its own log.

Switching moves every site at once. Project OWN installs the new web server and the PHP your sites use, stops the old one, applies every site to the new one and starts it; sites are unreachable for a few seconds. If anything fails, the old web server comes back as it was. The old one stays installed, so switching back is quick.

Not on Ubuntu 26.04 yet: Ondřej Surý's packages are signed with a key Ubuntu 26.04 no longer accepts. OpenLiteSpeed works there as usual.

Databases

Each database is MariaDB or PostgreSQL, your choice, and only answers inside the server. Each one has its own user, which can reach only that database, only from the server itself.

EngineForIn your app's settings
MariaDB (the default)WordPress (it needs it), Laravel and most PHP appsHost localhost, port 3306
PostgreSQLRails, Django and apps that prefer it; Laravel works with eitherHost 127.0.0.1, port 5432

Make one with the site (tick Create a database for this site and pick its engine), or later:

  1. Open Databases and click Create a database.
  2. Enter a Name: lower-case letters, digits and underscores. A user with the same name is made for it.
  3. Pick its Engine. PostgreSQL is installed the first time a database needs it.
  4. Under Belongs to, pick its site (or leave it not tied to a site) and click Create.
  5. Save the details shown: the password isn't shown again. They include DATABASE_URL, the same details in one line, which Rails, Django, Prisma and most frameworks read.

PostgreSQL is set up for the server's memory, listens inside the server only, and asks for a password even from inside the server (Debian's own setting lets a Linux user in as the database user of the same name). Each database's user owns it and its tables, can't make other users or databases, and no other database user can connect to it.

  • New password makes a new one. The old one stops working at once, so put the new one in your app's settings straight after (wp-config.php for WordPress).
  • Download .sql saves a copy of it (a dump) to your computer.
  • Load a dump… replaces a site's database with a .sql file you pick, up to 4 GB. The server keeps the database as it was first (the last three, in /var/backups/own/db-before-import), and puts it back if the dump doesn't load. The dump is loaded as the site's own user, through an account that can reach only that database, so a dump can't touch anything else on the server. A PostgreSQL dump loads when it's plain SQL made with pg_dump --no-owner --no-privileges, as Download .sql makes, from PostgreSQL 17 too on an older server.
  • Delete deletes the database and all its data at once. Back up its site first if you might need it.

For caching, the Valkey cache package (or Redis, on systems that don't package Valkey yet) speeds up WordPress and Laravel. It also answers only inside the server.

Upload files with SFTP

SFTP lets you upload and edit a site's files with an app such as FileZilla, WinSCP or Cyberduck.

  1. Open the site and find Upload files (SFTP). Click Turn on SFTP.
  2. The SFTP sign-in appears: host, port, username and password. Save the password now: it isn't shown again.
  3. In your SFTP app, connect with those details. You land in the site's folder: put the site's files in public.
  • If the domain doesn't point at the server yet, use the server's IP address as the host.
  • To sign in with an SSH key instead of a password, open Sign in with an SSH key instead, paste the contents of your .pub file and click Add key. Keys are safer than passwords.
  • New password makes a new one (the old one stops working at once). Turn off stops SFTP for the site and removes its keys.

It's files only: no shell, no port forwarding, no tunnels. Each sign-in reaches only that site's folder. SFTP uses the server's SSH server; if there isn't one, the panel says so.

Forwards, apps from the catalogue and load balancers have no files of their own here, so they don't have the SFTP, Git or Backups cards.

Site logs

When a site shows an error page, look here first. Open the site and expand Logs, then choose:

LogWhat's in it
ErrorsThe web server's errors for this site
PHP errorsPHP's errors and warnings (PHP sites)
App outputWhat the app prints (app sites)
VisitsEach request: who, when, what, and the answer

It shows the last 200 lines, newest at the bottom. Click Refresh for the latest. Logs need manage access to the site.

PHP's errors go to the system journal, which records the Linux user that sent each line, so each site sees only its own. An AI assistant can read these logs too, and explain what went wrong.

Optimize

Each PHP site has an Optimize card with tune-ups for the app it runs. Each one says what it does and what it costs (Trade-off:), and each one turns off again from the same card.

  • Switches show On or Off; click to change.
  • One-off jobs have a Run button, and ask first when there's a trade-off.
  • Apply recommended turns on everything recommended in one go. When it's all on, the card says Recommended all on. One-click installs start with it already on.
AppTune-ups
WordPressA page cache (the official LiteSpeed Cache plugin, checked against WordPress.org's checksums, with its page "optimizations" left off); background jobs on a timer instead of during visits; no code editing in wp-admin; 10 revisions per post; no pingbacks; XML-RPC closed at the web server if you want (Jetpack and old publishing apps need it); clearing expired temporary data; emptying spam, trash and old revisions (after a backup); and how much is loaded on every page.
NextcloudBackground jobs on a timer, 512 MB for PHP, missing database indices added.
MatomoReports built every hour on a timer, not when you open a dashboard.
MediaWikiIts job queue on a timer, not during page views.
Any PHP siteKeep PHP ready between visits (10 minutes instead of 1), for faster first visits at the cost of memory.

Background jobs run from a timer as the site's own user, in the same sandbox as app sites. Timers follow their site into the bin and back, and come back from a recovery kit.

The server gets tuned too: MariaDB writes down queries slower than 2 seconds (in /var/log/mysql/mariadb-slow.log) and, on servers with 2 GB or less, uses smaller caches for the kinds of table sites rarely use. Valkey gets a memory cap sized to the server.

Left out on purpose: scheduled OPTIMIZE TABLE (it rebuilds tables for little gain), MariaDB's query cache (slower under load), PHP's JIT (it doesn't speed up web apps), turning off WordPress's REST API or Heartbeat (they break the editor), and minifying CSS or JavaScript by default (it breaks layouts).

Scheduled tasks

A site can run its own commands on a schedule (cron jobs): Laravel's scheduler, a script that sends a report, a cleanup. Open the site, find Scheduled tasks and click Add a task: the command (one line) and when, every minute, every 5, 15 or 30 minutes, every hour, every day or every Monday at a time you pick (the server's time).

  • A task runs as the site's own user, in its public folder, with its PHP version (or its app's runtime and settings) on hand, in the same sandbox as its app: it can't write outside the site's folder. For a Laravel app deployed from Git, its scheduler is php ../artisan schedule:run, every minute (the Laravel's scheduler button fills it in).
  • Each task shows when it last ran, whether that went well (or its exit code), when it runs next, and its last output. Run now runs it at once; Turn off keeps it without running it.
  • A run that's still going isn't started again, and one is stopped after 55 minutes.
  • Tasks go with the site: into the bin and back, and away when it's deleted. Only their schedules go in the activity log, as a command can hold a secret.
  • WordPress, Nextcloud, Matomo and MediaWiki's own background jobs are on the site's Optimize card instead.

Limits

A site can be given a share of the server, so one busy or hacked site can't slow down the others. Open the site and find Limits (owners and admins set them; others see them):

  • CPU: 100% is one core, 50% half of one, 200% two. Over its share, the site slows down instead of slowing the rest.
  • Memory: the most it may use. It's held back from 90%, and past the limit the kernel stops one of the site's own processes (that visit fails), never another site's. A limited site can't spill into swap either.
  • Processes: how many processes and threads it may run at once, so a runaway script can't start thousands.
  • PHP requests at once (PHP sites): 10 unless you change it. More wait their turn. Each can use up to PHP's memory limit (on Optimize), so lower this to fit a small memory limit.

The limits count everything the site runs, together: its PHP, its app or worker, its background jobs and scheduled tasks, and its SFTP sessions. They all run as the site's own Linux user, in that user's systemd slice, where the limits apply; OpenLiteSpeed starts each site's PHP there.

Apps from the catalogue have limits too, on their site's page: CPU, memory and processes, for all the app's containers together (its database too). Docker starts them in the site's slice, so one hungry app can't starve the sites and apps around it. Apps installed before Project OWN 0.30.0 move there, with one restart, when their limits are first saved (or at their next update).

The card also shows what the site uses: CPU over the last minute, the busiest minute in the last hour, memory now and the most in the last hour. Doctor lists What each site uses, busiest first, to find the one slowing the server, and warns when a site went over its memory limit or its CPU limit held it back most of the last quarter hour (sent as alerts too, if you've asked for warnings).

  • With Nginx or Apache, PHP runs in PHP-FPM, outside the site's slice: PHP requests at once still apply, but PHP isn't counted or held to the CPU and memory limits. The site's app, tasks and SFTP sessions are.
  • Limits need cgroups v2 under systemd, which every supported system has. Some containers (LXC, OpenVZ) don't give it; the card says so.
  • Setting a limit restarts the site's PHP and its app once, so they start inside the slice.

Staging copies

A staging copy is a copy of a site at another domain, such as staging.example.com, with its own copy of the site's databases. Try a WordPress update, a new plugin or a change there; visitors keep seeing the live site. When it's right, push it back.

  1. Open the site and find Staging copy. Check its domain (staging. and the site's, unless you change it) and click Make a staging copy.
  2. Point that domain at the server too, then open it. Give it a certificate as for any site.
  3. Make your changes on the copy.
  4. On the copy's page, under Staging copy, choose Its files, Its databases or both, and click Push to the live site.
  • What the copy gets: the site's files (all but its logs, temporary files and keys), a copy of each of its databases on the same engine, its PHP version or app settings, and its Git settings (deployed only by hand, so you can pick another branch). Its .env or wp-config.php points at the copy's databases and address; the database passwords stay the same. Backups of the copy are off: the live site keeps its own.
  • WordPress: the copy's address is changed inside its database too (with WP-CLI, which knows WordPress's stored settings), and the copy asks search engines not to index it. A push changes the address back, and the live site keeps its own search engine setting.
  • A push replaces the live site's files, databases or both with the copy's: anything changed on the live site since the copy was made (new orders, comments, uploads) is replaced too. A safety snapshot of the live site is taken first, in its Backups, and if the push fails halfway the site is put back from it by itself. Pushing needs Backups (restic).
  • Safe between sites: the files are read as the live site's own user and written as the copy's (and the other way on a push), so neither can reach anything of the other's or the server's through the copy. Each site keeps its own SFTP and deploy keys.
  • PHP, static and app sites can have a copy. A forward to an app you run yourself, a load balancer, a worker and the catalogue's apps can't.

Preview address

Before a domain points at the server (moving a site in, or waiting for DNS), try the site at a preview address. Open the site, find Preview address and click Make a preview address: the site then also answers at an address such as http://SITEID.203-0-113-9.sslip.io.

  • It uses sslip.io, a free public DNS service whose names lead to the address written in them: this server's public address. To keep that in your own hands, point a wildcard record such as *.preview.example.com at the server and enter preview.example.com under Use your own wildcard domain (owners and admins): every site's preview address moves under it.
  • Preview addresses use plain HTTP and get no certificate. Turn one off when you're done.
  • Some apps, WordPress among them, send visitors on to the address they know (the domain), so they show fully only once the domain points here.
  • A server at home needs its router to forward port 80 for a preview address to work from outside. Share links work without that.

Show a site to someone

A share link gives a site a temporary public address, with a QR code for phones, even if the server is at home behind a router. It needs no account.

  1. Install Cloudflare Tunnel on the Remote access page, if it isn't there yet.
  2. Open the site and click Make a share link in the Share link card.
  3. Send the link. Anyone with it can open the site until you click Stop sharing, or for 24 hours.

Apps that send visitors to their own address, such as WordPress, may jump to the real domain instead.

Delete a site, and the bin

  • Open the site and click Move to bin under Delete this site. It stops answering at once, and its files and databases are kept in the bin for 7 days.
  • To bring it back, open Sites, click Bin, and click Restore.
  • Delete for good removes its files, databases and backup schedule now. This can't be undone.

A site that belongs to an app from the catalogue goes when you remove the app, on the Apps page.

Who can change a site

Owners and admins can change every site. Members get a level for each site they're given: Manage (all settings), Deploy (files, backups and restarts) or View (status only). Each site's page shows your access at the top. See People and roles.

Something wrong or unclear on this page? Open an issue on GitHub.