Skip to content

Install Dew on a Linux server

Install Dew on a Linux server or virtual machine with one command. When you’re done, Dew is running on port 443 and you can open it in a browser to finish setup.

  • A Linux server or virtual machine, x64 or arm64.
  • Docker Engine with the Docker Compose plugin. Check with docker compose version.
  • Port 443 free on the server. Dew serves HTTPS on it.
  • If people outside your network will use Dew: your router or firewall forwards public port 443 to this server.

Open a terminal on the server and run this command:

mkdir dew && cd dew && curl -fsSLO https://getdew.io/downloads/compose.yaml && docker compose up -d

It creates a folder named dew, downloads Dew’s Compose file into it, and starts Dew. Docker downloads Dew the first time, which can take a minute.

Dew keeps everything it stores in the data folder inside dew. Run later docker compose commands from the dew folder. To keep uploaded files on another disk, follow Keep uploaded files on another disk instead of this step.

Run this command to show Dew’s log:

docker logs dew

Look for the line that starts with Setup code:, for example Setup code: ABCD-2345. Dew prints it each time it starts, until the admin account exists. It’s also saved in data/config/setup-code, which you can show with sudo cat data/config/setup-code.

Go to https://<server-address>, using the server’s IP address or hostname.

Your browser warns that the connection isn’t private. This is expected until you set up HTTPS for your domain; continue to the site. Dew opens on Enter your setup code.

Continue with Enter the setup code.

To update Dew to the newest version, run this command in the dew folder:

docker compose pull && docker compose up -d

Dew keeps its database, its settings and the files people upload in the data folder next to compose.yaml. Every night at 03:00 UTC, Dew saves a copy of its database in data/database-dumps and keeps the newest seven. That copy is on the same disk, so it isn’t a backup by itself. To back up Dew, stop it with docker compose stop, copy the whole data folder to another disk or location, then start it again with docker compose start. Some files in data can only be read by root, so copy it with sudo, for example sudo cp -r data /mnt/backup/dew-data.

What you see What to do
docker compose up -d fails with port is already allocated or address already in use Another program uses port 443. Stop it, or have Dew use another port: in compose.yaml, change "443:443" to "8443:443", add DEW_PUBLIC_HTTPS_PORT=8443 (the port people will use) under environment: (see Change a setting), run docker compose up -d, and open https://<server-address>:8443. Let’s Encrypt certificates need port 443, so you’ll need your own certificate.
docker: 'compose' is not a docker command Install the Docker Compose plugin, then run the command again.
permission denied while trying to connect to the Docker daemon socket Run the commands with sudo, or add your user to the docker group.
The browser can’t reach the server Check that Dew is running with docker ps, and that the server’s firewall allows port 443.
docker logs dew shows no setup code Dew may still be starting. Wait a moment and run docker logs dew again, or run sudo cat data/config/setup-code.
The browser opens a sign-in page instead of Enter your setup code The admin account already exists. Sign in with it.

Ports and proxy settings are set in compose.yaml, under environment: in the dew service. If the dew service has no environment: line, add one below the ports: lines, lined up with ports:. Otherwise add the new line under the existing one. For example:

    ports:
      - "443:443"
    environment:
      - DEW_TRUSTED_PROXIES=10.0.0.5
    volumes:
      - ./data:/app

Then run docker compose up -d in the dew folder. If Dew sits behind a reverse proxy, set DEW_TRUSTED_PROXIES before you enter the setup code; see Run Dew behind a reverse proxy.

Dew stores uploaded files in data/storage, next to its database. To keep them on another disk, set this up on a new install, before Dew starts for the first time:

  1. Create the folder and download the Compose file without starting Dew:

    mkdir dew && cd dew && curl -fsSLO https://getdew.io/downloads/compose.yaml
  2. In compose.yaml, add a line under volumes: that maps a folder on the other disk to /app/storage:

        volumes:
          - ./data:/app
          - /mnt/files/dew:/app/storage
  3. Start Dew:

    docker compose up -d

Then continue with 2. Get the setup code. Files already in data/storage aren’t used once this line is added, so don’t add it to a server that already has uploads.

To add another disk later instead, uncomment the /mnt/dew/other-disk line in compose.yaml, replace /path/to/other-disk with a folder on that disk, run docker compose up -d, and add the disk in Settings → Storage.