Self-host & build › Self-hosting › Install on your own server
Install on your own server
Run Looona on a Linux server, as a service, behind HTTPS. What it needs to work, then what's recommended.
Looona is one file. You download it, start it, and it keeps its data in its folder.
This guide sets it up on a Debian or Ubuntu server, for your team and the people who answer your forms. If you signed up on looona.com, there's nothing to install. To try Looona on your computer first, see On a Mac or Windows. All the files are in Download Looona.
The guide has two parts: what Looona needs to work, then what's recommended to keep it safe.
What you need
- A Linux server you can reach with SSH, as a user who can run
sudo. - A domain name pointing at that server, e.g.
feedback.example.com. HTTPS needs it.
The guide edits files with nano, a simple editor in the terminal. In nano, you save with Ctrl+O then Enter, and you quit with Ctrl+X.
What it needs to work
Five steps: download Looona, run it as a service, put it behind HTTPS, tell Looona about it, then sign in.
Download Looona
- Make its folder
Looona keeps its data in the folder it runs from.
Terminalsudo mkdir -p /opt/looona - Go into itTerminal
cd /opt/looona - Download Looona
On an ARM server, write
linux-arm64in place oflinux-x64. See Download Looona.Terminalsudo curl -L https://cdn.looona.fr/latest/looona-linux-x64.zip -o looona.zip - Unzip it
If
unzipis missing, install it first withsudo apt install unzip.Terminalsudo unzip looona.zip - Name it
looonaThe file inside the zip is named after the system it's for.
Terminalsudo mv looona-linux-x64 looona - Delete the zip
It's no longer needed.
Terminalsudo rm looona.zip - Let it run
This marks the file as a program.
Terminalsudo chmod +x looona
Run it as a service
A service starts Looona when the server boots, and again if it stops on an error.
- Give Looona its own user
A user for Looona alone, which can't sign in to the server.
Terminalsudo useradd -r -s /bin/false looona - Give it the folder
Looona only writes there.
Terminalsudo chown -R looona:looona /opt/looona - Create the service file
nanoopens an empty file.Terminalsudo nano /etc/systemd/system/looona.service - Paste this
It says who runs Looona, from which folder, and on which port (
3030). It restarts Looona 5 seconds after an error. The last lines keep Looona to its folder.File[Unit] Description=Looona After=network.target [Service] User=looona Group=looona WorkingDirectory=/opt/looona ExecStart=/opt/looona/looona serve -p 3030 Restart=on-failure RestartSec=5s NoNewPrivileges=true PrivateTmp=true ProtectSystem=strict ProtectHome=true ReadWritePaths=/opt/looona [Install] WantedBy=multi-user.target - Save and close
Press Ctrl+O, then Enter, then Ctrl+X.
- Load the new file
The system reads its service files again.
Terminalsudo systemctl daemon-reload - Start Looona
enablestarts it at every boot,--nowright away too.Terminalsudo systemctl enable --now looona - Check it runs
active (running)means it works. Press q to leave.Terminalsudo systemctl status looona
Put it behind HTTPS
Visitors reach Looona through a proxy: a program that handles HTTPS and passes each request on to Looona.
This guide uses Caddy as an example: it gets and renews the certificate on its own. Another proxy works too, like Nginx or Traefik. It must send requests to localhost:3030, keep the Host header, and set X-Forwarded-For. Its own documentation says how.
- Install Caddy
Follow its guide for Debian and Ubuntu.
- Open its settings
The file holds an example.
Terminalsudo nano /etc/caddy/Caddyfile - Delete the example
Hold Ctrl+K until the file is empty.
- Paste this
Write your domain in place of
feedback.example.com.Filefeedback.example.com { reverse_proxy localhost:3030 } - Save and close
Press Ctrl+O, then Enter, then Ctrl+X.
- Reload Caddy
It reads its settings again, and gets the certificate.
Terminalsudo systemctl reload caddy
Tell Looona about the proxy
Behind a proxy, every visitor seems to come from the proxy. Looona then counts the limits on responses for all of them together. This setting makes it count them per visitor.
- Open Looona's settings
The file already holds its secret keys: leave their lines as they are.
Terminalsudo nano /opt/looona/.env - Add this line at the endFile
LOOONA_TRUST_PROXY=true - Save and close
Press Ctrl+O, then Enter, then Ctrl+X.
- Restart Looona
It reads the file when it starts.
Terminalsudo systemctl restart looona
Sign in
Open your domain, e.g. https://feedback.example.com. You see Create your account: you become the workspace's admin. See Getting started.
Then, in Settings, check the Looona address: shared links use it. See Workspace settings.
Recommended
Looona works without these steps. They keep it safe, and your data too.
Close the other ports
Without a firewall, anyone can reach Looona directly on port 3030, without HTTPS. With LOOONA_TRUST_PROXY, they could also pretend to be any visitor, and get past the limits.
This example uses ufw, which comes with Ubuntu. On Debian, install it first with sudo apt install ufw. Your host's firewall works too: keep ports 22, 80 and 443 open, and nothing else.
- Keep SSH open
Do this first, or you lose your access to the server.
Terminalsudo ufw allow 22/tcp - Open HTTP
Caddy needs it to get the certificate, and to send visitors on to HTTPS.
Terminalsudo ufw allow 80/tcp - Open HTTPS
Visitors come in there.
Terminalsudo ufw allow 443/tcp - Turn the firewall on
Answer
y. Every other port is closed now, 3030 too.Terminalsudo ufw enable
Back up every night
Looona makes a backup when an admin asks in Settings. To make one every night too:
- Open Looona's schedule
The first time, the system asks for an editor: pick
nano.Terminalsudo crontab -u looona -e - Add this line at the end
It makes a backup every day at 2 AM.
File0 2 * * * cd /opt/looona && ./looona backup - Save and close
Press Ctrl+O, then Enter, then Ctrl+X.
The backups show in Settings, under Backups. They're kept on the same server: download one now and then. See Backups.
Update Looona
Back up, replace the file, and start Looona again. See Update Looona.
Where the data lives
Everything is in the folder Looona runs from, /opt/looona here:
database/database.sqlite: all the workspace's data, andlogs.txtbeside it.backups/: the backups..env: the server's secret keys, made at the first start, and your server settings.
To move Looona to another server, stop it and copy the whole folder.
Commands
A few commands help when nobody can sign in. Run them in Looona's folder, as Looona's user, e.g. cd /opt/looona && sudo -u looona ./looona create-user.
looona reset-password <email> --temporaryprints a password that works once, for 30 minutes. After signing in with it, you choose a new one.looona create-useradds an account, with a few questions.looona update-user-passwordsets a new password, with a few questions.
On a Mac or Windows, see Commands.
If something goes wrong
See what Looona says:
sudo journalctl -u looona -n 50 --no-pager
- It doesn't start. Another program may use port 3030. Pick another one with
-pin the service file, and in the Caddyfile. - Permission denied. The
looonauser must own the folder:sudo chown -R looona:looona /opt/looona. - The page doesn't open. Check that both run:
sudo systemctl status looona caddy. Then check that your domain points at the server. - Nobody can sign in. See Commands.
Warnings and errors also show in Looona, for admins. See Server logs.