Portainer Templates logo

Portainer Templates

Ferdium (stack) Ferdium (stack)

Messenger

Ferdium is a messaging browser that allows you to combine your favourite messaging services into one application

Image details

Pulls: 291k
Architecture: amd64, arm64
Image size: 312 MB
Latest: 2.0.13
User: ferdium
Created: May 03, 2022
Updated: 4 months ago
Status: active

Source details

Stars: 288
Forks: 54
Language: TypeScript
License: MIT
Updated: 4 months ago

Configuration

Type
Compose
Platform
linux
Image
ferdium/ferdium-server:latest
Ports
3334:3333
Volumes
/data : /portainer/Files/AppData/Config/ferdium/app/recipes : /portainer/Files/AppData/Config/ferdium/recipes
Env vars
NODE_ENV=developmentEXTERNAL_DOMAIN=localhostDB_CONNECTION=sqliteDB_HOST=127.0.0.1DB_PORT=3306DB_USER=rootDB_PASSWORD=passwordDB_DATABASE=ferdiDB_SSL=falseMAIL_CONNECTION=smtpSMPT_HOST=127.0.0.1SMTP_PORT=2525MAIL_SSL=falseMAIL_USERNAME=usernameMAIL_PASSWORD=passwordMAIL_SENDER=noreply@getferdi.comIS_CREATION_ENABLED=trueIS_DASHBOARD_ENABLED=trueIS_REGISTRATION_ENABLED=trueCONNECT_WITH_FRANZ=trueDATA_DIR=/dataPUID=1000PGID=1000
Restart
always
Source

Template by xneo1·Source

Standalone Install

Select an install method, to see config/commands for deploying Ferdium (stack)

Installation method

Install on Portainer

Import all app templates into your Portainer instance, for easy 1-click deploys

  1. Ensure both Docker and Portainer are installed, and up-to-date
  2. Log into your Portainer web UI
  3. Under Settings → App Templates, paste the below URL
  4. Head to Home → App Templates, and the list of apps will show up
  5. Select Ferdium (stack), fill in any config options, and hit Deploy

Template Import URL

https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me demo
Original stackfile

The compose file this template deploys, straight from its repo:

services:
  ferdi-server:
    image:  ferdium/ferdium-server:latest
    container_name: ferdium-server
    environment:
      - NODE_ENV=development
      - EXTERNAL_DOMAIN=localhost
      - DB_CONNECTION=sqlite
      - DB_HOST=127.0.0.1
      - DB_PORT=3306
      - DB_USER=root
      - DB_PASSWORD=password
      - DB_DATABASE=ferdi
      - DB_SSL=false
      - MAIL_CONNECTION=smtp
      - SMPT_HOST=127.0.0.1
      - SMTP_PORT=2525
      - MAIL_SSL=false
      - MAIL_USERNAME=username
      - MAIL_PASSWORD=password
      - MAIL_SENDER=noreply@getferdi.com
      - IS_CREATION_ENABLED=true
      - IS_DASHBOARD_ENABLED=true
      - IS_REGISTRATION_ENABLED=true
      - CONNECT_WITH_FRANZ=true
      - DATA_DIR=/data
      - PUID=1000
      - PGID=1000
    volumes:
      - /portainer/Files/AppData/Config/ferdium:/data
      - /portainer/Files/AppData/Config/ferdium/recipes:/app/recipes
    ports:
      - 3334:3333
    restart: always

Or deploy it directly from the source:

git clone https://github.com/xneo1/portainer_templates
cd portainer_templates
docker compose -f Template/Stack/ferdium.yml up -d

More install options in our documentation, or see ferdium/ferdium-server for app-specific guidance.

<img src="https://raw.githubusercontent.com/ferdium/ferdium-server/HEAD/logo.png" alt="" width="300"/>

Server

Docker Build and Publish
Contributors
👨🏾‍🍳 Server for Ferdium that you can re-use to run your own

Why use a custom server?

Find answers to other frequently asked questions on ferdium.org/faq.
Toggle answer
A custom server allows you to manage the data of all registered users yourself and add your own recipes to the repository. If you are not interested in doing this you can use our official instance of the server at api.ferdium.org
.

Features

  • x User registration and login
  • x Service creation, download, listing and removing
  • x Workspace support
  • x Functioning service store
  • x User dashboard
  • x Export/import data to other Ferdium-servers
  • x Password recovery
  • x Recipe update

Deploying the App

Setup with Docker The easiest way to set up Ferdium-server on your server is with Docker.
The Docker image can be run as is, with the default SQLite database or you can modify your ENV variables to use an external database (e.g. MySQL, MariaDB, Postgres, etc). After setting up the docker container we recommend you set up an NGINX reverse proxy to access Ferdium-server outside of your home network and protect it with an SSL certificate.
Warning, please note that the use of the previous config.txt is now deprecated and a number of environment variables have changed, specifically the default database name and location, the internal container port, and an additional DATA_DIR variable has been added. Make sure to pass the correct environment variables to your container at runtime. If you are an existing Ferdium-server user, please see the Ferdium docker documentation for more information about migrating to the new image.
  1. Pull the Docker image
```sh
docker pull ferdium/ferdium-server:latest
```
  1. Create a new Docker container with your desired configuration Existing users please seee the warning above.
```sh
	    docker create \
	    --name=ferdium-server \
	    -e NODE_ENV=development \
	    -e APP_URL=<ferdium-server-url> \
	    -e DB_CONNECTION=<database> \
	    -e DB_HOST=<yourdbhost> \
	    -e DB_PORT=<yourdbport> \
	    -e DB_USER=<yourdbuser> \
	    -e DB_PASSWORD=<yourdbpass> \
	    -e DB_DATABASE=<yourdbdatabase> \
	    -e DB_SSL=false \
	    -e MAIL_CONNECTION=smtp \
	    -e SMTP_HOST=<smtpmailserver> \
	    -e SMTP_PORT=<smtpport> \
	    -e MAIL_SSL=true/false \
	    -e MAIL_USERNAME=<yourmailusername> \
	    -e MAIL_PASSWORD=<yourmailpassword> \
	    -e MAIL_SENDER=<sendemailaddress> \
	    -e IS_CREATION_ENABLED=true \
	    -e IS_DASHBOARD_ENABLED=true \
	    -e IS_REGISTRATION_ENABLED=true \
	    -e CONNECT_WITH_FRANZ=true \
  -e DATA_DIR=data \
	    -p <port>:3333 \
	    -v <path to data>:/data \
	    -v <path to recipes>:/app/recipes \
	    --restart unless-stopped \
	    ferdium/ferdium-server:latest
```

Alternatively, you can also use docker-compose v2 schema. An example can be found [in the docker folder](https://github.com/ferdium/ferdium-server/blob/HEAD/docker/docker-compose.yml).
  1. Optionally, you can set up Nginx as a reverse proxy.

For more information on configuring the Docker image, please read the Ferdium docker documentation.
Manual setup
  1. Clone repository with submodule
  2. Install the AdonisJS CLI
  3. Copy .env.example to .env and edit the configuration to your needs
  4. Have env DBSSL=true only if your database is postgres and it is hosted online on platforms like GCP, AWS, etc
  5. Run npm install to install local dependencies
  6. Run the database migrations with
```js
node ace migration:run
```
  1. Start the server with
```js
npm start
```
Configuration
Ferdium-server's configuration is saved inside an .env file. Besides AdonisJS's settings, Ferdium-server has the following custom settings:
  • IS_CREATION_ENABLED (true or false, default: true): Whether to enable the creation of custom recipes
  • IS_REGISTRATION_ENABLED (true or false, default: true): Whether to enable the creation of new user accounts
  • IS_DASHBOARD_ENABLED (true or false, default: true): Whether to enable the user dashboard
  • CONNECT_WITH_FRANZ (true or false, default: true): Whether to enable connections to the Franz server. By enabling this option, Ferdium-server can:
- Show the full Franz recipe library instead of only custom recipes - Import Franz accounts
  • DB_SQLITE_JOURNAL_MODE (DELETE, TRUNCATE, PERSIST, MEMORY, WAL, or OFF, default: WAL): SQLite journal mode. WAL improves concurrency for the default single-file deployment.
  • DB_SQLITE_SYNCHRONOUS (OFF, NORMAL, FULL, or EXTRA, default: FULL): SQLite synchronous mode. FULL is the safer default for production durability. NORMAL reduces write latency but can lose the last committed transactions on sudden power loss.
  • DB_BUSY_TIMEOUT (milliseconds, default: 5000): How long SQLite should wait for a locked database before failing a query.
Importing your Franz/Ferdi account
Ferdium-server allows you to import your full Franz/Ferdi account, including all its settings.
To import your Franz/Ferdi account, open http://[YOUR FERDIUM-SERVER]/import in your browser and login using your Franz/Ferdi account details. Ferdium-server will create a new user with the same credentials and copy your Franz/Ferdi settings, services and workspaces.
Transferring user data
Please refer to
Creating and using custom recipes Ferdium-server allows to extends the Franz/Ferdi recipe catalogue with custom Ferdium recipes.
For documentation on how to create a recipe, please visit the official guide.
To add your recipe to Ferdium-server, open http://[YOUR FERDIUM-SERVER]/new in your browser. You can now define the following settings:
  • Author: Author who created the recipe
  • Name: Name for your new service. Can contain spaces and unicode characters
  • Service ID: Unique ID for this recipe. Does not contain spaces or special characters (e.g. google-drive)
  • Link to SVG image: Direct link to a 1024x1024 SVG image that is used as a logo inside the store. Please use jsDelivr when using a file uploaded to GitHub as raw.githubusercontent files won't load
  • Recipe files: Recipe files that you created using the recipe creation guide. Please do not package your files beforehand - upload the raw files (you can drag and drop multiple files). Ferdium-server will automatically package and store the recipe in the right format. Please also do not drag and drop or select the whole folder, select the individual files.

Listing custom recipes
Inside Ferdium, searching for ferdium:custom will list all of your custom recipes.

Contributing

Please read the contributing guidelines to setup your development machine and proceed.

Contributors ✨

Thanks goes to these wonderful people (emoji key):
<tr>
  <td align="center" valign="top" width="14.28%"><a href='https://pogonip.pw/' title='nick: code'><img src='https://avatars.githubusercontent.com/u/5242865?v=4' alt='HuggableSquare' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='http://code-addict.pl' title='Michał Kostewicz: code'><img src='https://avatars.githubusercontent.com/u/6313392?v=4' alt='k0staa' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='https://gitlab.com/cromefire_' title='Cromefire_: code'><img src='https://avatars.githubusercontent.com/u/26320625?v=4' alt='cromefire' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='https://omkaragrawal.dev' title='OMKAR AGRAWAL: code'><img src='https://avatars.githubusercontent.com/u/10913160?v=4' alt='Omkaragrawal' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='http://www.nathanaelhoun.fr' title='Nathanaël Houn: review'><img src='https://avatars.githubusercontent.com/u/45119518?v=4' alt='nathanaelhoun' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='https://github.com/ericreeves' title='Eric Reeves: infra'><img src='https://avatars.githubusercontent.com/u/1744930?v=4' alt='ericreeves' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='https://github.com/SpecialAro' title='André Oliveira: infra, design'><img src='https://avatars.githubusercontent.com/u/37463445?v=4' alt='SpecialAro' style='width:100px;'/></a></td>
</tr>
<tr>
  <td align="center" valign="top" width="14.28%"><a href='https://mydarkstar.net' title='mydarkstar: review'><img src='https://avatars.githubusercontent.com/u/17343993?v=4' alt='mydarkstar' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='https://santhosh.cyou' title='Santhosh C: code'><img src='https://avatars.githubusercontent.com/u/20743451?v=4' alt='santhosh-chinnasamy' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='https://github.com/vraravam' title='Vijay Aravamudhan: review, code'><img src='https://avatars.githubusercontent.com/u/69629?v=4' alt='vraravam' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='https://github.com/dqos' title='Tamer: design'><img src='https://avatars.githubusercontent.com/u/8611981?v=4' alt='dqos' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='https://github.com/Gibby' title='Gibby: infra, doc'><img src='https://avatars.githubusercontent.com/u/503761?v=4' alt='Gibby' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='https://github.com/palepinkdot' title='MG: review'><img src='https://avatars.githubusercontent.com/u/55257671?v=4' alt='palepinkdot' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='https://github.com/xthursdayx' title='thursday: infra'><img src='https://avatars.githubusercontent.com/u/18044308?v=4' alt='xthursdayx' style='width:100px;'/></a></td>
</tr>
<tr>
  <td align="center" valign="top" width="14.28%"><a href='https://vantezzen.io/' title='Bennett: code'><img src='https://avatars.githubusercontent.com/u/10333196?v=4' alt='vantezzen' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='https://gitlab.com/reggermont/' title='Romain Eggermont: infra'><img src='https://avatars.githubusercontent.com/u/14902909?v=4' alt='reggermont' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='http://lnhrdt.com' title='Leonhardt Koepsell: infra'><img src='https://avatars.githubusercontent.com/u/4040241?v=4' alt='lnhrdt' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='https://github.com/fabolhak' title='Fabian H.: doc'><img src='https://avatars.githubusercontent.com/u/20029691?v=4' alt='fabolhak' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='https://github.com/mazzz1y' title='Dmitry R.: code'><img src='https://avatars.githubusercontent.com/u/17034108?v=4' alt='mazzz1y' style='width:100px;'/></a></td>
  <td align="center" valign="top" width="14.28%"><a href='http://ch-naseem.com' title='Naz: infra'><img src='https://avatars.githubusercontent.com/u/123460560?v=4' alt='ndpm13' style='width:100px;'/></a></td>
</tr>



This project follows the all-contributors specification. Contributions of any kind welcome!

Serve Ferdium (stack) on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.

Proxying ferdium-stack.example.com to http://ferdi-server:3333

Add this to your Caddyfile

ferdium-stack.example.com {
	reverse_proxy http://ferdi-server:3333
}

Check the logs first

Nine times out of ten the logs tell you exactly what went wrong.

  • In Portainer, go to Containers, click the container, then Logs. Or run docker logs <container>
  • Exit codes help too: 137 means killed, usually out of memory. 126 or 127 means the command inside the image is broken.

Port already in use

If deployment fails with "Bind for 0.0.0.0:3334 failed: port is already allocated", something else on your server is using that port.

  • Find what's using it: sudo ss -tlnp | grep :3334
  • Stop the other service, or pick a different host port. In 3334:3333 only the left number is yours to change, the right one belongs to the app.

Running but the page won't load

The container is up but nothing appears in your browser.

  • Use your server's real IP: http://your-server-ip:3334. The 0.0.0.0 link Portainer shows isn't a real address.
  • Give it a minute after first deploy, ferdi-server can take a while to initialise.
  • Make sure your firewall allows the port, e.g. sudo ufw allow 3334

Permission denied on volumes

If the logs show "permission denied", the app can't write to its data folder on the host.

  • Fix the ownership: sudo chown -R 1000:1000 /portainer/Files/AppData/Config/ferdium (and the same for the other mapped folders)
  • Or set the PUID and PGID variables (defaults 1000:1000) to match your own user, found with id $USER

Image won't pull

Test the pull directly on the host: docker pull ferdium/ferdium-server:latest

  • "manifest unknown" means the tag no longer exists. This template uses latest, so try pinning a specific version instead.
  • "toomanyrequests" is the Docker Hub rate limit. Log in with docker login to raise it.
  • "no space left on device" means a full disk. Reclaim space with docker system prune

"exec format error"

This means the image was built for a different CPU architecture than your server.

  • This image supports: amd64, arm64
  • Check yours with uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.

Container keeps restarting

The always restart policy relaunches the app after every crash, so the real error can scroll past.

  • Check the logs right after a restart, the last few lines before it died are the useful ones.
  • Get the exit code with docker inspect <container> --format '{{.State.ExitCode}}'
  • Still stuck? Redeploy once with the restart policy set to no so the failure stays visible.

Stack won't deploy

Compose stacks fail fast on small mistakes, and Portainer shows the reason just above the editor.

  • YAML only accepts spaces for indentation, a single tab breaks the whole file.

Raise an issue

Found something which isn't working as it should? Here's how to report it.

A Compose stack

Ferdium (stack) is a Compose stack, a set of containers defined in one file and brought up together by Portainer, then started and stopped as a single app.

The app image

An image is the app packed up ready to go, everything Ferdium (stack) needs bundled into one download. This template pulls ferdium/ferdium-server:latest, which Docker fetches once (about 312 MB) and then starts your own copy from.

Where the image comes from

Docker pulls its images from registries, public libraries of ready-built apps. Ferdium (stack)'s comes from Docker Hub, published by ferdium.

Version tags

The bit after the colon in the image name is the version tag. Here it's latest, which always points at the newest build, so a redeploy can bump you to a newer release without you asking. Newest right now is 2.0.13. Pin a specific tag if you would rather stay on one version.

Which machines it runs on

Every image is built for particular CPU types. This one ships for amd64, arm64, so it runs on both regular x86 servers and ARM boards like a Raspberry Pi.

Ports

A port is the door the app answers on. A mapping like 3334:3333 means it's reachable on port 3334 of your server, where the left number is yours to change and the right one belongs to the app. It opens:

  • 3334:3333

Volumes

A volume is where Ferdium (stack) keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:

  • /data from /portainer/Files/AppData/Config/ferdium on the host
  • /app/recipes from /portainer/Files/AppData/Config/ferdium/recipes on the host

Environment variables

Environment variables are the settings you hand over when you deploy, things like a password or a timezone. Ferdium (stack) takes 23 of them, all with defaults you can leave alone or tweak:

  • NODE_ENV, defaults to development
  • EXTERNAL_DOMAIN, defaults to localhost
  • DB_CONNECTION, defaults to sqlite
  • DB_HOST, defaults to 127.0.0.1
  • DB_PORT, defaults to 3306
  • DB_USER, defaults to root
  • DB_PASSWORD, defaults to password
  • DB_DATABASE, defaults to ferdi
  • DB_SSL, defaults to false
  • MAIL_CONNECTION, defaults to smtp
  • SMPT_HOST, defaults to 127.0.0.1
  • SMTP_PORT, defaults to 2525
  • MAIL_SSL, defaults to false
  • MAIL_USERNAME, defaults to username
  • MAIL_PASSWORD, defaults to password
  • MAIL_SENDER, defaults to noreply@getferdi.com
  • IS_CREATION_ENABLED, defaults to true
  • IS_DASHBOARD_ENABLED, defaults to true
  • IS_REGISTRATION_ENABLED, defaults to true
  • CONNECT_WITH_FRANZ, defaults to true
  • DATA_DIR, defaults to /data
  • PUID, defaults to 1000
  • PGID, defaults to 1000

Restart policy

The restart policy here is always, so Docker brings Ferdium (stack) back up after a crash and again when the server reboots. Good for anything you want running around the clock. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).

Users and permissions

The PUID and PGID settings tell it which user and group to act as on your host. Point them at your own account (find yours with id $USER) so the files it writes into your mounted folders come out owned by you rather than root.

Networking

Nothing custom is set, so Ferdium (stack) sits on Docker's default bridge network: its own private space that reaches the outside world only through the ports it publishes.

Container name

Once it's deployed, Portainer names the container ferdi-server. That's what you'll spot in the containers list and use in commands like docker logs ferdi-server.

Platform

The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.

Open source license

Ferdium (stack) is open source, released under the MIT license. In plain terms the code is out in the open, so you're free to run it and change it to fit what you need.

Portainer app templates

Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set Ferdium (stack) up. Add the template list to Portainer once, then deploying Ferdium (stack) is a click rather than a wall of config.