emberd
Ember on a server: a home server, a NAS or a Docker container, with no screen, driven from a web browser on any computer or phone. New here? Start with installing it, then the first visit.
What emberd is
emberd is Ember without a window. It is built from the same code as the desktop app and released with it, under the same version, so it shares and downloads exactly as Ember does, on the same networks: eD2K servers, KAD and the Ember Network. It keeps running when nobody is logged in, as a systemd service or in a Docker container, and you use it from a web browser, the way aMule’s amuled is used with amuleweb.
Run it where a computer stays on: downloads carry on while your own computer sleeps, your shares stay available, and friends, channels and feeds reach you at any hour. Open its address in a browser to search, download, chat or change a setting, then close the tab; emberd carries on.
What you get
- Everything the desktop app does, except what needs a window: search and the spam filter, downloads and uploads, the Library and hashing, friends and chat, channels and private messages, feeds, the IP filter, statistics, the Connection Doctor and Connect through.
- The desktop app’s own pages, in your browser, behind a password. Controls that mean nothing on a server are hidden; the few that need another form have one (see What works differently).
- Files come to the computer you are browsing from: Save to this device downloads a finished file through the browser, and audio and video play in the page.
- A command line,
emberd ctl, for downloads and searches from a shell or a script. - One config file for what the desktop app asks for with its folder pickers: the download folder, the shared folders, and where the web interface listens.
Requirements
- Linux on x86-64 or ARM64 with glibc 2.35 or newer: Ubuntu 22.04, Debian 12 and their successors, including a Raspberry Pi 4 or 5 on a 64-bit system. Or any x86-64 or ARM64 machine that runs Docker, as many NAS systems do.
- Nothing else to install. emberd needs no display, GTK or WebKit, only the system’s CA certificates.
- A modern browser on whatever you use it from.
Every release carries emberd beside the desktop app on the Releases page: emberd_<version>_amd64.deb and _arm64.deb, emberd-<version>-linux-x86_64.tar.gz and -aarch64.tar.gz, and emberd-<version>-SHA256SUMS to check them against. The Docker image is ghcr.io/untaimed18/emberd.
Debian & Ubuntu (.deb)
Download the .deb for your machine, amd64 for x86-64 or arm64 for ARM, from the latest release, then:
sudo apt install ./emberd_*_amd64.deb
sudo nano /etc/emberd/emberd.toml # the folders, and where it listens
sudo systemctl enable --now emberd
journalctl -u emberd # the setup code for the first visit
The package installs emberd in /opt/emberd with emberd on your path, makes an emberd user and its systemd service, and does not start the service, so you can set your folders in /etc/emberd/emberd.toml before Ember joins any network. Ember keeps its data in /var/lib/emberd/data; unless the config names a download folder, downloads go to /var/lib/emberd/Downloads/Ember.
Removing the package stops emberd. Purging it still leaves Ember’s data, identity and downloads in /var/lib/emberd, so nothing you have is lost by accident.
Any Linux (tarball)
Download the tarball for your machine, x86_64 or aarch64, and unpack it to /opt/emberd, so that /opt/emberd/emberd sits beside its web/ and resources/ folders. Then set up the user and the service, and set your folders before the first start:
sudo mkdir -p /opt/emberd
sudo tar -xzf emberd-*-linux-$(uname -m).tar.gz -C /opt/emberd --strip-components=1
sudo useradd --system --home-dir /var/lib/emberd --shell /usr/sbin/nologin emberd
sudo ln -s /opt/emberd/emberd /usr/local/bin/emberd
sudo install -Dm644 /opt/emberd/emberd.service /etc/systemd/system/emberd.service
sudo install -Dm644 /opt/emberd/emberd.toml /etc/emberd/emberd.toml
sudo nano /etc/emberd/emberd.toml # the folders, and where it listens
sudo systemctl daemon-reload
sudo systemctl enable --now emberd
journalctl -u emberd
Data and downloads go to the same places as with the .deb. Without systemd, run /opt/emberd/emberd as an ordinary user: it keeps its data in that user’s home folder, and emberd --help lists its options.
Docker
docker run -d --name emberd --restart unless-stopped \
-p 4711:4711 -p 4662:4662/tcp -p 4662:4662/udp -p 4672:4672/udp \
-v emberd-data:/data -v /srv/downloads:/downloads \
ghcr.io/untaimed18/emberd
docker logs emberd # the setup code for the first visit
The image runs on x86-64 and ARM64 alike and is tagged with each version, its major.minor, and latest. Ember’s data lives in the /data volume and downloads go to /downloads. The container runs as user ID 1000, so a folder you mount for downloads has to be writable by that ID.
To share a folder, mount it and name it: -v /srv/music:/shared/music:ro -e EMBERD_SHARED_DIRS=/shared/music. Every setting in the config file has an environment variable (see The config file), so a container needs no file at all. With Docker Compose:
services:
emberd:
image: ghcr.io/untaimed18/emberd
container_name: emberd
restart: unless-stopped
ports:
- "4711:4711"
- "4662:4662/tcp"
- "4662:4662/udp"
- "4672:4672/udp"
volumes:
- emberd-data:/data
- /srv/downloads:/downloads
- /srv/music:/shared/music:ro
environment:
EMBERD_SHARED_DIRS: /shared/music
volumes:
emberd-data:
As written, these examples open the web interface to your whole network over plain HTTP. Inside the container it listens on every address, so that Docker can publish it at all, and -p 4711:4711 publishes it on every address of the host. That suits a home network you trust. Otherwise publish it as -p 127.0.0.1:4711:4711, for the host alone, and reach it through HTTPS or a VPN, as in Using it from another computer.
The first visit
On its first start emberd writes a setup code to its log (journalctl -u emberd or docker logs emberd), and to emberd-setup-code in its data folder:
No password is set for the web interface yet. Open http://localhost:4711
and enter this setup code to choose one: 2BLD-WZ8J
-
Open the address
On the server itself that ishttp://localhost:4711. From another computer, see Using it from another computer first. -
Enter the setup code and choose a password
Case and the dash do not matter. The code proves that whoever chooses the password can read the server’s log, so nobody else on your network can claim a fresh install before you. -
Use Ember
You are signed in to the same pages as the desktop app. KAD and the Ember Network connect on their own; eD2K servers are yours to choose, as on the desktop. See Getting started in the Guide.
To set or reset the password from a shell instead, stop emberd and run emberd passwd as the user it runs as, or emberd passwd --stdin to read it from a pipe:
sudo systemctl stop emberd
sudo -u emberd emberd passwd
sudo systemctl start emberd
The config file
emberd reads /etc/emberd/emberd.toml if it exists, or the file --config or EMBERD_CONFIG names. Every key is optional, and an environment variable wins over the file. Change it, then restart emberd (sudo systemctl restart emberd). A key emberd does not know stops it with an error rather than being ignored, so a typing mistake cannot go unnoticed.
data_dir = "/var/lib/emberd/data"
[web]
listen = "127.0.0.1:4711"
# tls_cert = "/etc/emberd/cert.pem"
# tls_key = "/etc/emberd/key.pem"
[folders]
download = "/srv/emberd/downloads"
shared = ["/srv/media/music", "/srv/media/films"]
browse_under = ["/srv/media"]
| Key and variable | What it sets |
|---|---|
data_dirEMBER_DATA_DIR | Where Ember keeps its identity, settings, library and database |
key_fileEMBERD_KEY_FILE | The file Ember’s identity and keys are sealed with; made on first start, in the data folder unless set |
web.listenEMBERD_LISTEN | Where the web interface listens; 127.0.0.1:4711, reachable only from the device emberd runs on, unless set |
web.tls_certEMBERD_TLS_CERT | A certificate, as a PEM file, to serve HTTPS; set with tls_key |
web.tls_keyEMBERD_TLS_KEY | The certificate’s private key, as a PEM file |
folders.downloadEMBERD_DOWNLOAD_DIR | Where downloads are saved |
folders.sharedEMBERD_SHARED_DIRS | Folders always shared in full |
folders.browse_underEMBERD_BROWSE_UNDER | Folders the web interface may browse to share more from, and import from |
The folder variables take a list separated by :. Everything else is set in the web interface’s Settings, as in the desktop app. Settings > This server shows what the config file set and where emberd keeps its data, and has Restart emberd for after you change it.
Folders
On the desktop you pick folders in a dialog. On a server, the config file names them, and the web interface can change only what the config lets it:
- The download folder is the config’s alone. It is where files from strangers are written, so a browser cannot move it.
- Shared folders listed under
sharedare always shared; to stop sharing one, take it out of the config. browse_undernames the folders the web interface may look inside. From there you can share more folders and unshare them again, add a channel library, and import from an eMule or aMule folder. Nothing outside them can be reached from the browser, whatever a page sends. Withoutbrowse_under, the web interface shares only whatsharednames.
Folders have to be full paths, outside the data folder, and outside system and private folders: no folder on the way to one may be named etc, usr, bin, var, tmp, temp, proc, .ssh, .config, AppData or the like, except the folders leading to the home folder. These are the desktop app’s own rules, checked at start, so a folder they refuse stops emberd with its name in the log.
Using it from another computer
By default the web interface listens on 127.0.0.1:4711, the server itself only. To use it from your laptop or phone, either:
- give it a certificate, so it serves HTTPS itself, and let it listen on the network:
listen = "0.0.0.0:4711",tls_certandtls_keyin[web]; or - put it behind a reverse proxy on the same machine that serves HTTPS, and leave emberd listening on
127.0.0.1. The proxy must pass on the host the browser asked for, asHostorX-Forwarded-Host, and forward WebSocket upgrades for/api/events, since emberd checks every request’s origin against it.
On a home network you trust, listen = "0.0.0.0:4711" alone also works, over plain HTTP; see the warning below.
For nginx:
location / {
proxy_pass http://127.0.0.1:4711;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
For Apache, use ProxyPreserveHost On and proxy WebSocket upgrades for /api/events too.
Plain HTTP over a network sends your password unencrypted. It still works, as many home setups need, but emberd warns in its log at every start and its sign-in page says so. Use HTTPS, a reverse proxy, or a VPN such as WireGuard or Tailscale to reach your home network, before you open the web interface to anything you do not trust. Never forward port 4711 from the internet to plain HTTP.
Browser notifications need HTTPS or localhost too: with either, turn them on in Settings and the browser shows Ember’s notifications while the page is open.
Ports and High ID
emberd uses the same ports as the desktop app, and they matter the same way: other people can only reach you directly, for a High ID and faster downloads, if these reach the server.
| Port | Protocol | Used for |
|---|---|---|
| 4662 | TCP | Peer-to-peer file transfers, eD2K and Ember alike |
| 4672 | UDP | KAD, the Ember Network and Ember’s QUIC transport |
| 4662 | UDP | QUIC for relays that dial your TCP port number over UDP |
| 4711 | TCP | The web interface, for you alone: never forward it from the internet |
Forward 4662 TCP, 4672 UDP and 4662 UDP on your router to the server, or turn on UPnP in Settings > Network. In Docker, publish them as in the example; UPnP usually cannot find the router from inside Docker’s default bridge network, so forward them by hand there. If you change the ports in Settings > Network, change them on the router and in Docker’s -p options too. The connection doctor at the top of Settings > Network says what is in the way.
The web interface
The pages are the desktop app’s, so the Ember Guide covers everything on them: search, transfers, the Library, friends, channels, feeds and Settings. A sign-in lasts 30 days in that browser. Settings > This server signs a browser out, or changes the password, which signs out every other browser.
What works differently
- Opening files. Where the desktop app has Open and Show in folder, emberd has Save to this device: for files in the Library, finished downloads, followed feeds’ files, friends’ attachments and files received in channels. Audio and video play in the page.
- Picking files. A backup, an IP filter, a collection, a web services list, or a file to send to a friend or a channel comes from the computer you are browsing from. A collection made in the Library is saved by the browser.
- Picking folders. Folders come from the config file, or from inside
browse_under. To import from eMule or aMule, emberd looks in their usual places on the server, or you type the folder, which has to be underbrowse_under. - Deleting files deletes them outright, and says so first, since nothing on a server ever empties a trash.
- Notifications show in the browser while the page is open, once allowed in Settings.
- Links. Paste
ed2k://links into the page, or add them withemberd ctl add. - Not on a server: the tray, starting at login (the service or Docker’s restart policy does that), the popped-out chat window, watching the clipboard, keeping the computer awake, When downloads finish, and dragging files onto the Library.
Share every file of each new release, in Settings > About, works as on the desktop: emberd checks for a new Ember release every hour and shares its installers, collection and notes once each checks out against the release signature, helping others get Ember when GitHub is out of reach.
emberd ctl
emberd ctl manages downloads and searches from a shell or a script, on the same server:
| emberd ctl … | What it does |
|---|---|
status | Connections, speeds and downloads |
list | Downloads, each with its ID |
add LINK... | Download ed2k:// links; with -, or none, the links are read from standard input |
pause ID... | Pause downloads, or every one with all |
resume ID... | Resume them, or all |
stop ID... | Stop them, keeping what arrived, or all |
cancel ID... | Cancel them and delete what arrived |
search WORDS... | Search, and print what was found as ed2k:// links to add. --type is audio, video, image, program, document, archive, iso or collection; --method is global (the default), server, kad or ember; --limit caps the results |
An ID is the one list shows, or the start of it, or the start of the file’s eD2K hash. --json prints emberd’s answer as it came, for scripts, and emberd ctl --help lists everything. For example:
sudo -u emberd emberd ctl search --type video --limit 5 big buck bunny
sudo -u emberd emberd ctl add 'ed2k://|file|...|/'
sudo -u emberd emberd ctl pause all
Put a link in single quotes, as above: the | in it means something else to the shell.
Run it as the emberd user, as above, or join its group once (sudo usermod -aG emberd $USER, then log in again) and run it as yourself. In Docker: docker exec emberd /opt/emberd/emberd ctl status.
The emberd group is as good as the password. emberd ctl talks to emberd over a local socket that needs no password, and whoever can open it can do anything the web interface can. Add only accounts you would give the password to.
Moving from the desktop app
A backup carries your desktop Ember over to emberd: your identity and user hash, upload credits, friends, chat history, known files, transfer list and settings. Friends see the same you, and your standing on the network comes along.
-
Make a backup on the desktop
In the desktop app, Settings > Backup & import. Choose a passphrase and create the.emberbackupfile. -
Restore it on emberd
In emberd’s Settings > Backup & import, send the file from the computer you are browsing from, enter the passphrase, and restart emberd when it asks. The page reconnects once it is back. -
Retire the desktop copy
From then on, use that identity on emberd only, and keep the desktop app closed or give it a fresh profile.
The files you share and part-finished downloads are not in a backup: copy them to the server and name their folders in the config. From eMule or aMule, Settings > Backup & import brings over their shared folders, hashes, credits, identity, unfinished downloads and servers, as on the desktop, within the folders the config allows.
Updating
emberd does not update itself: update it the way you installed it. Each release carries a new emberd beside the desktop app, and the release notes cover both.
- .deb: install the new package over the old one with
sudo apt install ./emberd_*_amd64.deb. A running emberd is restarted. - Tarball: unpack the new one over
/opt/emberdandsudo systemctl restart emberd. - Docker:
docker pull ghcr.io/untaimed18/emberd, then remove and re-create the container with the same command (with Compose,docker compose pull && docker compose up -d). Your data stays in its volume.
Ember saves everything and stops cleanly whenever the service or container stops, so an update loses nothing.
Backups
Settings > Backup & import makes a backup encrypted with a passphrase you choose, and your browser saves it to the computer you are browsing from. It holds your identity, credits, friends and settings, as on the desktop, and restores on emberd or on a desktop Ember. A lost passphrase cannot be recovered.
To back up the server itself instead, keep a copy of the data folder (/var/lib/emberd/data, or the /data volume) together with its key file, emberd-secret.key in that folder unless key_file moved it. The key file seals Ember’s identity and keys at rest; without it, the data folder cannot be read.
Security
- One password, of at least 8 characters, stored only as an Argon2id hash. Wrong passwords slow down: three are free, then each address waits twice as long as the last time, up to five minutes, even for the right one. Behind a reverse proxy every browser comes from the proxy’s address, so they share one count.
- Sessions are kept in an
HttpOnly,SameSite=Strictcookie,Secureunder HTTPS, and last 30 days at most. Every request is checked: one from another website is refused, and one that changes anything must carry a header that a form on another site cannot send. - The browser cannot reach outside your folders. It can share only what the config names or what is under
browse_under, and it cannot move the download folder. - Your identity is sealed at rest with emberd’s own key file, readable by emberd alone.
- Scripts can call the same interface with the API token in
emberd-cli-tokenin the data folder, as aBearertoken. Changing the password replaces it. - On the server itself, the
emberduser and the members of its group can runemberd ctlwithout the password, so treat them as you would the password.
Troubleshooting
- Read the log first:
journalctl -u emberd -f, ordocker logs -f emberd. emberd says there why it will not start, which folder a rule refused, or what it could not reach. - The page does not load from another computer. emberd listens on
127.0.0.1unless told otherwise; see Using it from another computer. Behind a proxy, check that it passes the host and forwards WebSockets. - “That request came from another site” means a reverse proxy is not passing the host the browser asked for:
proxy_set_header Host $host;in nginx,ProxyPreserveHost Onin Apache. - Forgotten password. Stop emberd and run
emberd passwd, as in The first visit. - Low ID. Forward the ports in Ports and High ID, then see the Connection Doctor in Settings > Network.
- Downloads cannot be saved, in Docker. The download folder on the host has to be writable by user ID 1000.
- Lost the connection to emberd on the page means emberd stopped or is restarting. The page reconnects by itself once it is back.