Skip to content

Set Up Anchor on a Linux Server – Your Own Notes App as an Alternative to Google Keep

Set up the Anchor notes app as a One-Click App or with Docker on your VPS, and use your notes in a browser and offline on Android and iPhone.

30 November 202611 min read2 Views0 helpful

Introduction

Anchor is a self-hosted notes app (open source, AGPL-3.0, project ZhFahim/anchor), similar to Google Keep. Write notes with headings, lists, and checklists, organize them with colored tags, attach images and voice recordings, and set reminders to be notified about a note on your smartphone. Anchor runs in your browser and as an app for Android and iPhone. The apps also work offline and sync your notes with your server as soon as a connection is available again. This software has nothing to do with the podcast service of the same name.

In this guide, we’ll show you two ways to set it up: the easy way, as a One-Click App, which runs Anchor with your own administrator account and HTTPS at your address, and a manual installation with Docker Compose. After that, you’ll connect the smartphone app, transfer notes from Google Keep, and add more users.

When it makes sense to run Anchor on a VPS

Anchor is a good choice if:

  • You don’t want your notes stored with a cloud provider. All notes, tags, and attachments stay in the database on your own server.
  • You use notes on your smartphone and computer. The app keeps a copy on your device, while the browser works directly with the server; both stay in sync.
  • You want to move away from Google Keep. Anchor imports Keep exports directly and works in a similar way: cards, colors, checklists, pinning, and archiving.
  • Several people need their own notes, such as a family or a small team. Each person gets their own account, and individual notes can be shared.

Anchor is less suitable if you’re looking for a knowledge base with linked pages, folder trees, or collaborative real-time editing. AFFiNE may be a better fit. Anchor also doesn’t provide end-to-end encryption for notes. If that’s important to you, take a look at Standard Notes or Joplin.

Easy option: Anchor as a One-Click App

The quickest way to get Anchor running is through your VPS’s One-Click Apps. With a domain, the app is immediately accessible via HTTPS. You don’t need a reverse proxy, certificate, or firewall rules, and the One-Click App creates your administrator account during installation.

Requirements

  • A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. For instructions, see Set up One-Click Apps.
  • Anchor needs 1 vCore and at least 512 MB of RAM; 1 GB is recommended. Allow 2 to 5 GB of storage for the database and attachments.

Install

  1. Open your VPS in the ZapX Dashboard and switch to the One-Click Apps tab.
  2. Search for Anchor in the App catalog and click Install app.
  3. Use a custom subdomain or zap.cloud is already selected. Leave this option enabled and enter a name, for example notes. Without a domain, Anchor would only be accessible via HTTP, and your password would be transmitted unencrypted.
  4. Under App configuration, fill in both required fields:
    • ADMIN_EMAIL: the email address you’ll use to sign in later.
    • ADMIN_PASSWORD: your password, at least 8 characters.
  5. Click Queue installation. After about three minutes, Anchor will show as online on the app card.
Warning: Enter your email address and password carefully

These two fields only take effect during the very first installation. If the email address is invalid or the password is shorter than 8 characters, Anchor won’t create an account and the app will intentionally stay offline. You can change your password later in Anchor itself; changing the fields in App environment will no longer have any effect.

First login

  1. Open the app’s Access link.
  2. Sign in with the email address from ADMIN_EMAIL and the password from ADMIN_PASSWORD, then click Sign In.

Your account is an administrator account. The One-Click App disabled self-registration during setup. Visitors will only see the sign-in page and won’t be able to create their own accounts. You’ll need to add any additional users yourself; see “Multiple users and sharing” below.

Change your password in Anchor under Settings > Change Password. ZapX generates the other app values, such as the password for the built-in database, during installation. You can find them in the app settings (gear icon) under App environment > Automatically generated values, but you won’t need them for everyday use.

What the One-Click App sets up

The One-Click App starts two containers: anchor, which contains the web interface, API, and built-in PostgreSQL database, and the short-lived setup container anchor-seed. The setup container creates your administrator account on first launch, disables self-registration, and then exits. The container’s “exited” status is normal after that. Anchor will only be accessible at your address once setup is complete. The database is only accessible from within the container, and the app itself is only accessible through your domain.

Updates and backups

To check whether a new version is available, open the app settings (gear icon), go to App update, and click Check for updates. Install a new version with Apply update. If it says the app is up to date, there isn’t a newer version in the app catalog. Your account and notes are preserved during updates.

The database, attachments, and profile pictures are stored in the app’s anchor-data volume. A backup of your VPS from the Backups tab will save everything. Each user can also export their own notes in Anchor; see “Importing and exporting notes” below.

Manual installation

The rest of this guide describes a manual installation of Anchor with Docker Compose on your VPS—for example, if you don’t use One-Click Apps on your server or want to manage Anchor yourself alongside other services. The instructions are based on the official Anchor guide.

Requirements

  • A Linux VPS running Debian or Ubuntu, with SSH access. See First access via SSH.
  • Docker and Docker Compose. See Install Docker. Check the installation with docker --version and docker compose version.
  • For HTTPS: a domain or subdomain whose A record points to your VPS’s IP address (e.g. notes.example.com).

The official image includes the web interface, API, and a PostgreSQL database in a single container. Storage usage mainly increases with your attachments:

MinimumRecommended
CPU1 vCore1 vCore
RAM512 MB1 GB
Storage2 GB5 GB

Prepare the firewall

Anchor listens on port 3000 inside the container. Don’t open this port; Anchor should only be accessible through a reverse proxy with HTTPS. With ufw, allow only SSH and the ports needed for the reverse proxy:

Code
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
sudo ufw status

In the Compose file below, port 3000 is bound only to 127.0.0.1. This way, only the reverse proxy on the same server can reach it, even if Docker sets its own firewall rules.

Warning: The first user becomes an administrator

On a fresh installation, registration is open, and the first account to register becomes an administrator. Create your own account before Anchor is publicly accessible, then disable registration (see “First access and administrator account”).

Install with Docker Compose

Create a folder for Anchor and generate two random secrets for the database and sign-in, which will go in the .env file:

Code
mkdir -p ~/anchor && cd ~/anchor
echo "PG_PASSWORD=$(openssl rand -hex 24)" > .env
echo "JWT_SECRET=$(openssl rand -hex 32)" >> .env
chmod 600 .env

Then create a compose.yaml file in the ~/anchor folder, for example with nano compose.yaml:

Code
services:
  anchor:
    image: ghcr.io/zhfahim/anchor:0.18.1
    container_name: anchor
    restart: unless-stopped
    ports:
      - "127.0.0.1:3000:3000"
    environment:
      - APP_URL=https://notes.example.com
      - PG_PASSWORD=${PG_PASSWORD}
      - JWT_SECRET=${JWT_SECRET}
    volumes:
      - ./data:/data

Important lines:

  • image uses the official image with a fixed version number. Version 0.18.1 includes a security fix for servers with multiple users, so use at least this version. You can find the latest version in the Anchor releases.
  • ports binds Anchor to 127.0.0.1 only. The port won’t be accessible externally.
  • APP_URL is the address where Anchor will run. Replace notes.example.com with your domain.
  • PG_PASSWORD replaces the built-in database’s default password, password. The database is only accessible from within the container, but setting your own password is still a good idea. It takes effect on first launch and can’t simply be changed afterward through the .env file.
  • JWT_SECRET signs sign-ins. If you leave out this line, Anchor generates a secret on first launch and saves it in the data folder.
  • ./data contains the database, your attachments, and profile pictures.

Start Anchor:

Code
docker compose up -d
docker compose logs -f

On first launch, Anchor sets up the database. After a few seconds, Nest application successfully started and Ready will appear. Press Strg+C to leave the log view; the container will keep running.

First access and administrator account

Create your account before setting up the reverse proxy. To do this, open an SSH tunnel. Run this command on your own computer:

Code
ssh -L 3000:127.0.0.1:3000 root@SERVER_IP
  1. Open http://localhost:3000 in your browser.
  2. Click Create one below the sign-in form and create an account with your name, email address, and a password of at least 8 characters. This first account will automatically become an administrator.
  3. Open System in the sidebar and set Registration Mode to Disabled under Registration Settings. No one will be able to register themselves after that. You can create additional accounts there with Create User.

To set registration permanently, add the line - USER_SIGNUP=disabled under environment in compose.yaml and restart with docker compose up -d. The admin area will no longer be able to change this setting. Only set this variable after your account exists; otherwise, you won’t be able to register either.

HTTPS access through a reverse proxy

Set up nginx as a reverse proxy as described in Set up a reverse proxy with nginx, and obtain a certificate as explained in SSL certificate with Let's Encrypt. The server block for Anchor looks like this:

Code
server {
    listen 80;
    server_name notes.example.com;

    client_max_body_size 60m;

    location / {
        proxy_pass         http://127.0.0.1:3000;
        proxy_set_header   Host $host;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Proto $scheme;
    }
}
  • client_max_body_size allows attachments up to Anchor’s limit (50 MB per file) and larger backup files during import. Without this line, nginx will abort uploads larger than 1 MB.
  • The web interface and API use the same port. You don’t need a separate block for /api.

Then run sudo nginx -t and sudo systemctl reload nginx, and obtain the certificate with sudo certbot --nginx -d notes.example.com. Anchor will now be available at https://notes.example.com.

Back up your data

Everything is stored in the ~/anchor/data folder. The database is constantly writing data, so briefly stop the container to make a clean backup:

Code
cd ~/anchor
docker compose stop
sudo tar czf ~/anchor-backup-$(date +%F).tar.gz data .env compose.yaml
docker compose start

Copy the archive to another computer or storage location. To restore it, stop Anchor with docker compose down, extract the archive in the ~/anchor folder (using sudo to preserve the database permissions), then start it again with docker compose up -d. Each user can also export their own notes in Anchor; see “Importing and exporting notes” below.

Update Anchor

Create a backup first and read the release notes. Then enter the new version number for image in compose.yaml and run:

Code
cd ~/anchor
docker compose pull
docker compose up -d
docker image prune -f

When it starts, Anchor will automatically update the database to the new version. Don’t use latest or next: next is a pre-release for testing.

Use your notes on all your devices

Anchor’s interface is in English, so this guide uses the English labels. Create notes with New Note, and find archived and deleted notes under Archive and Trash.

Connect the smartphone app

Anchor is available as an Android app and as a beta for iPhone and iPad. The app saves your notes on your device, so you can read and edit them even without a connection. As soon as your smartphone is back online, the app syncs everything with your server.

When you first launch the app, enter your server’s address, for example https://notes.example.com (for the One-Click App, use the address from the Access link), then sign in with your Anchor account.

Info: Use the app and server with the same version

The apps in the stores always use the latest Anchor version. If your server is older, new app features may not work yet. Keep your server up to date.

Importing and exporting notes

Under Settings > Export & Import, you’ll find two options:

  • Export downloads all your notes, either as an Anchor backup (a ZIP file containing notes, tags, and attachments) or as Markdown files for other programs.
  • Import restores an Anchor backup or imports notes from Google Keep (exported through Google Takeout) and Markdown files.

The export only includes notes from the signed-in account. It’s a useful addition to backing up the entire server, for example before moving Anchor to another server.

Multiple users and sharing

As an administrator, add accounts under System with Create User. In the same section, use Registration Settings to choose whether new users can register themselves: Enabled (open), Require Review (you approve each new account), or Disabled (you create all accounts). Each user has their own notes and tags. If you already use a login service such as Keycloak or Authentik, you can connect it in the same section under OIDC Authentication. You can share individual notes with other users on your server, either for read-only access or editing.

What Anchor can’t do

  • No end-to-end encryption. Your notes are stored in readable form in the database on your server. Anyone with root access to the server can read them.
  • Sharing is limited to accounts on your server. There are no public links for people without an account.
  • Attachments are limited to 50 MB per file. Supported formats include images and audio, such as voice notes.
  • No built-in email delivery. Anchor doesn’t send emails, including password reset emails. An administrator can reset forgotten passwords under System.

Conclusion

Anchor gives you your own notes app with tags, attachments, reminders, and an offline mode on your smartphone, without entrusting your notes to a cloud provider. The fastest way to get started is with the One-Click App: enter an email address and password, queue the installation, sign in, and connect the smartphone app using your address. If you want to manage Anchor yourself, the manual installation with Docker Compose gives you full control.

Free tools

Related tools for servers and developers

View all

FAQ

Frequently asked questions

The One-Click App is the quickest option: Anchor runs on your domain over HTTPS within minutes, your administrator account is created during installation, and self-registration is disabled afterward. You can install updates in the dashboard under App Update. Manual installation with Docker Compose is a good choice if you don’t use One-Click Apps on your server, want to run Anchor behind your own reverse proxy, or want to control the version yourself.
No. This guide is about the open-source notes app Anchor (the ZhFahim/anchor project on GitHub), a self-hosted alternative to Google Keep. It has nothing to do with the former podcast service of the same name.
Not with the One-Click App: it creates your administrator account and sets registration to Disabled. With a manual installation, registration is initially open, and the first account becomes an administrator. Create your account before Anchor is publicly accessible, then set Registration Mode to Disabled or Require Review under System > Registration Settings.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.