Portainer Templates logo

Portainer Templates

Fuuz Device Gateway Fuuz Device Gateway

OpsMesWms

A secure gateway that connects on-premise devices, PLCs, and data sources to the Fuuz Cloud for seamless, real-time integration.

Configuration

Type
Container
Platform
linux
Image
public.ecr.aws/n9a9v7z5/mfgx-native-app-device-gateway-server:latest
Command
/fuuzdevicegateway/fuuzdevicegateway
Ports
5500:5500/tcp5501:5501/tcp
Volumes
/root/.fuuzdevicegateway//fuuzdevicegateway/drivers/
Env vars
FUUZ_API_KEY=''FUUZ_GATEWAY_AUTO_UPDATE=trueFUUZ_GATEWAY_LOG_LEVEL=infoFUUZ_GATEWAY_LOG_RETENTION_DAYS=30FUUZ_GATEWAY_PORT=5500FUUZ_GATEWAY_LISTEN_ADDRESS=0.0.0.0

Template by portainer

Notes

Fill out the configuration below, by default this will be accessible at http://{IP_Address}:5500. If you have questions or issues with setup, review our documentation at support.fuuz.com or contact support at [email protected]

Installation

  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 the app you wish to deploy, fill in any config options, and hit Deploy

Template Import URL

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

docker run -d \
  -p 5500:5500/tcp \
  -p 5501:5501/tcp \
  -e 'FUUZ_API_KEY=' \
  -e 'FUUZ_GATEWAY_AUTO_UPDATE=true' \
  -e 'FUUZ_GATEWAY_LOG_LEVEL=info' \
  -e 'FUUZ_GATEWAY_LOG_RETENTION_DAYS=30' \
  -e 'FUUZ_GATEWAY_PORT=5500' \
  -e 'FUUZ_GATEWAY_LISTEN_ADDRESS=0.0.0.0' \
  -v /root/.fuuzdevicegateway/ \
  -v /fuuzdevicegateway/drivers/ \
  public.ecr.aws/n9a9v7z5/mfgx-native-app-device-gateway-server:latest \
  /fuuzdevicegateway/fuuzdevicegateway

Save this file as compose.yaml and run docker compose up -d
Use this only as a guide.

services:
  fuuz-device-gateway:
    image: public.ecr.aws/n9a9v7z5/mfgx-native-app-device-gateway-server:latest
    command: /fuuzdevicegateway/fuuzdevicegateway
    ports:
      - 5500:5500/tcp
      - 5501:5501/tcp
    volumes:
      - /root/.fuuzdevicegateway/
      - /fuuzdevicegateway/drivers/
    environment:
      FUUZ_API_KEY: ''
      FUUZ_GATEWAY_AUTO_UPDATE: 'true'
      FUUZ_GATEWAY_LOG_LEVEL: info
      FUUZ_GATEWAY_LOG_RETENTION_DAYS: '30'
      FUUZ_GATEWAY_PORT: '5500'
      FUUZ_GATEWAY_LISTEN_ADDRESS: 0.0.0.0

Save this file as fuuz-device-gateway-stack.yml, then from a manager node, run docker stack deploy -c fuuz-device-gateway-stack.yml fuuz-device-gateway

version: '3.8'
services:
  fuuz-device-gateway:
    image: public.ecr.aws/n9a9v7z5/mfgx-native-app-device-gateway-server:latest
    command: /fuuzdevicegateway/fuuzdevicegateway
    ports:
      - 5500:5500/tcp
      - 5501:5501/tcp
    volumes:
      - /root/.fuuzdevicegateway/
      - /fuuzdevicegateway/drivers/
    environment:
      FUUZ_API_KEY: ''
      FUUZ_GATEWAY_AUTO_UPDATE: 'true'
      FUUZ_GATEWAY_LOG_LEVEL: info
      FUUZ_GATEWAY_LOG_RETENTION_DAYS: '30'
      FUUZ_GATEWAY_PORT: '5500'
      FUUZ_GATEWAY_LISTEN_ADDRESS: 0.0.0.0

Save each file below into a folder, then run kubectl apply -f .
Written for k3s, but works on any cluster: bind mounts use hostPath, named volumes get a persistent volume claim, and ports are exposed via a LoadBalancer service.

fuuz-device-gateway-data-0.yaml

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: fuuz-device-gateway-data-0
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi

fuuz-device-gateway-data-1.yaml

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: fuuz-device-gateway-data-1
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi

fuuz-device-gateway-deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: fuuz-device-gateway
  labels:
    app: fuuz-device-gateway
spec:
  replicas: 1
  selector:
    matchLabels:
      app: fuuz-device-gateway
  template:
    metadata:
      labels:
        app: fuuz-device-gateway
    spec:
      containers:
        - name: fuuz-device-gateway
          image: public.ecr.aws/n9a9v7z5/mfgx-native-app-device-gateway-server:latest
          args:
            - /fuuzdevicegateway/fuuzdevicegateway
          env:
            - name: FUUZ_API_KEY
              value: ''
            - name: FUUZ_GATEWAY_AUTO_UPDATE
              value: 'true'
            - name: FUUZ_GATEWAY_LOG_LEVEL
              value: info
            - name: FUUZ_GATEWAY_LOG_RETENTION_DAYS
              value: '30'
            - name: FUUZ_GATEWAY_PORT
              value: '5500'
            - name: FUUZ_GATEWAY_LISTEN_ADDRESS
              value: 0.0.0.0
          ports:
            - containerPort: 5500
              protocol: TCP
            - containerPort: 5501
              protocol: TCP
          volumeMounts:
            - name: fuuz-device-gateway-data-0
              mountPath: /root/.fuuzdevicegateway/
            - name: fuuz-device-gateway-data-1
              mountPath: /fuuzdevicegateway/drivers/
      volumes:
        - name: fuuz-device-gateway-data-0
          persistentVolumeClaim:
            claimName: fuuz-device-gateway-data-0
        - name: fuuz-device-gateway-data-1
          persistentVolumeClaim:
            claimName: fuuz-device-gateway-data-1

fuuz-device-gateway-service.yaml

apiVersion: v1
kind: Service
metadata:
  name: fuuz-device-gateway
spec:
  type: LoadBalancer
  selector:
    app: fuuz-device-gateway
  ports:
    - name: 5500-tcp
      port: 5500
      targetPort: 5500
      protocol: TCP
    - name: 5501-tcp
      port: 5501
      targetPort: 5501
      protocol: TCP

Save this file as ~/.config/containers/systemd/fuuz-device-gateway.container

[Unit]
Description=Fuuz Device Gateway

[Container]
Image=public.ecr.aws/n9a9v7z5/mfgx-native-app-device-gateway-server:latest
ContainerName=fuuz-device-gateway
PublishPort=5500:5500/tcp
PublishPort=5501:5501/tcp
Environment=FUUZ_API_KEY=
Environment=FUUZ_GATEWAY_AUTO_UPDATE=true
Environment=FUUZ_GATEWAY_LOG_LEVEL=info
Environment=FUUZ_GATEWAY_LOG_RETENTION_DAYS=30
Environment=FUUZ_GATEWAY_PORT=5500
Environment=FUUZ_GATEWAY_LISTEN_ADDRESS=0.0.0.0
Volume=/root/.fuuzdevicegateway/
Volume=/fuuzdevicegateway/drivers/
Exec=/fuuzdevicegateway/fuuzdevicegateway

[Service]
Restart=always

[Install]
WantedBy=default.target

Then reload systemd and start the service:

systemctl --user daemon-reload
systemctl --user start fuuz-device-gateway

For a system-wide service, use /etc/containers/systemd/ and drop --user.

For more installation options, see the Documentation in our GitHub repo

Serve Fuuz Device Gateway 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 fuuz-device-gateway.example.com to http://fuuz-device-gateway:5500

Add this to your Caddyfile

fuuz-device-gateway.example.com {
	reverse_proxy http://fuuz-device-gateway:5500
}

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:5500 failed: port is already allocated", something else on your server is using that port.

  • Find what's using it: sudo ss -tlnp | grep :5500
  • Stop the other service, or pick a different host port. In 5500:5500 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:5500. The 0.0.0.0 link Portainer shows isn't a real address.
  • Give it a minute after first deploy, some apps can take a while to initialise.
  • Make sure your firewall allows the port, e.g. sudo ufw allow 5500

Image won't pull

Test the pull directly on the host: docker pull public.ecr.aws/n9a9v7z5/mfgx-native-app-device-gateway-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.

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

Required settings are blank

FUUZ_API_KEY has no default value, and the app may crash or misbehave if left empty.

  • Fill it in on the deploy screen before hitting deploy.

Raise an issue

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

Similar apps