Deploy Office 365 AddIns on Linux

Mai 18, 2021

How to deploy your own JavaScript Office 365 AddInn Instance on Linux:

Development enviroment: 

  • Visual Studio Code:
  • Addons: ESLint, TSLint, HTML CSS Support
  • curl -sL | sudo -E bash -
    sudo apt install nodejs
  • npm install -g yo generator-office
  • yo office

Adjust ports for hosting (bash script)


# Assign the filename

# Take the search string
read -p "Port eingeben: " replace_port

# Take the replace string
read -p "<IP:Port> eingeben " replace_ip

echo "Gibt es Port schon?"
netstat -ano | grep :$replace_port

if [[ $search_ip != "" && $replace_ip != "" ]]; then
sed -i "s/$search_ip/$replace_ip/" $filename_ip

if [[ $search_port != "" && $replace_port != "" ]]; then
sed -i "s/$search_port/$replace_port/" $filename_port

Deployment on Linux (Node)

IMPORTANT: the declared ports in package.json should be available

netstat -ano | grep :<port in package.json:12>

  • npm install office-addin-dev-certs
  • npm install
  • npm start

Port forwarding (get public access)

socat tcp-listen: "$port_extern"",reuseaddr,fork tcp:localhost:"$port_intern" 

port_intern: Port that you specified with the bash script (Port in package.json)

port_extern: Port over which public access should take place

View all node instances
ps -fC node
Kill all instances
killall node